-
iOS ini/array Issue
Hi, I'm currently having a runtime issue with XCode. I get the error code "EXC_BAD_ACCESS" when running my program in XCode. This error didn't pop up until I added the loading of an array file in my program "settings.arr" to load in some default settings for various objects. I added this file to the project solution in XCode and then I got that error during the "clean" routine in KcArrayData Clean, so I know it's because of this process. I looked up the error in google and came across information saying either that a pointer is corrupt or premature memory deallocation occurred. In either case, I don't know ObjC, so finding the root of the problem will be pretty difficult. Has anyone successfully loaded ini/array files successfully in an application for the iPhone/iPad? If so, what steps should I take?
-
Re: iOS ini/array Issue
Can you send me the application, and the .arr file?
-
Re: iOS ini/array Issue
Do you need to drag the file into XCode or does it create it?
Premature deallocation means that either a [release] or a [dealloc] happened, effectively clearing a variable or object from the memory, but the code still needs it.
Have you tried removing the array file and running it? That could confirm that it's definitely the array.
-
Re: iOS ini/array Issue
I guess I just don't know where to place the file in the XCode project, because when I remove the reference to the file, I still get the error. Please note, I have two different builds of this application in XCode. The old build references the array to a direct path on my harddrive (which doesn't exist on my mac). That build doesn't get the error. When I changed it to reference a relative path (just used "settings.arr") and send that build over, that's when I get the error. Otherwise, there was no other change in the two builds. So, I think it perhaps has to do with where I'm placing the file? I'm not sure. If there were an example out there, I could feel more confident in the process I should be using. Since, this is probably just an issue with the procedure I'm using and not the application.
-
Re: iOS ini/array Issue
Francois, just in case you missed the message, I sent you a link that you can use to download the project file & array file. I'm hoping not to have to hard-code these values until the game is ready for release, so that tweaking object attributes does not require an entire rebuild of the app.
-
Just a bump on this issue... has the array referencing issue been resolved in the latest mmf2 build? Has anyone successfully incorporated loading arrays from files in their builds?
-
Did you use the array to store strings? If so, then yes Francois has fixed a bug that caused a crash during load time of the array :)
This is in the beta version we will be releasing soon.
-
Yep, the array being loaded stored mixed data; string and ints. So that is good news, hopefully it will be the fix I need! Thanks :)
-
If you add your iOS serial number to your forum account
(Click the settings at the top of the forum)
You will unlock access to the iOS beta forum.
In there you can get early access to upcoming versions of the iOS export module and can make sure it works as you need it to.