Search Unity

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

Discussion in 'Universal Render Pipeline' started by SniperED007, Jun 15, 2022.

  1. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    345
    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:

    Code (CSharp):
    1. Setting up 6 worker threads for Enlighten.
    2. Crash!!!
    Yet I don't have Enlighten enabled:
    upload_2022-6-15_22-24-33.png
     
  2. sebascore

    sebascore

    Joined:
    Apr 27, 2022
    Posts:
    22
    yes we are wondering this too
     
  3. peterbay

    peterbay

    Unity Technologies

    Joined:
    Nov 2, 2017
    Posts:
    100
    That's definitely not great. Can you report a bug for this?
     
  4. sebascore

    sebascore

    Joined:
    Apr 27, 2022
    Posts:
    22
    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:

     
  5. Murakle

    Murakle

    Joined:
    Nov 12, 2019
    Posts:
    1
    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
     
  6. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    160
    Did anyone find a solution for this? We're running into the same issue only on Mac with 2021.3.18.
     
  7. artfail

    artfail

    Joined:
    Apr 18, 2017
    Posts:
    34
    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;
    }

    }
     
    FlightFight likes this.
  8. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,063
    If it crashes even with a blank project, you can try to file a report via unity hub as well :)
     
  9. artfail

    artfail

    Joined:
    Apr 18, 2017
    Posts:
    34
    I just found this thread as well... https://forum.unity.com/threads/ios-crashes-on-app-exit-unity-2019-3-10f1.890734/ 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.
     
  10. DomeCreator

    DomeCreator

    Joined:
    Mar 5, 2020
    Posts:
    29
    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.
     
  11. DomeCreator

    DomeCreator

    Joined:
    Mar 5, 2020
    Posts:
    29
    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 ?
     
  12. unity-30

    unity-30

    Joined:
    Apr 11, 2023
    Posts:
    1
    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)

     
  13. DomeCreator

    DomeCreator

    Joined:
    Mar 5, 2020
    Posts:
    29
    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.
     
    unity-30 likes this.
  14. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Probably worth linking to the relevant issue that "addresses" this:

    https://issuetracker.unity3d.com/issues/misleading-log-message-on-enlighten

    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.
     
  15. FlightFight

    FlightFight

    Joined:
    May 29, 2017
    Posts:
    27
    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?
     
  16. MizutaniKana

    MizutaniKana

    Joined:
    Jan 12, 2024
    Posts:
    2
    *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.

    upload_2024-4-4_18-2-21.png
    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!!!
     
    Last edited: Apr 4, 2024
    FlightFight likes this.
  17. MizutaniKana

    MizutaniKana

    Joined:
    Jan 12, 2024
    Posts:
    2
    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.
     
    Last edited: Apr 15, 2024
    FlightFight likes this.