playMaker

Author Topic: Crashs on iOS Devices when using SetParent- / SetTransformParent-Actions  (Read 3210 times)

Praaug

  • Playmaker Newbie
  • *
  • Posts: 2
Hey there,
after upgrading from Unity 5.6.1 to 2017.3.0 we got some "random" crashes where the game just closes itself.

We had the crashes on iOS and Android Devices. Because there were no Error Messages in the Console I used xCode to debug the crash. Turns out the crashes were/are "EXC_BAD_ACCESS" when using "SetParent".

After some reading on the Unity Forums and here in the forums I replaced all "SetParent"-Actions with the "SetTransformParent"-Actions because all Actions were used on UIs and therefor with RectTransforms rather than normal Transforms.

After testing this again, the crashes are gone on Android Devices, but sometimes they're still there on iOS Devices.
Currently I have no way of reproducing the crash 100% of the time.
One time the Actions work fine, and the next time I get the crash again.

The FSM that currently crashes the most is:
https://drive.google.com/file/d/163k0QWQe7Ecs5WIMdlLLcxtO4COoVmJT/view?usp=sharing
In xCode I get this callstack:
https://drive.google.com/file/d/1IcPJPCTFS1RqVcKjUwfT_pfvOt-ABktx/view?usp=sharing

The code where the fsm is enabled is the following:
Code: [Select]
this.fsm.enabled = false;
this.fsm.SetFsmTemplate(this.FehlPassFsm);
this.fsm.FsmVariables.FindFsmGameObject(Angreifer).Value = to;
this.fsm.FsmVariables.FindFsmGameObject(FlyupTextParent).Value = this.FlyupTextParentTransform.gameObject;
this.fsm.enabled = true;

Currently I have no Idea how to fix this problem.
Maybe you guys can help me finding out what happens here and what causes the crash.
« Last Edit: January 25, 2018, 01:50:29 AM by Praaug »

Praaug

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Crashs on iOS Devices when using SetParent- / SetTransformParent-Actions
« Reply #1 on: January 26, 2018, 05:59:43 AM »
Okay looks like it has nothing todo with Playmaker and is a bug on Unity Side.
https://issuetracker.unity3d.com/issues/ios-player-crashes-at-shouldupdatetransformbefore-when-instantiating-gameobjects-into-a-scrollrect

I hope the fix is in the next patch release.