playMaker

Author Topic: PlayMaker 1.1 and iOS [FIXED]  (Read 11267 times)

Murcho

  • 1.2 Beta
  • Junior Playmaker
  • *
  • Posts: 54
PlayMaker 1.1 and iOS [FIXED]
« on: April 05, 2011, 04:25:28 AM »
Having some issues since upgrading to 1.1 and trying to play on the device.  Basically I can't get my app to launch properly.  I've tried several different configurations with no luck at all.

I'm getting a crash on launch, before anything gets rendered.  

Here's the log entry
Code: [Select]
* Assertion at object.c:1710, condition `class' not met

Program received signal:  “SIGABRT”.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3 (8F190)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
Previous frame inner to this frame (gdb could not unwind past this frame)
Previous frame inner to this frame (gdb could not unwind past this frame)

then the stacktrace from the main thread
Code: [Select]
Thread 1 (thread 11779):
#0  0x33d7ca1c in __pthread_kill ()
#1  0x36cb33ba in pthread_kill ()
#2  0x36cabbfe in abort ()
#3  0x00c088b8 in g_logv () at RakNetTypes.h:320
#4  0x00c088f8 in g_log () at RakNetTypes.h:320
#5  0x00bb4f1c in mono_class_vtable_full () at RakNetTypes.h:320
#6  0x00bb6be4 in mono_object_new () at RakNetTypes.h:320
#7  0x00b655bc in mono_exception_from_name_domain () at RakNetTypes.h:320
#8  0x00b65968 in mono_exception_from_name_msg () at RakNetTypes.h:320
#9  0x00b1fd38 in mono_jit_compile_method_with_opt () at RakNetTypes.h:320
#10 0x00b20658 in mono_jit_compile_method () at RakNetTypes.h:320
#11 0x00b1fcf4 in mono_jit_compile_method_with_opt () at RakNetTypes.h:320
#12 0x00b20658 in mono_jit_compile_method () at RakNetTypes.h:320
#13 0x00b30d98 in mono_magic_trampoline () at RakNetTypes.h:320
#14 0x006d89c8 in method_order_end () at RakNetTypes.h:320
#15 0x001b0efc in HutongGames.PlayMaker.FsmState:OnEnter (this=@0x1b0efc)
#16 0x001c5370 in HutongGames.PlayMaker.Fsm:EnterState (this=@0x1aa5d0, state=@0x2f95348)
#17 0x017c2000 in ?? ()
#18 0x001c50b4 in HutongGames.PlayMaker.Fsm:SwitchState (this=@0x6df854, toState=@0x0)
#19 0x001c369c in HutongGames.PlayMaker.Fsm:EnterStartState (this=@0x4db5a40)
#20 0x017c2000 in ?? ()
#21 0x001c3984 in HutongGames.PlayMaker.Fsm:Update (this=@0x4dafd10)
Cannot access memory at address 0x8
#22 0x001ceab0 in PlayMakerFSM:Update (this=)
#23 0x017c2000 in ?? ()
#24 0x00669d8c in (wrapper runtime-invoke) object:runtime_invoke_dynamic (param0=0, param1=0, param2=1, param3=803199908)
#25 0x00b20fd4 in mono_jit_runtime_invoke () at RakNetTypes.h:320
#26 0x00b20ea0 in mono_jit_runtime_invoke () at RakNetTypes.h:320
Previous frame inner to this frame (gdb could not unwind past this frame)

Something else worth noting is that if build stripping is turned off, it doesn't even compile, it provides two compile errors, both the same error, one for arm6 and one for arm7:
Code: [Select]
ld: ldr 12-bit displacement out of range (5780 max +/-4096) in _AudioComponentFindNext$stub in _AudioComponentFindNext$stub from /Users/DevA/Documents/Unity_3_Projects/NinjaSushiSVN/svn/Ninja Sushi Proto Jan2011 SVN/XCode2/build/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv7/mininjasushi
This compile error I tracked down to this thread in the forums http://forum.unity3d.com/threads/60487-Linker-error-when-building-project?highlight=ldr+displacement

Going to roll back now... :(
« Last Edit: October 06, 2011, 03:55:16 PM by alexchouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: PlayMaker 1.1 and iOS
« Reply #1 on: April 05, 2011, 04:04:47 PM »
Hi Murcho,

I have a theory...

When you run your game in the editor, do you get log info about updating acton data?

This happens when actions have changed since they were saved (e.g. parameters added or changed). The 1.1 update changed some old actions. However, in a deployed application, this data fixup is skipped - it is assumed that the saved action data is good. IOW, the project has been tested in the editor and saved.

Here's the wrinkle. Prefabs with old action data need to be "touched" to be set dirty and re-saved. E.g., open them in the playmaker editor, move a state a bit, and save... this will update the old action data. I'll fix this in the next update...

Can you try touching/re-saving the prefabs in your project to see if that fixes it?

You should be able to use the log to track down the prefabs that need updating...

Murcho

  • 1.2 Beta
  • Junior Playmaker
  • *
  • Posts: 54
Re: PlayMaker 1.1 and iOS
« Reply #2 on: April 05, 2011, 07:47:29 PM »
Just went through and made sure everything was touched/dirtied, then saved properly.  Got the same error :(.

I know that the opening scene is loading and firing the first frame due to some debug output into the console.  It only has one FSM in the scene, so I tried disabling it and rebuilding.  The scene managed to get further with it's loading, but still crashed, however the stack trace output something different.
Code: [Select]
Thread 1 (thread 11779):
#0  0x33d7ca1c in __pthread_kill ()
#1  0x36cb33ba in pthread_kill ()
#2  0x36cabbfe in abort ()
#3  0x00ca35e8 in FMOD::SystemI::createChannelGroupInternal ()
#4  0x00ca3628 in FMOD::SystemI::createChannelGroupInternal ()
#5  0x00c4fc4c in FMOD::SystemI::createChannelGroupInternal ()
#6  0x00c51914 in FMOD::SystemI::createChannelGroupInternal ()
#7  0x00c002ec in FMOD::SystemI::createChannelGroupInternal ()
#8  0x00c00698 in FMOD::SystemI::createChannelGroupInternal ()
#9  0x00bbaa68 in FMOD::SystemI::createChannelGroupInternal ()
#10 0x00bbb388 in FMOD::SystemI::createChannelGroupInternal ()
#11 0x00bbaa24 in FMOD::SystemI::createChannelGroupInternal ()
#12 0x00bbb388 in FMOD::SystemI::createChannelGroupInternal ()
#13 0x00bcbac8 in FMOD::SystemI::createChannelGroupInternal ()
#14 0x00777b08 in start ()

This kind of starts to tell me this might be a Unity issue, however I still believe its being caused by the update in PlayMaker due to the series of events that has unfolded. 

I'm going to try a couple of other things before calling it quits on this.  I'll post results.




Murcho

  • 1.2 Beta
  • Junior Playmaker
  • *
  • Posts: 54
Re: PlayMaker 1.1 and iOS
« Reply #3 on: April 05, 2011, 07:55:42 PM »
I should also probably add that I get this message spamming my log when I load a new scene.  This has happened for quite some time though, not sure if it relevant.  
Code: [Select]
Symbol file /private/var/mobile/Applications/0E915595-BE61-497F-81C6-334DB30CE4D8/xxxxxxxxxxx.app/Data/Managed/System.dll.mdb doesn't match image /private/var/mobile/Applications/0E915595-BE61-497F-81C6-334DB30CE4D8/xxxxxxxxxxx.app/Data/Managed/System.dll

Murcho

  • 1.2 Beta
  • Junior Playmaker
  • *
  • Posts: 54
Re: PlayMaker 1.1 and iOS
« Reply #4 on: April 05, 2011, 08:18:22 PM »
Just tried adding a blank scene and just building that from the same project, and it loads up fine.

Then tried adding one FSM to the scene with no actions on it, and that appears to have loaded up fine.

I then added a "Wait" action to the FSM in the scene, which fired and transitions to another state after 1 second.  This caused the device to crash with the same FMOD::SystemI::createChannelGroupInternal () error as above.

I then removed the "Wait" action, and replaced it with a "Get Owner" action, just to test it wasn't specific to the "Wait" action.  Same FMOD::SystemI::createChannelGroupInternal () error and crash.

I then removed all actions from the FSM, but left it with two states connected with a FINISHED transition event.  This loaded and ran properly on the device.

Hopefully this can help work out what is wrong here.

Murcho

  • 1.2 Beta
  • Junior Playmaker
  • *
  • Posts: 54
Re: PlayMaker 1.1 and iOS
« Reply #5 on: April 05, 2011, 08:43:40 PM »
OK, so last test before I roll back.  I set the initial state of the FSM to have no actions or transitions.  I then setup a second state with a "Wait" action that gets triggered by a global event.  Then I wrote a quite script to wait a second, then fire the event in the FSM via "Fsm.Event("event name")".

The scene loaded fine, and it updated properly (tested with log output) until the global event was fired.  This then caused the FMOD::SystemI::createChannelGroupInternal () error to fire!

So basically I can add an FSM to the scene and it loads and works properly until an Action attempts to execute.

Murcho

  • 1.2 Beta
  • Junior Playmaker
  • *
  • Posts: 54
Re: PlayMaker 1.1 and iOS
« Reply #6 on: April 05, 2011, 09:01:40 PM »
OK, I've tracked it down to the Build Stripping Level settings.

Setting the level to "Use micro mscorlib" causes all of these issues.  There is probably some "Over optimization" happening there.

Setting the level to either "Strip assemblies" or "Strip ByteCode" seems to allow the system to run properly.

Setting the level to "Disabled" causes the compile to fail.  I listed earlier in the thread the cause of this.  Basically too many assemblies.  This should be marked as important as it means PlayMaker won't work on iOS Basic licenses and Build Stripping is disabled.

This should possibly be made a sticky in the iOS section until the root of the issue is tracked down and fixed?

Pleasuremaker

  • Guest
Re: PlayMaker 1.1 and iOS
« Reply #7 on: April 05, 2011, 09:11:33 PM »
OK, I've tracked it down to the Build Stripping Level settings.

Setting the level to "Use micro mscorlib" causes all of these issues.  There is probably some "Over optimization" happening there.

Setting the level to either "Strip assemblies" or "Strip ByteCode" seems to allow the system to run properly.

Setting the level to "Disabled" causes the compile to fail.  I listed earlier in the thread the cause of this.  Basically too many assemblies.  This should be marked as important as it means PlayMaker won't work on iOS Basic licenses and Build Stripping is disabled.

This should possibly be made a sticky in the iOS section until the root of the issue is tracked down and fixed?

I was going to ask you about that exactly. Thank you for confirming it already.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: PlayMaker 1.1 and iOS
« Reply #8 on: April 06, 2011, 12:27:28 AM »
Thanks for all the digging Murcho!

I'll look into this asap.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: PlayMaker 1.1 and iOS
« Reply #9 on: April 06, 2011, 01:33:43 AM »
Couple of questions:
Are you using any other iOS plugins?
Do the sample scenes imported into an empty scene compile okay with stripping disabled?

Murcho

  • 1.2 Beta
  • Junior Playmaker
  • *
  • Posts: 54
Re: PlayMaker 1.1 and iOS
« Reply #10 on: April 06, 2011, 04:42:03 AM »
I'm using the Native Toolkit plugin from Prime 31, heavily modified, however it is just a couple of scripts in C# and some post process build scripts.  All the grunt of that is done on the SDK side.

I haven't tried the sample scenes, as I don't have them included in the project.  Di you want them tested in the same project or a separate one?


Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: PlayMaker 1.1 and iOS
« Reply #11 on: April 06, 2011, 10:39:26 PM »
The samples compile ok for me with Stripping disabled. So ideally I'd like the simplest test case that breaks it... IOW, what I need to do on my end to reproduce your crash... or if you can send me your project (and an NDA if you want).

scritch

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 11
Re: PlayMaker 1.1 and iOS
« Reply #12 on: July 01, 2011, 09:53:57 PM »
hi.

So I just experienced this crash w/ the exact same error output.
In my case, I had a perfectly fine working game w/ playmaker running in it.
I added the Flurry plugin from Prime31, and this caused the problem.

Changing the stripping level did NOT fix it, on any setting.

I haven't attempted to see if removing any existing fsms solves it yet. 
Was hoping somebody had a better lead on the cause of this?

scritch

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 11
Re: PlayMaker 1.1 and iOS
« Reply #13 on: July 01, 2011, 09:57:13 PM »
actually more info, it appears to be the flurry lib itself when added to the project causes the problem...
i stubbed out all of prime31's flurry linkup code andit still crashed until i removed the actually flurry lib.  DOH!