Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Hard crash opening scene in 2018.2

Discussion in 'Global Illumination' started by stgs73, Jul 24, 2018.

  1. stgs73

    stgs73

    Joined:
    Mar 23, 2015
    Posts:
    59
    Hi, we're chasing down a crash in 2018.1.6/1.8/1.9 when baking a scene whilst writing out lightmapping data to file...
    We thought we'd try 2018.2.0f2 and we receive a hard crash opening the scene before lightmapping.

    Unloading 27 unused Assets to reduce memory usage. Loaded Objects now: 13121.
    Total: 7.956470 ms (FindLiveObjects: 1.418364 ms CreateObjectMapping: 0.677300 ms MarkObjects: 5.788662 ms DeleteObjects: 0.071699 ms)

    Receiving unhandled NULL exception
    Obtained 27 stack frames.
    #0 0x00000100b792a9 in CalculateSurfaceArea(Matrix4x4f const&, std::__1::vector<unsigned int, stl_allocator<unsigned int, (MemLabelIdentifier)1, 16> > const&, dynamic_array<Vector3f, 0ul>&, MinMaxAABB&)
    #1 0x00000100b79623 in CalculateNormalizedLightmapArea(Mesh*)
    #2 0x00000100b53c2a in MeshRenderer::GetCachedNormalizedLightmapArea()
    #3 0x000001016b4f5a in ExtractGIInstances(dynamic_array<PPtr<MeshRenderer>, 0ul> const&, dynamic_array<PPtr<Terrain>, 0ul> const&, dynamic_array<GeometryData, 0ul>&, dynamic_array<InstanceData, 0ul>&)
    #4 0x000001016c9d54 in GISceneManager::GetInstancesWithDuplicates(StaticEditorFlags, bool)
    #5 0x000001016cb71d in GISceneManagerClient::GetInstances() const
    #6 0x000001016c809f in gi::UpdateMaterials(dynamic_array<GISceneManagerClient*, 0ul> const&, bool&)
    #7 0x000001016c738f in GISceneManager::Update()
    #8 0x000001016c50ca in GISceneManager::GISceneManager()::tickGIInEditorRegistrator::Forward()
    #9 0x00000101a38035 in Application::TickTimer()
    #10 0x000001006c4e4e in -[EditorApplication TickTimer]
    #11 0x007fff4cc7e739 in __NSFireTimer
    #12 0x007fff4ab14064 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
    #13 0x007fff4ab13cd7 in __CFRunLoopDoTimer
    #14 0x007fff4ab137da in __CFRunLoopDoTimers
    #15 0x007fff4ab0adab in __CFRunLoopRun
    #16 0x007fff4ab0a1a3 in CFRunLoopRunSpecific
    #17 0x007fff49df0d96 in RunCurrentEventLoopInMode
    #18 0x007fff49df0a0f in ReceiveNextEventCommon
    #19 0x007fff49df0884 in _BlockUntilNextEventMatchingListInModeWithFilter
    #20 0x007fff480a2a73 in _DPSNextEvent
    #21 0x007fff48838e34 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
    #22 0x007fff48097885 in -[NSApplication run]
    #23 0x007fff48066a72 in NSApplicationMain
    #24 0x000001006e33b7 in EditorMain(int, char const**)
    #25 0x000001006e3839 in main
    #26 0x007fff72918015 in start

    Any ideas on this? We're trying to isolate what the issue is...

    This particular case, we're using OSX, 100% repro

    Re: the crash on 2018.1.X whilst baking, similar callstack - occurs on windows + osx and is intermittent, seems toggling between autogenerate then doing a full generate, seems to fail write around when the editor shows 'writing lighting data'..
     
    Last edited: Jul 24, 2018
  2. V_Kalinichenko

    V_Kalinichenko

    Unity Technologies

    Joined:
    Apr 15, 2015
    Posts:
    16
    Hey,

    Thanks a lot for reporting this issue, we greatly appreciate it!
    My name is Vladimir, I'm a Graphics Test Engineer in the Unity Lighting team and I will assist you with this case :)

    Several questions regarding the crash that you experience:
    1. What lightmapping backend do you use for baking your project - Enlighten or Progressive Lightmapper?
    2. Is the crash when opening the scene in Unity 2018.2 also reproducible on Windows?

    In any case, could you please upload the small repro of the project (if possible) which triggers the crash to any preferred cloud storage and post the link here? Alternatively, you may submit a bug report with the project attached through Unity Bug Reporter. After we have the project and repro, we will process the case as soon as possible. Thanks in advance!
     
  3. stgs73

    stgs73

    Joined:
    Mar 23, 2015
    Posts:
    59
    Hi Vladimir
    We're using Enlighten.

    We'll test 2018.2 Windows later today and let you know.
    We'll need to get permission to provide assets but i should be able to figure something out, will provide bug # once done

    thnx
     
    V_Kalinichenko likes this.
  4. stgs73

    stgs73

    Joined:
    Mar 23, 2015
    Posts:
    59
    Hi Vladimir, a few more tests

    So...the first bug in the original post, where we cannot open the scene, it seems only to occur on OSX
    In windows we can open and bake so far
    It is in Standalone mode

    The crashes we had in OSX were in iOS/Android Editor, we're just going to try Standalone OSX to see if that helps

    All our artists bake in Windows so lesser of 2 problems :)

    Hope that is of some use

    thnx
     
    V_Kalinichenko likes this.
  5. stgs73

    stgs73

    Joined:
    Mar 23, 2015
    Posts:
    59
    Ok no luck, 2018.2.0 actually crashed while baking as well

    So what we can see is OSX 2018.2.0 we can't even open a scene, Windows 2018.2.0 opens but baking crashes
    2018.1.X baking crashes regardless

    Another bug # with crash dump from 2018.2.0 crash
    1063937

    One thing we're playing with is we have lightprobe groups in the scenes, doing lots of tests right now, not 100% sure if this is the issue, will confirm later
     
    V_Kalinichenko likes this.
  6. stgs73

    stgs73

    Joined:
    Mar 23, 2015
    Posts:
    59
    Hi Vladimir, the first crash ( 2018.2 where we cannot open a scene is resolved by unchecking

    Auto on the Index option for the Meshes. I'm guessing the algo has changed and the mesh is changed to 32bit indexes and maybe 16bit on 2018.1? Either way if we force it to 16bit it fixes the crash and we can open our scenes..

    We'll try 16bit for a level and see if we can now lightmap, it maybe related?
     
    V_Kalinichenko likes this.
  7. V_Kalinichenko

    V_Kalinichenko

    Unity Technologies

    Joined:
    Apr 15, 2015
    Posts:
    16
    Hi again @stgs73 !

    So, after some investigations, we have found that crash that you observe in the initial post (the one happening in CalculateSurfaceArea) is caused by another issue: https://issuetracker.unity3d.com/is...mesh-without-lightmaps-uvs-as-lightmap-static. It is indeed related to the Lightmap UVs on meshes and it's a regression introduced in 2018.1. We have fixed it in 2018.3 and we plan to backport it to 2018.2 soon. I will update you when it happens. As for now, I would suggest to either generate lightmap UVs for meshes manually or to check Generate Lightmap UV in the mesh Inspector (see attached screenshot, please). This might be a workaround.

    As for another crash that you experience, the one which happens while baking - I could not repro it with Enlighten in 2018.2.0f2 on both OSX and Windows. The project that I was testing on had both Enlighten, light probes and AO. Before baking, I cleared baked data and GI cache. Could you please upload the screenshot of your Lighting settings window?

    In conclusion, just wanted to say that having a test project would still be the most efficient way to reproduce the crash from our side.
    Thanks!
     

    Attached Files:

    stgs73 likes this.