Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Freezing bug when exceptions not handled

Discussion in 'WebGL' started by juicybeast, Mar 2, 2016.

  1. juicybeast

    juicybeast

    Joined:
    Nov 12, 2014
    Posts:
    32
    Here's the bug report: 770368

    In my project, I couldn't reliably reproduce the bug, so I made a repro project that reliably prompts the bug on start.

    The interesting part is that it bugs when the command "List<Vector2>.Clear();" is used somewhere.
     
  2. crushforth

    crushforth

    Joined:
    Jul 22, 2010
    Posts:
    113
    What does the console output look like? Any errors in there? Go to "Chrome hamburger menu -> More Tools -> Developer Tools" to bring up the dev tools. Firefox has the equivalent "Hamburger menu -> Developer -> Web Console"

    Use the console tab to see errors from javascript.

    Could be a code stripping issue. Some classes get stripped out and you have to stop that happening by adding them to a file called link.xml.

    I have DOTween and lists of vectors working in my WebGL project but there are some hoops to jump through to get there.
     
  3. juicybeast

    juicybeast

    Joined:
    Nov 12, 2014
    Posts:
    32
    The error is not too verbose probably because the bug happens when exceptions are not handled, it says:


    Exception at:
    jsStackTrace@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:1:22973
    stackTrace@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:1:23156
    ___cxa_throw@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:1:2202
    fG@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:19:263140
    JDg@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:5:529107
    ASl@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:9:645904
    Lzf@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:6:363266
    wJf@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:6:588318
    Vck@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:7:105000
    VLf@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:6:629117
    BSl@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:9:646034
    hAf@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:6:371608
    gAf@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:6:369282
    ujl@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:9:249130
    DJ@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:19:322581
    Jv@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:19:86863
    cjb@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:16:876291
    AEb@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:15:650101
    zEb@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:15:649818
    NBb@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:15:576949
    OBb@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:15:576991
    hRe@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:12:609947
    pRe@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:12:613390
    lzb@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:15:487432
    jXd@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:25:810147
    wkm@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:29:122781
    Runtime.dynCall@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:1:7044
    Browser_mainLoop_runner/<@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:1:205968
    Browser.mainLoop.runIter@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:1:236623
    Browser_mainLoop_runner@blob:null/d4bfef0b-9090-4478-b403-6bcfd8aa5193:1:205864
    d4bfef0b-9090-4478-b403-6bcfd8aa5193:1:2171
    Invoking error handler due to
    uncaught exception: undefined - Exception catching is disabled, this exception cannot be caught. Compile with -s DISABLE_EXCEPTION_CATCHING=0 or DISABLE_EXCEPTION_CATCHING=2 to catch.


    Also, it was in the bug report but not here: I get this error while simultaneously using DOTween and Chronos's slowdown and do something. The error is not exactly linked to the use of List.Clear, I get the error even when it is commented out and add other chunks of code, but for the sake of simpleness I decided to strip all I could and still make the bug happen.
     
  4. juicybeast

    juicybeast

    Joined:
    Nov 12, 2014
    Posts:
    32
    So the bug report have been handled and and closed as "by design"

    Because it seems like the list is being accessed by the DOTweenComponent after it has been cleared. I do not doubt this is somehow the case, but if it was due to any of the game's script would I not get the exception in the editor or on other platforms? Or even on WebGL when I handle the exceptions, would I not see it pop somewhere like in the developer console?

    I'd very much like to fix the error if it is on my side, but the tools at my disposition right now do not allow me to track it. Do you have suggestions?
     
  5. crushforth

    crushforth

    Joined:
    Jul 22, 2010
    Posts:
    113
    If you make a development build and in player settings put exceptions on full you should get back a more useful error message and a much better callstack (turn the off afterwards otherwise you'll have a much larger app). This should tell you is it maybe a missing class caused by stripping or something.

    I've seen something similar to this recently where we were doing a tween with an integer and not a float (the height of a sprite). This works perfectly on all builds except WebGL as it attempting to find a version of the function that accepts ints and it picks a version that accepts Vector3's instead (it was weird). This was DOTWeen related.

    Try a dev build will full exceptions on and see if there is anything useful in the console.

    Screen Shot 2016-03-04 at 3.45.53 PM.png Screen Shot 2016-03-04 at 3.46.17 PM.png
     
  6. juicybeast

    juicybeast

    Joined:
    Nov 12, 2014
    Posts:
    32
    I tried it, got no exception at all, but the QA answered me.

    Seems like Enable Exceptions: none disables try/catch blocks, if there is any in DOTween's script, the try/catch will not work. If this catch is silent, no exception / warning will be sent even when full exceptions are thrown.
     
    Last edited: Mar 7, 2016