HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log inLog in  

Share | 
 

 SPK_Copy issue in iOS

View previous topic View next topic Go down 
AuthorMessage
TBurnett



Messages : 8
Date d'inscription : 2013-01-29

PostSubject: SPK_Copy issue in iOS   Tue Jan 29, 2013 10:45 pm

I have replaced my particle system with Spark (well done guys, it is really nice) in my latest game and refactored the GL_Quad list into GL_Triangles for use with GL ES 1.1. That all works in my ES simulator on my PC. I made a makefile and compiled Spark for iOS and can load a particle system within my game. However, when I create a system through SPK_Copy it cores and I get no trace back. I've seen that some others have ported to iOS, any ideas on what is going on?
Thomas.
Back to top Go down
View user profile
Juff
Developer


Messages : 539
Date d'inscription : 2009-07-14
Age : 34

PostSubject: Re: SPK_Copy issue in iOS   Wed Jan 30, 2013 9:09 am

Hi,

does it crash with a minimal system ?
First thing you can try is copy a system with a Null renderer and see if it crashes to check if the issue is on your GLES port side.
You can also post here the creation code of the system you're copying.
Back to top Go down
View user profile http://spark.developpez.com
TBurnett



Messages : 8
Date d'inscription : 2013-01-29

PostSubject: Re: SPK_Copy issue in iOS   Wed Jan 30, 2013 9:43 am

Yes, I tried a very small system and it crashes always in the same spot. I believe it has something to do with the visibility of the _dynamic_cast, but I'm not sure. I've tried a few compiler settings, but continue to get the same crash. I'll see if I can post a stack trace tonight when I get home.
Back to top Go down
View user profile
Juff
Developer


Messages : 539
Date d'inscription : 2009-07-14
Age : 34

PostSubject: Re: SPK_Copy issue in iOS   Thu Jan 31, 2013 6:45 pm

Have you tried to recompile the lib in debug mode and use the debugger ?
So it crashes with a minimal system but does it crash with an empty system (a system with no groups) ?
Every spark elements in the system you are copying are created with a call to their static method "create" and not directly with a new ?
Back to top Go down
View user profile http://spark.developpez.com
TBurnett



Messages : 8
Date d'inscription : 2013-01-29

PostSubject: Upgrades iOS SDK   Sat Feb 02, 2013 11:53 am

I've been meaning to post a PNG of the error, but now (once again) I have to rebuild the my libraries for the latest iOS update. May take a few days. Sorry. I will try the empty system. I'm still thinking that I'm not compiling Spark correctly for including _dynamic_cast. I'll post again in a few days.
T.
Back to top Go down
View user profile
TBurnett



Messages : 8
Date d'inscription : 2013-01-29

PostSubject: Re: SPK_Copy issue in iOS   Sun Feb 03, 2013 12:23 am

Cores in the same place with a empty system. Having trouble posting an image....
Back to top Go down
View user profile
Juff
Developer


Messages : 539
Date d'inscription : 2009-07-14
Age : 34

PostSubject: Re: SPK_Copy issue in iOS   Sun Feb 03, 2013 1:47 am

Maybe rtti is not enabled... but it should be enabled by default i think. At least that the case for most compilers.

A workaround you can do is recompile SPARK by replacing dynamic_cast to static_cast. It should be quite safe... I should add a debug define for that.
Back to top Go down
View user profile http://spark.developpez.com
TBurnett



Messages : 8
Date d'inscription : 2013-01-29

PostSubject: Re: SPK_Copy issue in iOS   Tue Feb 05, 2013 10:35 pm

I did replace all the dynamic_casts with static_cast (global search and replace) and I'm still getting a core dump with dynamic_cast within SPK::SPKFactory::copy. I've grepped both the windows and iOS binaries and it is still there in the binaries, but not anywhere in the SPARK source. Juff, can you send me an email at crap @ schoonertesha dot net. I'd like to send you the screen shot. Has anyone got SPARK to work with llvm compiler for iOS 6? The SPARK code is amazing clean, this should just work.
T.
Back to top Go down
View user profile
TBurnett



Messages : 8
Date d'inscription : 2013-01-29

PostSubject: Re: SPK_Copy issue in iOS   Tue Feb 05, 2013 10:50 pm

As far as I can tell, it is occurring in libc++abi.dylib in both the dynamic and static versions of SPARK. I've been read a bunch of articles that suggest avoiding dynamic_cast with llvm.
T.
Back to top Go down
View user profile
Juff
Developer


Messages : 539
Date d'inscription : 2009-07-14
Age : 34

PostSubject: Re: SPK_Copy issue in iOS   Wed Feb 06, 2013 7:07 am

How can a program crash on a piece of code you re supposed to have replaced ? Are you sure everything was well recompiled ?
Back to top Go down
View user profile http://spark.developpez.com
TBurnett



Messages : 8
Date d'inscription : 2013-01-29

PostSubject: Re: SPK_Copy issue in iOS   Sat Feb 09, 2013 1:41 pm

I finally got SPARK to work under iOS. Had to replace all dynamic casts with static casts and include the SPARK code into my project. For some reason, when I compiled SPARK as a library, I always had a dynamic cast. I suspect that XCode was doing some funkly library management behind the scenes, I don't know, frustrating....
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: SPK_Copy issue in iOS   Today at 10:12 am

Back to top Go down
 
SPK_Copy issue in iOS
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Issue - Selenium checks object in some cache
» Got My Copy of Nintendo Power's Final Issue!
» Pop-up issue with Selenium RC in IE7 testing
» Tutorial for how to use storeEval command to get property of an element.
» Page load issue

Permissions in this forum:You cannot reply to topics in this forum
 :: English Forum :: Questions (en)-
Jump to: