Results 1 to 4 of 4

Thread: [iOS] crash in Surface::LoadRTTexture(unsigned char*)

  1. #1
    Serf
    Join Date
    Feb 2013
    Posts
    2

    Default [iOS] crash in Surface::LoadRTTexture(unsigned char*)

    Hi guys,

    lately I had a small break in developing stuff on P++, today after refreshing my small project I found an interesting crash on my iOS device. It's worth to mention that the same is working smoothly on Android JB devices, here're some more details about that crash:

    Exception Type: EXC_BAD_ACCESS (SIGBUS)
    Exception Codes: EXC_ARM_DA_ALIGN at 0x00784dda
    Crashed Thread: 0

    Thread 0 name: Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0 xxxxxxxx 0x0000d9b6 Surface::LoadRTTexture(unsigned char*) (Surface.cpp:298)
    1 xxxxxxxx 0x0000db5a Surface::LoadFileFromMemory(unsigned char*) (Surface.cpp:365)
    2 xxxxxxxx 0x0002cc1a SurfaceAnim::LoadFileFromMemory(unsigned char*) (SurfaceAnim.cpp:53)
    3 xxxxxxxx 0x0000f8c6 RTFont::Load(std::string) (RTFont.cpp:124)
    4 xxxxxxxx 0x000364d4 App::Init() (App.cpp:171)
    5 xxxxxxxx 0x0003198a -[EAGLView initWithCoder:] (EAGLView.mm:79)
    6 UIKit 0x367c7dc0 -[UIClassSwapper initWithCoder:] + 208
    7 UIKit 0x367c5810 UINibDecoderDecodeObjectForValue + 1692
    8 UIKit 0x367c508a -[UINibDecoder decodeObjectForKey:] + 86
    9 UIKit 0x367c59b2 -[UIRuntimeConnection initWithCoder:] + 146
    10 UIKit 0x367c5810 UINibDecoderDecodeObjectForValue + 1692
    11 UIKit 0x367c53e6 UINibDecoderDecodeObjectForValue + 626
    12 UIKit 0x367c508a -[UINibDecoder decodeObjectForKey:] + 86
    13 UIKit 0x367c314e -[UINib instantiateWithOwnerptions:] + 802
    14 UIKit 0x367cb1d2 -[NSBundle(UINSBundleAdditions) loadNibNamedwnerptions:] + 134
    15 UIKit 0x367f53a2 -[UIApplication _loadMainNibFileNamed:bundle:] + 30
    16 UIKit 0x3667e794 -[UIApplication _runWithURLayload:launchOrientation:statusBarStyle:statusBarH idden:] + 524
    17 UIKit 0x36626c34 -[UIApplication handleEvent:withNewEvent:] + 1000
    18 UIKit 0x366266c8 -[UIApplication sendEvent:] + 68
    19 UIKit 0x36626116 _UIApplicationHandleEvent + 6150
    20 GraphicsServices 0x31c4c5a0 _PurpleEventCallback + 588
    21 CoreFoundation 0x35f01680 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FU NCTION__ + 12
    22 CoreFoundation 0x35f00ee4 __CFRunLoopDoSources0 + 208
    23 CoreFoundation 0x35effcb2 __CFRunLoopRun + 642
    24 CoreFoundation 0x35e72eb8 CFRunLoopRunSpecific + 352
    25 CoreFoundation 0x35e72d44 CFRunLoopRunInMode + 100
    26 UIKit 0x3667d478 -[UIApplication _run] + 664
    27 UIKit 0x3667a2f4 UIApplicationMain + 1116


    I'm using LLVM 4.2 to compile my code, it doesn't happen with -O0 optimization turned on, my device is runnin' with 6.0.1 system.

    Does anybody meat the same problem? Thanks in advance.

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,376

    Default

    Hmm, just to verify, you've updated to the latest SVN version of p+, correct? I do remember an alignment issue that I fixed a while back after Apple changed up the compilers.
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Serf
    Join Date
    Feb 2013
    Posts
    2

    Default

    Seth, do you remember the # of this submission with the fix for that misalignment problem?
    after coming back to the Project I had to sync couple of files to make the target mainly compatible with retina 4" display, my shared source code contains many local modifications so I won't to upgrade all of them...

  4. #4
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,376

    Default

    Looks to be revision 704 in Surface.cpp:

    * (iOS) Had a very strange issue where I was getting mem alignement access errors loading textures, but only on iPhone 3GS and older, and only in release mode. This fixes it
    Seth A. Robinson
    Robinson Technologies

Similar Threads

  1. Network / NetGame / add unsigned char and char into NetGameEventValue
    By Zenol in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 11-12-2012, 11:28 AM
  2. 2.2: get_section_names returning extra char
    By Shulberry in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 01-08-2012, 06:06 PM
  3. How can you draw a sprite or a surface onto another surface?
    By alexv1 in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 02-26-2009, 03:36 PM
  4. draw surface onto another surface before drawing portion to the screen
    By alexv1 in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 02-25-2009, 12:19 PM
  5. about button surface
    By DavinciZhe in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 11-06-2007, 03:49 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •