Burs Error???

Monkey Targets Forums/iOS/Burs Error???

MikeHart(Posted 2011) [#1]
Hi folks,

I try to create an IOS App. Installed was XCode 4.01 with SDK 4.3 and now 3.26 with SDK 4.3. Now when I try to run a compiled app in the XCode Simulator, I get a Bus Error displayed in the simulator and the app crashes.

What could it be?

Cheers
Michael


dawlane(Posted 2011) [#2]
Installed was XCode 4.01 with SDK 4.3 and now 3.26 with SDK 4.3
I take it that you did uninstall XCODE 4 first before installing XCODE 3.26? Or did you do a customized install of 3.26?


MikeHart(Posted 2011) [#3]
I uninstalled it first. I even went so far that i installed osx newly on a different partion and installed 3.25 with sdk 4.2. Then i tried every version of monkey. Starting with #37 i get that error even with marks audiotest. Also Glfw crashes. There with an segmentation error. I think the audiopart is the problem.


dawlane(Posted 2011) [#4]
Are you trying to play any mp3,ogg files with the PlaySound function? Using mp3 in any thing other that Flash (don't know about Android) crashes the application. See what happens when you use wave (.wav) files.


MikeHart(Posted 2011) [#5]
I am playing wav files in my games. And I tried Mark's Audiotest which is located in the bananas samples of Monkey. Same results.


dawlane(Posted 2011) [#6]
Have you tried modifying Marks Audiotest so that it only load wav files? And do any of the other monkey samples crash? I did discover that I had to go directly to the xcode project file in the programs .build load it and make a few changes making sure that the correct SDK was being used and that the build setting were using Standard armv6/armv7 and execute the build from xcode.


anawiki(Posted 2011) [#7]
I'm using xcode 3.2.6 and iOS 4.3. I can test examples in iPad simulator, but my "real" game gives me the same "bus error" :(

Hopefully it's not something that will take weeks to fix.


marksibly(Posted 2011) [#8]
Hi,

If you email me the project+data I'll take a look at it.


anawiki(Posted 2011) [#9]
Thanks Mark! It's over 50MB of data, so I'll try to dig it myself. It looks like our game works only in HTML5 :D and fails on iOS and GLWF. Too bad it doesn't show any bugs except crashing on GLWF (in debug mode).

iPad pointed the bus error to this line of code:

Local _objName:String = String(_lista.First())

I guess there's something that fails to create _lista (which is list of strings) on anything else than HTML5. If I give up fixing it myself I'll send you an email :)


anawiki(Posted 2011) [#10]
So we fixed it, but it was a pain. We had something like this:

For Local i = 0 To _txt.Length()

to parse txt files. For some reason it did work on HTML5, but on GLWF and IOS it crashed without reporting any errors on GLWF. _txt.Length() should have -1 at the end, so we don't read out of scope with _txt[i]. For some reason _txt[i] didn't give errors even when you accessed it beyond array length.

The game crashed, because sometimes at the end of _txt[i] we had "weird" characters, that has been added to the lists, but those chars couldn't been parsed properly, so our parsing code was crashing misleading us for the reason of error.


marksibly(Posted 2011) [#11]
Hi,

Did you have 'Debug' enabled?

This should pick up all null object and array access errors on all targets.


anawiki(Posted 2011) [#12]
Yes, debug was enabled on both Mac and Win and it didn't catch reading from string beyond array length. Just hard crash.