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:
Setting up 10 worker threads for Enlighten.
Memory Statistics:
[ALLOC_TEMP_TLS] TLS Allocator
StackAllocators :
[ALLOC_TEMP_MAIN]
Peak usage frame count: [2.0 KB-4.0 KB]: 16153 frames, [4.0 KB-8.0 KB]: 777 frames, [8.0 KB-16.0 KB]: 637 frames, [32.0 KB-64.0 KB]: 3 frames, [64.0 KB-128.0 KB]: 1 frames, [128.0 KB-256.0 KB]: 88196 frames, [256.0 KB-0.5 MB]: 301 frames, [0.5 MB-1.0 MB]: 4 frames, [1.0 MB-2.0 MB]: 2 frames, [2.0 MB-4.0 MB]: 1 frames, [4.0 MB-8.0 MB]: 2 frames
Initial Block Size 4.0 MB
Current Block Size 7.3 MB
Peak Allocated Bytes 7.3 MB
Overflow Count 1
[ALLOC_TEMP_Job.Worker 18]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.3 KB
Overflow Count 0
[ALLOC_TEMP_Loading.PreloadManager]
Initial Block Size 256.0 KB
Current Block Size 468.0 KB
Peak Allocated Bytes 466.4 KB
Overflow Count 36
[ALLOC_TEMP_Background Job.Worker 8]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 18.6 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 10]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 0.6 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 16]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.3 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 6]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 2.8 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 4]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.4 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 14]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.6 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 17]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.5 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 3]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.4 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 12]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 0.6 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 1]
Initial Block Size 32.0 KB
Current Block Size 36.0 KB
Peak Allocated Bytes 32.0 KB
Overflow Count 0
[ALLOC_TEMP_AssetGarbageCollectorHelper] x 19
Initial Block Size 64.0 KB
Current Block Size 64.0 KB
Peak Allocated Bytes 0 B
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 5]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 2.8 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 13]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 0.6 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 11]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 2.8 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 2]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.3 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 3]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 0.6 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 0]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 0.6 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 11]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 155.8 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 4]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 2.8 KB
Overflow Count 0
[ALLOC_TEMP_BatchDeleteObjects]
Initial Block Size 64.0 KB
Current Block Size 64.0 KB
Peak Allocated Bytes 54 B
Overflow Count 0
[ALLOC_TEMP_Job.Worker 6]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.0 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 0]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.5 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 9]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 2.8 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 5]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.3 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 14]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 0.6 KB
Overflow Count 0
[ALLOC_TEMP_ReadCacheIndex]
Initial Block Size 64.0 KB
Current Block Size 128.0 KB
Peak Allocated Bytes 100.9 KB
Overflow Count 114641
[ALLOC_TEMP_Job.Worker 13]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.0 KB
Overflow Count 0
[ALLOC_TEMP_EnlightenWorker] x 10
Initial Block Size 64.0 KB
Current Block Size 64.0 KB
Peak Allocated Bytes 54 B
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 15]
Initial Block Size 32.0 KB
Current Block Size 40.0 KB
Peak Allocated Bytes 37.2 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 2]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 0.6 KB
Overflow Count 0
[ALLOC_TEMP_Background Job.Worker 7]
Initial Block Size 32.0 KB
Current Block Size 32.0 KB
Peak Allocated Bytes 4.4 KB
Overflow Count 0
[ALLOC_TEMP_UnityGfxDeviceWorker]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 50.3 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 9]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.3 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 8]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.5 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 7]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.3 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 1]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.7 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 10]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.7 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 15]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.6 KB
Overflow Count 0
[ALLOC_TEMP_Job.Worker 12]
Initial Block Size 256.0 KB
Current Block Size 256.0 KB
Peak Allocated Bytes 157.7 KB
Overflow Count 0
[ALLOC_TEMP_Loading.AsyncRead]
Initial Block Size 64.0 KB
Current Block Size 128.0 KB
Peak Allocated Bytes 127.5 KB
Overflow Count 0
[ALLOC_DEFAULT] Dual Thread Allocator
Peak main deferred allocation count 37157
[ALLOC_BUCKET]
Large Block size 4.0 MB
Used Block count 1
Peak Allocated bytes 4.0 MB
Failed Allocations. Bucket layout:
16B: 21 Subsections = 21504 buckets. Failed count: 3757175
32B: 25 Subsections = 12800 buckets. Failed count: 222558
48B: 29 Subsections = 9898 buckets. Failed count: 2544890
64B: 27 Subsections = 6912 buckets. Failed count: 323789
80B: 41 Subsections = 8396 buckets. Failed count: 264921
96B: 7 Subsections = 1194 buckets. Failed count: 255528
112B: 92 Subsections = 13458 buckets. Failed count: 56949
128B: 14 Subsections = 1792 buckets. Failed count: 411686
[ALLOC_DEFAULT_MAIN]
Peak usage frame count: [8.0 MB-16.0 MB]: 17383 frames, [16.0 MB-32.0 MB]: 194 frames, [32.0 MB-64.0 MB]: 1 frames, [64.0 MB-128.0 MB]: 2 frames, [128.0 MB-256.0 MB]: 88497 frames
Requested Block Size 16.0 MB
Peak Block count 9
Peak Allocated memory 143.5 MB
Peak Large allocation bytes 36.0 MB
[ALLOC_DEFAULT_THREAD]
Peak usage frame count: [16.0 MB-32.0 MB]: 17564 frames, [32.0 MB-64.0 MB]: 88512 frames, [64.0 MB-128.0 MB]: 1 frames
Requested Block Size 16.0 MB
Peak Block count 3
Peak Allocated memory 104.9 MB
Peak Large allocation bytes 88.0 MB
[ALLOC_TEMP_JOB_1_FRAME]
Initial Block Size 2.0 MB
Used Block Count 1
Overflow Count (too large) 0
Overflow Count (full) 0
[ALLOC_TEMP_JOB_2_FRAMES]
Initial Block Size 2.0 MB
Used Block Count 1
Overflow Count (too large) 0
Overflow Count (full) 0
[ALLOC_TEMP_JOB_4_FRAMES (JobTemp)]
Initial Block Size 2.0 MB
Used Block Count 9
Overflow Count (too large) 0
Overflow Count (full) 0
[ALLOC_TEMP_JOB_ASYNC (Background)]
Initial Block Size 1.0 MB
Used Block Count 30
Overflow Count (too large) 0
Overflow Count (full) 0
[ALLOC_GFX] Dual Thread Allocator
Peak main deferred allocation count 8
[ALLOC_BUCKET]
Large Block size 4.0 MB
Used Block count 1
Peak Allocated bytes 4.0 MB
Failed Allocations. Bucket layout:
16B: 21 Subsections = 21504 buckets. Failed count: 3757175
32B: 25 Subsections = 12800 buckets. Failed count: 222558
48B: 29 Subsections = 9898 buckets. Failed count: 2544890
64B: 27 Subsections = 6912 buckets. Failed count: 323789
80B: 41 Subsections = 8396 buckets. Failed count: 264921
96B: 7 Subsections = 1194 buckets. Failed count: 255528
112B: 92 Subsections = 13458 buckets. Failed count: 56949
128B: 14 Subsections = 1792 buckets. Failed count: 411686
[ALLOC_GFX_MAIN]
Peak usage frame count: [32.0 KB-64.0 KB]: 4 frames, [64.0 KB-128.0 KB]: 1 frames, [256.0 KB-0.5 MB]: 17383 frames, [4.0 MB-8.0 MB]: 88689 frames
Requested Block Size 16.0 MB
Peak Block count 1
Peak Allocated memory 6.6 MB
Peak Large allocation bytes 0 B
[ALLOC_GFX_THREAD]
Peak usage frame count: [4.0 KB-8.0 KB]: 4 frames, [256.0 KB-0.5 MB]: 17368 frames, [0.5 MB-1.0 MB]: 5 frames, [1.0 MB-2.0 MB]: 12 frames, [2.0 MB-4.0 MB]: 188 frames, [64.0 MB-128.0 MB]: 88500 frames
Requested Block Size 16.0 MB
Peak Block count 2
Peak Allocated memory 92.8 MB
Peak Large allocation bytes 64.0 MB
[ALLOC_CACHEOBJECTS] Dual Thread Allocator
Peak main deferred allocation count 1756
[ALLOC_BUCKET]
Large Block size 4.0 MB
Used Block count 1
Peak Allocated bytes 4.0 MB
Failed Allocations. Bucket layout:
16B: 21 Subsections = 21504 buckets. Failed count: 3757175
32B: 25 Subsections = 12800 buckets. Failed count: 222558
48B: 29 Subsections = 9898 buckets. Failed count: 2544890
64B: 27 Subsections = 6912 buckets. Failed count: 323789
80B: 41 Subsections = 8396 buckets. Failed count: 264921
96B: 7 Subsections = 1194 buckets. Failed count: 255528
112B: 92 Subsections = 13458 buckets. Failed count: 56949
128B: 14 Subsections = 1792 buckets. Failed count: 411686
[ALLOC_CACHEOBJECTS_MAIN]
Peak usage frame count: [16.0 MB-32.0 MB]: 17577 frames, [32.0 MB-64.0 MB]: 88500 frames
Requested Block Size 4.0 MB
Peak Block count 12
Peak Allocated memory 51.7 MB
Peak Large allocation bytes 10.3 MB
[ALLOC_CACHEOBJECTS_THREAD]
Peak usage frame count: [8.0 KB-16.0 KB]: 1 frames, [64.0 KB-128.0 KB]: 1 frames, [1.0 MB-2.0 MB]: 2 frames, [2.0 MB-4.0 MB]: 17325 frames, [8.0 MB-16.0 MB]: 3 frames, [16.0 MB-32.0 MB]: 51 frames, [32.0 MB-64.0 MB]: 194 frames, [128.0 MB-256.0 MB]: 88498 frames, [256.0 MB-0.50 GB]: 2 frames
Requested Block Size 4.0 MB
Peak Block count 59
Peak Allocated memory 400.1 MB
Peak Large allocation bytes 201.5 MB
[ALLOC_TYPETREE] Dual Thread Allocator
Peak main deferred allocation count 0
[ALLOC_BUCKET]
Large Block size 4.0 MB
Used Block count 1
Peak Allocated bytes 4.0 MB
Failed Allocations. Bucket layout:
16B: 21 Subsections = 21504 buckets. Failed count: 3757175
32B: 25 Subsections = 12800 buckets. Failed count: 222558
48B: 29 Subsections = 9898 buckets. Failed count: 2544890
64B: 27 Subsections = 6912 buckets. Failed count: 323789
80B: 41 Subsections = 8396 buckets. Failed count: 264921
96B: 7 Subsections = 1194 buckets. Failed count: 255528
112B: 92 Subsections = 13458 buckets. Failed count: 56949
128B: 14 Subsections = 1792 buckets. Failed count: 411686
[ALLOC_TYPETREE_MAIN]
Peak usage frame count: [2.0 KB-4.0 KB]: 5 frames, [8.0 KB-16.0 KB]: 17368 frames, [0.5 MB-1.0 MB]: 200 frames, [4.0 MB-8.0 MB]: 88504 frames
Requested Block Size 2.0 MB
Peak Block count 4
Peak Allocated memory 6.7 MB
Peak Large allocation bytes 0 B
[ALLOC_TYPETREE_THREAD]
Peak usage frame count: [1.0 KB-2.0 KB]: 2 frames, [128.0 KB-256.0 KB]: 1 frames, [256.0 KB-0.5 MB]: 1 frames, [0.5 MB-1.0 MB]: 17573 frames, [1.0 MB-2.0 MB]: 88500 frames
Requested Block Size 2.0 MB
Peak Block count 1
Peak Allocated memory 1.0 MB
Peak Large allocation bytes 0 B
Murakle
December 28, 2022, 8:33am
5
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
artfail:
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;
}
}
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)
DomeCreator:
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 ?
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