Search Issue Tracker

Won't Fix

Votes

3

Found in

2018.4

2019.3

2019.3.0f3

Issue ID

1205025

Regression

No

Crash in LightmapSettings::GetLightingDataAsset() after assertion failure 'settings != null

Progressive Lightmapper

-

Crash in LightmapSettings::GetLightingDataAsset() after assertion failure 'settings != null'

In the attached project, when the user exits Play Mode in the gameplay scene, Unity will report an assertion failure and then crash as follows. This issue cannot be remedied by a re-import or clearing Library, it will resurface.Without a debug version of the editor, a meaningless callstack will reported.

[00:00:00] Enlighten: Finished 1 Layout Systems job (0.00s execute, 0.00s integrate, 0.22s wallclock)
[00:00:00] Enlighten: Finished 1 Tetrahedralize Probes job (0.00s execute, 0.00s integrate, 0.05s wallclock)
[00:00:00] Enlighten: Precompute took 0.267668 seconds.
Enlighten scene contents: 0 geometries. 0 instances. 0 systems. 0 probe groups. 0 cube maps. Scene is up-to-date.
[PathTracer] building lightmap data asset.
[00:00:01] Enlighten: Reflection Probes started.
[00:00:01] Enlighten: Finished 1 Bake Ambient Probe job (0.00s execute, 0.00s integrate, 0.05s wallclock)
[PathTracer] building lightmap data asset.
[00:00:01] Enlighten: LightingDataAsset started.
Assertion failed on expression: 'settings != NULL'
(Filename: ./Editor/Src/GI/Enlighten/LightingDataAsset.cpp Line: 328)
Obtained 28 stack frames.
#0 0x00000110f14a54 in LightmapSettings::GetLightingDataAsset() const
#1 0x00000112469271 in LightingDataAsset::GetLightingDataAssetStableID(UnityScene*)
#2 0x000001124e9a2f in WriteLightingDataAssetJob::Prepare(dynamic_array<UnityGUID, 0ul>&)
#3 0x00000112418486 in IssueWriteLightingDataAssetJob(JobManager*, dynamic_array<UnityGUID, 0ul>&, Hash128 const&)
#4 0x000001124196d1 in LightingDataAssetManager::PostUpdate()
#5 0x000001123fe87c in gi::PostUpdate(dynamic_array<GISceneManagerClient*, 0ul> const&)
#6 0x0000011240a50a in GISceneManager::Update()
#7 0x0000011240839d in GISceneManager::GISceneManager()::tickGIInEditorRegistrator::Forward()
#8 0x0000010e932962 in CallbackArray::Invoke()
#9 0x0000010f126faf in ProfilerCallbackInvoke<CallbackArray, &(GlobalCallbacks::tickGIInEditor)>::Invoke(char const*)
#10 0x0000010f123b36 in Application::TickTimer()
#11 0x00000112abbfa5 in -[EditorApplication TickTimer]
#12 0x007fff3a0148b3 in __NSFireTimer
#13 0x007fff37947704 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
#14 0x007fff379472be in __CFRunLoopDoTimer
#15 0x007fff37946cde in __CFRunLoopDoTimers
#16 0x007fff37927b0d in __CFRunLoopRun
#17 0x007fff37926fe3 in CFRunLoopRunSpecific
#18 0x007fff364ae67d in RunCurrentEventLoopInMode
#19 0x007fff364ae3bd in ReceiveNextEventCommon
#20 0x007fff364ae147 in _BlockUntilNextEventMatchingListInModeWithFilter
#21 0x007fff34b33864 in _DPSNextEvent
#22 0x007fff34b325d4 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
#23 0x007fff34b2cd76 in -[NSApplication run]
#24 0x007fff34b1e95d in NSApplicationMain
#25 0x00000112afd78f in EditorMain(int, char const**)
#26 0x00000112afda99 in main
#27 0x007fff6ec682e5 in start
Launching bug reporter
[Unity Package Manager (Upm)]
Parent process [1662] was terminated
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QNetworkAccessManager(0x7fd8ba73e3c0), parent's thread is QThread(0x7fd8ba604740), current thread is Thread(0x7fd87aad9410)

Steps to reproduce:
- Download and launch the attached project in 19.3+
- Install the required assets from the asset store: Photon Unity Networking 2 and Photo Voice 2
- Configure Photon and Photo voice with the IDs attached to this Fogbugz ticket as a comment for security (Window > Photon Unity Networking > Hightlight Server Settings > Settings > App Id Realtime and App Id Voice)
- Launch the /ICT/Scenes/Lobby scene
- Create a new profile
- Create a new room
- When arriving in the gameplay scene, move the player around the scene for a short period
- Exit play mode
- Observe crash as described

  1. Resolution Note (2020.1.X):

    This issue was not caused by Unity and has already been fixed in the newest versions of Photon.

Comments (4)

  1. rainbowmimizu

    Aug 23, 2020 17:17

    (Don't forget turn Enlighen off for ALL scenes)

  2. rainbowmimizu

    Aug 23, 2020 17:15

    Actually it wasn't. It could be related to Enlighten.

    So once I stop Play button, log shows Enlighten is triggered, maybe while Photon is still trying to delete network prefab objects from another thread (and crash)

    I toggled off Enlighen, and Unity never crashed since then...
    (Render>Settings>Lightmapping Settings)

    But I also double checked lots of things so that my scripts never touch any values Photon multithread may tweaks.

    Hope this would help someone.

  3. rainbowmimizu

    Aug 12, 2020 02:11

    Thank you PHEROMOTH, you saved my life!

    I have similar issue, but just rebuliding all lights in the scene fixed the issue.
    Do not know why but Photon breaks the light data?

    Hope they would fix it soon.

  4. pheromoth

    Dec 23, 2019 05:52

    Hi, had a similar issue. I ended up finding out it was due to corrupted data, specifically in my Directional Light game object. I deleted it and built a new one from scratch, the error seems to have disappeared.

    I am using PUN plugin and testing a simple game with a login screen to enter in a room with some basic environment and the player spawning in it. The error popped out mainly when I closed the room scene and sometimes when I was browsing data from the editor.

    The crash stack trace was like this every time:
    Stack Trace of Crashed Thread 2944:
    0x0000000140787D10 (Unity) LightmapSettings::GetLightingDataAsset
    0x00000001410DA7B2 (Unity) GetLightingDataAssetFromScene
    0x00000001410DA7EC (Unity) LightingDataAsset::GetLightingDataAssetStableID
    0x00000001410A2A38 (Unity) WriteLightingDataAssetJob::Prepare
    0x000000014108CF7B (Unity) IssueWriteLightingDataAssetJob
    0x000000014108D681 (Unity) LightingDataAssetManager::PostUpdate
    0x000000014108F33C (Unity) GISceneManager::Update
    0x00000001410890A5 (Unity) `GISceneManager::GISceneManager'::`2'::tickGIInEditorRegistrator::Forward
    0x0000000140662B99 (Unity) CallbackArray::Invoke
    0x000000014134BD1F (Unity) ProfilerCallbackInvoke<CallbackArray,275544>::Invoke
    0x0000000141353D3A (Unity) Application::TickTimer
    0x00000001414B1CA3 (Unity) MainMessageLoop
    0x00000001414B398D (Unity) WinMain
    0x00000001424B027A (Unity) __scrt_common_main_seh
    0x00007FF9E2AF7BD4 (KERNEL32) BaseThreadInitThunk
    0x00007FF9E2F8CED1 (ntdll) RtlUserThreadStart

    Hope this can help

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.