Author Topic: Unity5 NGUI Non-Development Build Crashing  (Read 6949 times)

joeymaru

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 5
    • View Profile
Unity5 NGUI Non-Development Build Crashing
« on: February 25, 2015, 02:18:52 PM »
Hello!

Hopefully this is the right place for this, I couldn't find any other topics regarding my problem.

So I have updated to Unity5 and NGUI is having some issues running in a non-development build. Is anyone else experiencing this issue?

If I run build my game in development mode, NGUI seems to work just fine, but when I turn off development build, whenever I need a menu to pop up (using alpha tweening) the game hangs for a moment, then I get the spinning circle of doom on mac.

I think it only happens on objects that are hidden, my regular HUD that is always visible doesn't cause any problems and seems to work just fine.

If anyone has any suggestions, please let me know!

Thanks for your time! :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity5 NGUI Non-Development Build Crashing
« Reply #1 on: February 27, 2015, 04:40:58 AM »
IL2CPP?

joeymaru

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Unity5 NGUI Non-Development Build Crashing
« Reply #2 on: February 27, 2015, 11:30:11 AM »
Sorry I didn't know what that was until I googled it haha! I don't think so, no.

I upgraded from Unity 4 to Unity 5, So no code changes on my part.. Maybe during the upgrade something went wrong?
« Last Edit: February 27, 2015, 12:39:04 PM by joeymaru »

TestTubeGames

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: Unity5 NGUI Non-Development Build Crashing
« Reply #3 on: February 27, 2015, 05:22:20 PM »
I am having the same problem.  The game works fine in development mode, but crashed otherwise.  I've isolated it down a bit... now I can get the program to crash just by setting a single UILabel's gameobject to inactive in my game.  And it has been happening independently in two of my projects.  I don't know why this would be happening - but it seems connected to joeymaru's problem.

I haven't yet been able to reproduce it in a fresh project (having a single UILabel that I disable in an otherwise blank scene is not enough to do it).

The latest versions of everything. Unity 5 (rc3), building to Mac standalone.
« Last Edit: February 27, 2015, 09:30:41 PM by TestTubeGames »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity5 NGUI Non-Development Build Crashing
« Reply #4 on: March 01, 2015, 04:48:10 PM »
Anything related to crashes should be reported to Unity as a bug via the Help -> Report a Bug menu. Especially if it worked in a previous version of Unity.

joeymaru

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Unity5 NGUI Non-Development Build Crashing
« Reply #5 on: March 11, 2015, 11:11:04 AM »
Okay!

Thank you, I will report this to Unity! :)

graum

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: Unity5 NGUI Non-Development Build Crashing
« Reply #6 on: April 08, 2015, 11:37:25 AM »
I actually replicated this issue as well.  I had panels with a single button on each panel.  The buttons would instantiate the other panel and destroy the existing panel on click.  Making Standalone Mac Builds that were non-development would crash it with an unhandled null reference exception with no stack trace every time.  This still occurs in 5.0.1.

So I turned on "Debug" on the NGUI camera.. suddenly, no more crashing.. I thought maybe NGUI Debug was doing something that fixed whatever was happening.. nope.. I worked around the issue with a very simple fix.. very odd.. I added this bit of code onto a component that is never destroyed in my game, and non-development builds worked:

  1.         void OnGUI()
  2.         {
  3.                 GUI.contentColor = new Color(0f, 0f, 0f, 0f);
  4.                 GUILayout.Label ("Test");
  5.         }
  6.  

The label has to have something in it.. a blank label will not work.. but one that is invisible will.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity5 NGUI Non-Development Build Crashing
« Reply #7 on: April 09, 2015, 03:37:22 PM »
Please report it to Unity as it's obviously something on their end if such an odd hack makes it work.