Playmaker Forum

Playmaker Help & Tips => iOS Help => Topic started by: treborjones on March 21, 2017, 02:53:30 PM

Title: iOS Build to device error
Post by: treborjones on March 21, 2017, 02:53:30 PM
Hi folks,

I'm getting the below error when building to device. It doesn't occur when running in editor. I'm running 5.5.2 and Playmaker 1.8.3

Any help greatly appreciated. I've tried deleting the action and reimporting it but didn't seem to make any difference.

Apologies for large error text!

Error Loading Action: State 1 : HutongGames.PlayMaker.Actions.IntCompare : integer1
System.ArgumentOutOfRangeException: ArgRange_Array
Parameter name: index
  at System.Text.UTF8Encoding.InternalGetCharCount (System.Byte[] bytes, Int32 index, Int32 count, UInt32 leftOverBits, UInt32 leftOverCount, System.Object provider, System.Text.DecoderFallbackBuffer& fallbackBuffer, System.Byte[]& bufferArg, Boolean flush) [0x00021] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/UTF8Encoding.cs:459
  at System.Text.UTF8Encoding.GetCharCount (System.Byte[] bytes, Int32 index, Int32 count) [0x00004] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/UTF8Encoding.cs:687
  at System.Text.Encoding.GetChars (System.Byte[] bytes, Int32 index, Int32 count) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/Encoding.cs:328
  at System.Text.Encoding.GetString (System.Byte[] bytes, Int32 index, Int32 count) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/Encoding.cs:751
  at System.Text.UTF8Encoding.GetString (System.Byte[] bytes, Int32 index, Int32 count) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Text/UTF8Encoding.cs:1052
  at HutongGames.PlayMaker.FsmUtility.ByteArrayToFsmInt (HutongGames.PlayMaker.Fsm fsm, System.Byte[] bytes, Int32 startIndex, Int32 totalLength) [0x00000] in c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\FsmUtility.cs:401
  at HutongGames.PlayMaker.ActionData.GetFsmInt (HutongGames.PlayMaker.Fsm fsm, Int32 paramIndex) [0x00064] in c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1572
  at HutongGames.PlayMaker.ActionData.LoadActionField (HutongGames.PlayMaker.Fsm fsm, System.Object obj, System.Reflection.FieldInfo field, Int32 paramIndex) [0x000e9] in c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1007
  at HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.Context context, Int32 actionIndex) [0x00264] in c:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:934
UnityEngine.Debug:LogError(Object)
HutongGames.PlayMaker.ActionData:CreateAction(Context, Int32) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ActionData.cs:939)
HutongGames.PlayMaker.ActionData:LoadActions(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ActionData.cs:768)
HutongGames.PlayMaker.FsmState:LoadActions() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:117)
HutongGames.PlayMaker.Fsm:InitData() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1653)
PlayMakerFSM:OnAfterDeserialize() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:1110)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()
Title: Re: iOS Build to device error
Post by: jeanfabre on March 21, 2017, 11:06:21 PM
Hi,

 uhm.. very odd error. Are you using some SetProperties or GetProperties

Is your project old? what dataversion do you have for that Fsm ( in the Fsm inspector inside the PlayMaker Editor).

 Bye,

 Jean
Title: Re: iOS Build to device error
Post by: treborjones on March 22, 2017, 12:26:37 AM
I am using Get and Set properties in a few places. I had built to device a while ago without any problems though, that was on an older unity and playmaker version.

The project has been around for a while and I have fairly recently updated it...

Data version: 1

There are a couple of very similar errors following the one I shared. All in HutongGames.PlayMaker.Actions.IntCompare.
Title: Re: iOS Build to device error
Post by: jeanfabre on March 22, 2017, 01:38:20 AM
Hi,

 ok, I'll run some tests locally with old fsm with dataversion 1.

Bye,

 Jean
Title: Re: iOS Build to device error
Post by: treborjones on March 22, 2017, 05:33:46 AM
Ok thanks a lot. I'm just trying to build a smaller project to see if I can create repro steps easily for you. If there's anything else I can do to help solve please let me know.
Title: Re: iOS Build to device error
Post by: treborjones on March 22, 2017, 06:36:39 AM
Hello again, I found another issue (me being stupid) and this was actually the cause of the game not running successfully.

The errors mentioned are still present but they don't prevent the build to device from running. So lower priority, feel free to let it slide if nobody else is reporting similar problems.

Title: Re: iOS Build to device error
Post by: jeanfabre on March 22, 2017, 07:07:45 AM
Hi,

 Thanks for the update. I am not sure what happened, but if you still have this, do get back to me.

 Bye,

 Jean