Author Topic: Unity 5.2 crash (focus/save)  (Read 18641 times)

mdeletrain

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 71
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #15 on: September 29, 2015, 09:58:25 AM »
Aren, I saw your last commit that 'fixes' this crash, alongside a comment that advise stopping using dynamic fonts.

I really appreciate your work but here you are starting to break (the last commit makes labels flicker for one frame with garbage each time a font atlas needs to be expanded) a feature that really is necessary to some of us. Think about Chinese fonts of varying size for unpredictable text, and please tell me if you have better options that dynamic fonts. Standard texture atlases are way to big, distance field improves that a lot but are really a pain in the ... to generate, and does not always generate proper shapes.

I understand you frustration, but please don't break that feature. I'm in the process of trying to find a proper fix so that NGUI can use 'font changed' callbacks the way they are meant to, and hope you will be kind enough to integrate that fix again. I would be very please if we could talk about that privately.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #16 on: September 29, 2015, 04:14:34 PM »
I'm not the one that broke it though. Unity 5.2 update changed something in the font rebuilt callback, making it unstable. I'm open to suggestions on how to approach it better. Right now it seems either you get the flicker, or you get the crashes. Flicker seems the better choice. If you're stuck using dynamic fonts, I strongly advise not using Unity 5.2 until this is resolved.

YuliyF

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 11
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #17 on: September 30, 2015, 03:49:03 AM »
I'm using 5.1.4f1 + NGUI 3.9.2 + 3 dynamic fonts, all works fine (except Input.inputString work only on English)

mdeletrain

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 71
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #18 on: September 30, 2015, 08:48:04 AM »
I agree with flickering being the best option right now. Maybe the fix of updating panels form the OnFontChanged callback should be removed until a proper one is found : yet another bug has been filled that relates to this problem, this time with Unity 4.6.x.

poolts

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 0
  • Posts: 33
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #19 on: September 30, 2015, 05:30:58 PM »
I'm using Unity 5.2.1p1 + NGUI 3.9.3 and I'm constantly getting crashes, especially when saving (happens every time).

I'm also using dynamic fonts.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #20 on: October 01, 2015, 01:43:32 AM »
When you save the scene, Unity 5.2 wipes the dynamic font's texture, causing it to get rebuilt. NGUI subscribes to the "font changed" notification Unity sends out, and when it receives it it prompts the draw calls to get rebuilt for affected fonts. It all worked fine before, but in Unity 5.2 it now causes a crash. This is a Unity regression bug, so please keep reporting it to Unity so that they have a look at it and release a patch.

In general crash bugs = always a Unity issue. Even if any plugin is doing something wrong, Unity should never crash.

roady

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #21 on: October 01, 2015, 03:16:15 AM »
I've submitted my project to Unity as an bugg. Will add this info about the dynamic fonts.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #22 on: October 01, 2015, 03:23:49 AM »

roady

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #23 on: October 01, 2015, 04:01:56 AM »
I notice an error when using Unity 5.1.3, maybe it has something to do with it all???

1.) Deleted NGUI Folder
2.) Downloaded latest NGUI

NOTE:
NGUI/Editor files in package
FreeType.dylib (should it be named FreeType64.dylib)?

3.) NGUI -> Open -> Font Maker

Error: Assets/NGUI/Editor/FreeType64.dylib is missing

4.) Terminal goto Assets/NGUI/Editor/
   cp FreeType.dylib FreeType64.dylib
   Check that it has same permissions
   
5.) Back to Unity, now dialouge popup

Copying /Volumes/Work/Unity/xRockets/Assets/NGUI/Editor/FreeType64.dylib to /usr/local/lib/FreeType64.dylib: Permission denied

6.) Back to Terminal,
   sudo cp FreeType64.dylib /usr/local/lib/FreeType64.dylib
   
7.) Back to Unity
   Cancel the dialouge and now Font Maker looks good
   
8.) Select font
   Unity now crashes

My crash log https://dl.dropboxusercontent.com/u/27479515/forums/nguicrash1.txt

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #24 on: October 01, 2015, 05:44:06 AM »
@roady: Different issue.

NGUI doesn't come with a 64 bit FreeType dylib, only a 32 bit version of it. If it's what I think it is, the FreeType64 file is just a renamed 32 bit one, and it won't work. Someone needs to actually compile the 64 bit version by building FreeType on the Mac OS directly first.

Nightreaver

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 3
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #25 on: October 01, 2015, 02:00:28 PM »
Updated to the latest unity 5.2.1p2 and the crashes are gone! (at least for my save-crashes)

nekokiller

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #26 on: October 02, 2015, 01:16:14 AM »
Unity 5.2.1 + NGUI 3.9.2

always crash on save scene.

now fixed!

you have to fix the UILable.cs of UGUI 3.9.2

line 1139 : #if !UNITY_4_3 && !UNITY_4_5 && !UNITY_4_6

modified to : if !UNITY_4_3 && !UNITY_4_5 && !UNITY_4_6 && !UNITY_5



but there was another problem of using dynamic font on UILabel. ( I think it is bug of NGUI 3.9.2 )

so we also according to NGUI 3.8.0 and fix the code of UILabel 3.9.2 about the dynamic font delegate process 



betodeoliveira

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #27 on: October 03, 2015, 11:33:22 PM »
I've just updated my Unity to 5.2.1p2 and it still getting crashed when saving the scene..


roady

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #28 on: October 04, 2015, 05:20:09 AM »
I updated to Unity 5.2.1p2 and NGUI 4.9.4 (deleted NGUI folder first). Now it doesn't crash anymore. hurray

nekokiller

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Unity 5.2 crash (focus/save)
« Reply #29 on: November 04, 2015, 12:55:57 AM »
ngui 3.9.2 + unity 5.2.2p2 , work fine.

seems unity 5.2.2p2 fixed this crash problem.