Setting up 6 worker threads for Enlighten. Crash!!!

Unity 2021.3.4f1 (URP)

On a Standalone build when I close the game it crashes… and this is what is shows in the crash log:

Setting up 6 worker threads for Enlighten.
Crash!!!

Yet I don’t have Enlighten enabled:

yes we are wondering this too

That’s definitely not great. Can you report a bug for this?

sorry a precisation:

the game doesn’t crash for us. It takes a LONG time to close, but I am not sure if it’s because of this. We are only wondering why we see this at the end of each log:

I was facing a problem when I was trying to close game window (window stopped responding). My game was sending some gRPC requests, therefore there were some grpc channels open.
Adding _channel.ShutdownAsync(); in OnApplicationQuit() fixed it. If u facing similar problem try closing some resources manually

Did anyone find a solution for this? We’re running into the same issue only on Mac with 2021.3.18.

Having the same issue. My ios app crashes whenever I exit. Im using Unity 2022.2.18
I cant submit a bug report because my bug reporter always crashes when I hit submit.
If I check the output in xcode.

→ applicationWillResignActive()
→ applicationDidEnterBackground()
→ applicationWillTerminate()
Quitting… (this is a debug line in OnApplicationQuit()
Setting up 1 worker threads for Enlighten.
[CRASH]

Xcode breaks at this line:

#include <UnityFramework/UnityFramework.h>
UnityFramework* UnityFrameworkLoad()
{
NSString* bundlePath = nil;
bundlePath = [[NSBundle mainBundle] bundlePath];
bundlePath = [bundlePath stringByAppendingString: @“/Frameworks/UnityFramework.framework”];
NSBundle* bundle = [NSBundle bundleWithPath: bundlePath];
if ([bundle isLoaded] == false) [bundle load];
UnityFramework* ufw = [bundle.principalClass getInstance];
if (![ufw appController])
{
// unity is not initialized
[ufw setExecuteHeader: &_mh_execute_header];
}
return ufw;
}

int main(int argc, char* argv[ ])
{
@autoreleasepool
{
id ufw = UnityFrameworkLoad();
[ufw runUIApplicationMainWithArgc: argc argv: argv]; <-----
return 0;
}

}

1 Like

If it crashes even with a blank project, you can try to file a report via unity hub as well (:

I just found this thread as well… iOS crashes on app exit. Unity 2019.3.10f1 It seems like a unity bug that is happening to a few people. The thing is I am not using enlighten at all as far as I can tell. I have lighting disabled including things like global illumination everywhere I can find. All my shaders are unlit. I tried switching to URP so I could “turn off lighting even more” and its still the exact same error.

Does something was find to get more info on that issue, I have the same problem.
I build for Windows and linux, work on windows each time, work on linux on one computer but not the second one.
Using for computer working :

  • Quadro RTX 5000
  • I7- 10th gen
  • NVIDIA driver 515.48.07

For the one is not working :

  • RTX 3070
  • I7- 10th gen
  • NVIDIA driver 515.48.07

Both on linux arch, I don’t have any clue.

Ok I figured out that the last line of debug isn’t the one that make crash.
On my side it was coming from a configuration file path !

Still I don’t understand why I have enlighten treads launching when I shutdown the app ?

Could you share a bit more about how you found out it was a configuration file path? I’m having a very similar issue and so far I haven’t gotten any luck from either log files, dumps or even the windows event log (yes I got that desperate)

Unfortunatly I didn’t make magic, I take a look on each computer configuration and found out an exception I ddin’t
The lucky part for me was that it was the config part that is made at launch.

1 Like

Probably worth linking to the relevant issue that “addresses” this:

Note, however, as @DomeCreator suggested, these Enlighten messages are apparently unrelated to the crashes that people were experiencing. Whatever’s causing the crashes is unknown, but it’s almost certainly not related to Enlighten. Those Enlighten log messages just happened to be the last things that got logged before Unity went on to do something different that actually caused a crash. So, Unity has removed that logging to avoid having people think their crash is related to Enlighten.

Why is it highly unlikely that Enlighten is causing the crash?
Enlighten shouldn’t be doing anything during application shutdown in the first place.
Shouldn’t they have removed the logic that lets Enlighten run during application shutdown instead of removing the log?

*The log of my unity project left behind the post.
I have encountered the same problem on 2021.3.35f1 + 2021.3.36f1
And I finally found that the cause and the solution is…

Remove the ‘Unity Analytics’ Built-In Package in Unity Package Manager of your project.


Yep. Somebody told me that the analytics was trying to upload a crash report when quitting the game, and this was conflicted with the ‘safety check’, and then…
This usually occurs on the project which is upgraded from 2020.2.x (e.g. 2020.2.1f1 which is my project’s previous version)

After I removed the Unity Analytics package and built the game again, it won’t crash anymore when quitting the game (Windows, StandalonePlayer platform target).

Later on, I found out that there were actually signs of this problem already - when I just upgraded the project to 2021.3.35f1, the console reported several errors about the Analytics/Plastic package “cannot be imported”, but I didn’t notice that - when I upgraded to 2021.3.36f1, this error message even disappeared.

This is the log of my game before it crashes when quitting the game (2021.3.36f1)

UnloadTime: 0.789100 ms
Unloading 6 Unused Serialized files (Serialized files now loaded: 0)
UnloadTime: 1.270700 ms
Unloading 9 unused Assets to reduce memory usage. Loaded Objects now: 1416.
Total: 1.272900 ms (FindLiveObjects: 0.092500 ms CreateObjectMapping: 0.045500 ms MarkObjects: 1.079800 ms DeleteObjects: 0.054500 ms)

Unloading 5 Unused Serialized files (Serialized files now loaded: 1)
UnloadTime: 1.685500 ms
Unloading 14 unused Assets to reduce memory usage. Loaded Objects now: 1753.
Total: 2.461900 ms (FindLiveObjects: 0.160800 ms CreateObjectMapping: 0.053100 ms MarkObjects: 2.185700 ms DeleteObjects: 0.061500 ms)

Uploading Crash Report
Cannot create web request without initializing the system
UnityEngine.UI.CanvasScaler:OnDisable()

[ line 1192145800]

Crash!!!
1 Like

they actually removed the log in 2021.3.36f1, and I found the real cause of the crash (possibly)
Well, it really not caused by the Enlighten. It is related to the networking mechanism.

1 Like