Search Issue Tracker

Won't Fix

Votes

3

Found in [Package]

1.0.16

1.2.X

Issue ID

ULOG-37

Regression

No

Uncaught exceptions do not have a Stacktrace when RedirectUnityLogs is set to true

Package: Unity Logging

-

How to reproduce:
1. Open “try-unity-logging“ project
2. Open the “Main“ scene
3. Enter Play Mode
4. Observe the errors in the Console

Expected result: All Errors have a Stacktrace
Actual result: The third does not have a Stacktrace

Reproducible with: 1.0.16 (2022.3.28f1), 1.2.0 (6000.0.1f1)
Could not test with: 0.51.1-preview.21 (2021.3.38f1) (the configuration methods used are not supported)

Reproducible on: Windows 10
Not reproducible on: No other environment tested

  1. Resolution Note:

    This is a current limitation of the `RedirectUnityLogs` method.

Comments (1)

  1. kanonji

    May 07, 2024 07:15

    To supplement, the specific Actual result of the Uncaught exception was something like this.

    ## Expected result
    ```
    NullReferenceException: Object reference not set to an instance of an object
    TryException.ThrowException () (at Assets/TryException.cs:17)
    TryException.Start () (at Assets/TryException.cs:13)
    ```

    ## Actual result
    ```
    Object reference not set to an instance of an object
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
    ```

    Also, even if catching an exception and using `Debug.LogException(ex)`, stacktrace will only show the line that wrote `Debug.LogException(ex)`.

    ## Actual result
    ```
    Object reference not set to an instance of an object
    UnityEngine.Debug:LogException(Exception)
    TryException:Start() (at Assets/TryException.cs:10)
    ```

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.