Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Crash when run on IOS device
#1
Hi

I'm getting an exception when the scene start in Xcode. The scene runs fine in the editor and the 2 objects following a spline all
work fine. but as soon as I try and run on IOS device it crashes with this error:

NullReferenceException: A null value was found where an object instance was required.
  at FluffyUnderware.DevTools.UnityEventEx`1[T0].HasListeners () [0x00000] in <filename unknown>:0 
  at FluffyUnderware.Curvy.Controllers.SplineController.BindEvents () [0x00000] in <filename unknown>:0 
 
(Filename: currently not available on il2cpp Line: -1)

NullReferenceException: A null value was found where an object instance was required.
  at FluffyUnderware.DevTools.UnityEventEx`1[T0].HasListeners () [0x00000] in <filename unknown>:0 
  at FluffyUnderware.Curvy.Controllers.SplineController.BindEvents () [0x00000] in <filename unknown>:0 
UnityEngine.UnhandledExceptionHandlerTonguerintException(String, Exception)
UnityEngine.UnhandledExceptionHandler:HandleUnhandledException(Object, UnhandledExceptionEventArgs)
 
(Filename: currently not available on il2cpp Line: -1)

The crash is in your HasListeners function, when I comment it out the spline follower it all works fine.

    public bool HasListeners()
       {
#if false
           if (mCallsCount == null)
           {
               var fi = typeof(UnityEventBase).FieldByName("m_Calls", false, true);
               if (fi != null)
               {
                   mCallerList = fi.GetValue(this);
                   if (mCallerList != null)
                       mCallsCount = mCallerList.GetType().PropertyByName("Count").GetGetMethod();
               }
           }
           if (mCount == -1)
           {
               if (mCallerList != null && mCallsCount != null)
                   mCount = (int)mCallsCount.Invoke(mCallerList, null); //.GetValue(mCallerList, null);
               mCount += GetPersistentEventCount();
           }
           return (mCount > 0);
#endif
           return (mCount > 0);
       }






Any ideas?
Reply


Messages In This Thread
Crash when run on IOS device - by arkon3 - 12-02-2017, 05:53 AM
RE: Crash when run on IOS device - by Lingumi - 12-06-2017, 12:53 PM
RE: Crash when run on IOS device - by hawken - 12-15-2017, 12:26 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Unity Play Mode Crash In Example 4 etoreo 2 4 01-05-2023, 10:46 PM
Last Post: etoreo
  Unity Crash on Curvy Default Event Handler Trainzland 6 10,622 01-21-2016, 12:25 AM
Last Post: Trainzland
  Unity Freeze (Crash) rangerori 1 4,580 02-03-2014, 03:54 PM
Last Post: slester

Forum Jump: