1
NGUI 3 Support / Re: NGUI 3.0.8 fx2 null reference excpetion in UIDrawCall with fix
« on: January 07, 2014, 03:56:25 PM »How did you even get to the state where draw call is null? What destroyed it? Only UIDrawCall is capable of destroying draw calls, and it only always removes the draw call from the active and inactive lists.
I want to say I just ran into this issue and all I did was upgrade from 3.0.8 f6 to f7. Unity 4.2.2 and device is a Nexus 5 running 4.4.2
This happens when i use the android back button to quit the app.
Unity Log Below:
I get the error itself regarding the NullRef 4 times
- I/Unity (24487): time to quit..
- I/Unity (24487): windowFocusChanged: false
- I/Unity (24487): onPause
- I/Unity (24487): NullReferenceException
- I/Unity (24487): at UnityEngine.Component.get_gameObject () [0x00000] in <filename unknown>:0
- I/Unity (24487): at UIDrawCall.Destroy (.UIDrawCall dc) [0x0000a] in C:\Projects\GCSlotzMW\Assets\NGUI\Scripts\Internal\UIDrawCall.cs:693
- I/Unity (24487): at UIPanel.OnDisable () [0x00007] in C:\Projects\GCSlotzMW\Assets\NGUI\Scripts\UI\UIPanel.cs:712
If i modify the Destroy() part to check for dc != null then i end up with:
- I/Unity (24816): time to quit..
- I/Unity (24816): windowFocusChanged: false
- I/Unity (24816): onPause
- I/Unity (24816): NullReferenceException
- I/Unity (24816): at UnityEngine.Component.get_gameObject () [0x00000] in <filename unknown>:0
- I/Unity (24816): at UIDrawCall.ClearAll () [0x00026] in C:\Projects\GCSlotzMW\Assets\NGUI\Scripts\Internal\UIDrawCall.cs:651
- I/Unity (24816): at UIDrawCall.ReleaseAll () [0x00000] in C:\Projects\GCSlotzMW\Assets\NGUI\Scripts\Internal\UIDrawCall.cs:663
- I/Unity (24816): at UIPanel.OnDisable () [0x00054] in C:\Projects\GCSlotzMW\Assets\NGUI\Scripts\UI\UIPanel.cs:718
If i then modify the ClearAll() part to check for dc != null then i end up with:
- I/Unity (25112): time to quit..
- I/Unity (25112): windowFocusChanged: false
- I/Unity (25112): onPause
- I/Unity (25112): NullReferenceException
- I/Unity (25112): at UnityEngine.Component.get_gameObject () [0x00000] in <filename unknown>:0
- I/Unity (25112): at UIDrawCall.ReleaseAll () [0x00025] in C:\Projects\GCSlotzMW\Assets\NGUI\Scripts\Internal\UIDrawCall.cs:671
- I/Unity (25112): at UIPanel.OnDisable () [0x00054] in C:\Projects\GCSlotzMW\Assets\NGUI\Scripts\UI\UIPanel.cs:718
And then we modify the ReleaseAll() part to check for dc != null and i end up with no errors:
