GLB SPRCOLL collision causes iPad to crash...

Previous topic - Next topic

AlienMenace

Okay, well this is rather fun. I have finished  my game, compiled it for HP Touchpad and tested (submitted to the store as well)... has never crashed on that platform once. Very stable. Compiled it for Kindle Fire... runs good... no crashes or anything like that. Tested on Android, a little slow but stable... no crashes. Now today I compile it for my iPad2 and it runs for a about 30 seconds then crashes each and every time. Same code, nothing has changed at all between my Touchpad (never crashes) build and my iPad build (crashes every time). XCode is kind enough to report back the following:

SPRCOLL:
0x00007630  <+0000>  push   {r4, r7, lr}
0x00007634  <+0004>  mov   r12, r0
0x00007638  <+0008>  ldr   r0, [pc, #60]   ; 0x767c <_ZN11__GLBASIC__7SPRCOLLEiiiiii+76>
0x0000763c  <+0012>  add   r7, sp, #4   ; 0x4
0x00007640  <+0016>  sub   sp, sp, #12   ; 0xc
0x00007644  <+0020>  add   lr, pc, r0
0x00007648  <+0024>  ldr   r0, [lr]
0x0000764c  <+0028>  mov   r4, r1
0x00007650  <+0032>  str   r2, [sp]
0x00007654  <+0036>  ldr   r1, [sp, #28]
0x00007658  <+0040>  ldr   r2, [sp, #24]
0x0000765c  <+0044>  str   r1, [sp, #8]
0x00007660  <+0048>  str   r2, [sp, #4]
0x00007664  <+0052>  mov   r1, r12
0x00007668  <+0056>  mov   r2, r3
0x0000766c  <+0060>  mov   r3, r4
0x00007670  <+0064>  bl   0x21ec4 <_ZN14OpenGLRainbows15SpriteCollisionEiiiiii>
0x00007674  <+0068>  sub   sp, r7, #4   ; 0x4
0x00007678  <+0072>  pop   {r4, r7, pc}
0x0000767c  <+0076>  andeq   r3, sp, r12, asr r7

I ran into this issue several months ago with a completely different build (I rewrote it to avoid using anim-to-nonanim sprite collisions checking) but have focused on porting over to Android and now I am back to iPad and am trying to build my game for submission to the appstore. Obviously, this is a show stopper.
Apps published: 3

AlienMenace

I replaced all my calls to the built-in SPRCOLL with this routine:

Code (glbasic) Select

FUNCTION SPRITECOLL: id1#, x1#, y1#, id2#, x2#, y2#
LOCAL xw1, yh1, xw2, yh2
GETSPRITESIZE id1#, xw1, yh1
GETSPRITESIZE id2#, xw2, yh2

IF BOXCOLL(x1#, y1#, xw1, yh1, x2#, y2#, xw2, yh2)
RETURN 1
ELSE
RETURN 0
ENDIF

ENDFUNCTION


Not optimal as not all my objects are square but so far I was able to play an entire game (about 10 minutes or so) without any lock ups. More testing...
Apps published: 3

Kitty Hello

Can you post the console output, please?

AlienMenace

Not much information in there when it freezes but here you go:

Quote
[Session started at 2011-11-28 08:54:08 -0800.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1510) (Fri Oct 22 04:12:10 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i386-apple-darwin --target=arm-apple-darwin".tty /dev/ttys000
Loading program into debugger...
Program loaded.
target remote-mobile /tmp/.XcodeGDBRemote-2818-25
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache
mem 0x40000000 0xffffffff none
mem 0x00000000 0x0fff none
run
Running...
[Switching to thread 11779]
[Switching to thread 11779]
sharedlibrary apply-load-rules all
continue
2011-11-28 08:55:16.472 iPhone[1124:707] *** __NSAutoreleaseNoPool(): Object 0x409c10 of class NSCFString autoreleased with no pool in place - just leaking
init with frame.
Scaleing available: self.contentScaleFactor = 1.000000
desktop backing: 768 x 1024
mainScreen: 768x1024
slaunch ok
-applicationDidBecomeActive    -> unpause
timer
rbow
rbow init
Rbow::SetScreen( 768,1024)
get accurate timer - 1st call
flip - 1st call
BGRA ext supported
Texture size limit: 2048
init fbo
2D VP
OGRB init [OK]
Cptn
Network
Input
Window mode
Create DXin
reptr
getexe
cd
set cdir to: /var/mobile/Applications/176217F3-D56E-4C49-856F-E41140369D6B/iPhone.app
exepath=curdir= /var/mobile/Applications/176217F3-D56E-4C49-856F-E41140369D6B/iPhone.app
AudioStreamBasicDescription:  2 ch,  44100 Hz, 'lpcm' (0x00000C2C) 8.24-bit little-endian signed integer, deinterleaved
Init Finalized
Rbow::SetScreen( 768,1024)
set cdir to: Media
Error opening file: -43
Error opening file: -43
Error loading file info: -43
Error loading looping file info: -43
Can' init audio. Retcode: -43
request: fopen("/var/mobile/Applications/176217F3-D56E-4C49-856F-E41140369D6B/Documents/qx_prefs_an.dat", "rb") failed
Loading Music: sound/Track.mp3
[Switching to thread 13059]
Status: 0
[Switching to thread 13059]
Program received signal:  "EXC_BAD_ACCESS".
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3 (8F191)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
Apps published: 3

Kitty Hello

Make a very small project that crashes and send it to me :(

Omadan

Now that you are onto this I would like to add that the latter also happened to me. Any animcolls was crashing the program. I replaced allmy collisions with boxcolls and game had no problems at all. If I have time to compile something I will Gernot, anything to help you and your fabolous work :) Cheers

regards
- Joe
Top Arcade Apps - Best game for mobiles and computers

http://www.toparcadeapps.com

AlienMenace

Apps published: 3

AlienMenace

#7
Well, since I haven't heard back from you I will just post the project here. This project is nothing fancy and pretty straight-forward. It locks up pretty much every time on my iPad2 after the first few seconds.

[attachment deleted by admin]
Apps published: 3

Kitty Hello

Found it last night. It's a bug. Update soon.

AlienMenace

Sir... you are just full of surprises!  :)
Apps published: 3

AlienMenace

Add the Kindle Fire to this list as well... same exact issues as the iPad with collisions crashing. Replaced SPRCOLL cammands with my own BOXCOLL-based commands, now.. no more crashing. Any ETA on a fix?

Thank you.
Apps published: 3

MrTAToad


spicypixel

Oooh this sounds perfect I was getting crashes which I could only put down to collisions also so I'm hoping there is an update for when I webcheck :D
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

AlienMenace

Kindle Fire collisions still crashing, mouse coordinates still wrong and screen size still reports incorrect size.
Apps published: 3

Kitty Hello

clean the project and rebuild it.
If it still crashes, give an example program. Or is it still the same one?