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

Can't debug with VS2015 (crash) with 5.2.1p4

Discussion in 'Editor & General Support' started by DarkPixel, Oct 15, 2015.

  1. DarkPixel

    DarkPixel

    Joined:
    Sep 13, 2013
    Posts:
    79
    I needed this patch for a fix but now I can't debug anymore.

    I have VS tool 2.1.0.0

    Anyone have a workaround?
     
  2. DarkPixel

    DarkPixel

    Joined:
    Sep 13, 2013
    Posts:
    79
    Play + Attach in VS: Work
    Attach in VS + Play: Doesn't work anymore
     
  3. brownboot67

    brownboot67

    Joined:
    Jan 5, 2013
    Posts:
    375
    Having the same problem in 5.2.1p2

    Also noticed the 'Select Default Editor' appears to be missing from Project Settings so I can't set my scripts to open in Mono either.
     
  4. fantastisch_

    fantastisch_

    Joined:
    Mar 4, 2015
    Posts:
    26
    I also have this problem. I submitted several bug reports with crash dumps (736495, 736117, 736035, 736026, 736021, 736015, 736011, 736000, 735792). Perhaps a tad overkill but I was told submitting the dumps is always a good idea.

    Tried 5.2.1p4, 5.2.1p2 and 5.3.0b2.
     
  5. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    Hi, thanks for reporting this issue.

    We currently investigating it.
     
    fantastisch_ likes this.
  6. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    A work-around for this issue is to use VSTU 2.0. We are still looking into this issue and will report back with an update once we found the root cause.
     
  7. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
  8. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    The root cause of the issue has been found and fixed. Will update again once I know which release this fix will land in.
     
  9. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    Will be fixed in Unity 5.2.2
     
    DarkPixel likes this.
  10. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    thanks, and is far from the release? (just to valutate to wait or to rollback to the previous patch) :)
     
  11. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    The release process for it has been started, should be released this week unless there are some ship stoppers.
     
    tmsduman and ghiboz like this.
  12. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    great news!
     
  13. artur-leao

    artur-leao

    Joined:
    Feb 3, 2015
    Posts:
    66
    Great news, was about to post the same issue.
     
  14. tmsduman

    tmsduman

    Joined:
    Oct 10, 2014
    Posts:
    4
    Same problem for me, good to hear that it will be fixed soon :)
    Till it is not released: Have anyone a download link to VSTU 2.0?
     
  15. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    You cannot download VSTU 2.0 from the official website, only the latest version. I do not recommend downloading it from other places.
     
    tmsduman likes this.
  16. fantastisch_

    fantastisch_

    Joined:
    Mar 4, 2015
    Posts:
    26
    I'm afraid the issue is still present in Unity 5.2.2f1. I've uploaded a new crash dump (738250).
     
  17. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    Does this also happen for you on a new single script project? And do you know if you have this issue in MonoDevelop? The debugger clients in Visual Studio and MonoDevelop are different and therefore do not behave in the same way.

    The call-stack from your log is different than the issue that was fixed. Your call-stack seems to indicate that the debugger in Unity crashes when trying to retrieve the stack frames for a thread and it looks like a real and different bug. In order for us to be able to fix this issue you need to send in a project in which we can reproduce the crash.
     
  18. fantastisch_

    fantastisch_

    Joined:
    Mar 4, 2015
    Posts:
    26
    I've created a new bug report and attached a project which triggers the crash (fresh project, single script) a couple of hours ago. I've yet to receive the ID to give you for some reason, usually this happens within minutes. I'll post it once the bug report has been processed.
     
  19. DarkPixel

    DarkPixel

    Joined:
    Sep 13, 2013
    Posts:
    79
    Fixed my issue, thanks.
     
  20. fantastisch_

    fantastisch_

    Joined:
    Mar 4, 2015
    Posts:
    26
    Issue ID is 738481. Thanks!
     
  21. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    We are unable to reproduce this issue, has VS debugging ever worked for you? For instance in VSTU 2.0? And could you try to attach with MonoDevelop and see if you get the same crash?
     
  22. fantastisch_

    fantastisch_

    Joined:
    Mar 4, 2015
    Posts:
    26
    I do not get this crash when using MonoDevelop.
    I've used the debugger quite a bit in the past with only the occasional crash here and there.
    If I enter play mode before attaching this works fine.
    I don't know where to get an installer for VSTU 2.0 otherwise I'd happily test it out.
     
  23. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    I will forward this issue to the VSTU team and maybe they will be able to reproduce and/or look into the issue.
     
  24. fantastisch_

    fantastisch_

    Joined:
    Mar 4, 2015
    Posts:
    26
    Much appreciated!
     
  25. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    here works fine with
    • unity 5.2.2
    • visual studio community 2013
    • VSTU 2.1.0.0
    thanks @lukaszunity
     
  26. fantastisch_

    fantastisch_

    Joined:
    Mar 4, 2015
    Posts:
    26
    Interestingly the issue goes away if I use PC/Standalone instead of the WSA target. Thought I'd let you know.
     
  27. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    Thanks for the info and for replying to the issue with the info. We will investigate.
     
  28. Chiodini

    Chiodini

    Joined:
    Nov 10, 2015
    Posts:
    3
    Got same issue on several versions of Unity. Right now I am on:


    Built from '5.3/release' branch; Version is '5.3.1f1 (cc9cbbcc37b4) revision 13409467'; Using compiler version '160040219'

    OS: 'Windows 10 (10.0.0) 64bit' Language: 'en' Physical Memory: 16288 MB

    When i put a break point on VS2015 with VSTU 2.1.0, then I play, the Unity Editor immediately crash and I can't find a way to restore it. Deleting the assembly, libraries, recompiling... nothing works.
    Then I start "debugging" with Debug.Log and forget VS. After a while the debugger seems to work again.
    I tried to find a logic relation in this but i got nothing more specific, sorry.

    This is the crash log:


    Unity Editor [version: Unity 5.3.1f1_cc9cbbcc37b4]



    KERNELBASE.dll caused an Access Violation (0xc0000005)

    in module KERNELBASE.dll at 0033:5bbb1f08.



    Error occurred at 2016-01-07_102624.

    C:\Program Files\Unity3.1.1f1\Editor\Unity.exe, run by chiodini.

    32% memory in use.

    16288 MB physical memory [10965 MB free].

    19232 MB paging file [13078 MB free].

    134217728 MB user address space [134216108 MB free].



    Context:

    RDI: 0x00000004 RSI: 0x21d0b208 RAX: 0x00000100

    RBX: 0x00000000 RCX: 0x21dfe6f0 RDX: 0x21dfe6e0

    RIP: 0x5bbb1f08 RBP: 0x00000000 SegCs: 0x00000033

    EFlags: 0x00000206 RSP: 0x0b4dfcf0 SegSs: 0x0000002b

    R8: 0x00000070 R9: 0x0a850d80 R10: 0x5eca08f9

    R11: 0x21d0b270 R12: 0x21d0b204 R13: 0x21d0b20c

    R14: 0x00000000 R15: 0x2a08e320



    Bytes at CS:EIP:

    48 8b 8c 24 c0 00 00 00 48 33 cc e8 98 7a 00 00



    Stack:

    0x0b4dfcf0: 00000000 00000000 00000000 00000000 ................

    0x0b4dfd00: 21d0b208 00000000 00000004 00000000 ...!............

    0x0b4dfd10: c0000005 00000000 00000000 00000000 ................

    0x0b4dfd20: 5bbb1f08 00007ffb 00000000 00000000 ...[............

    0x0b4dfd30: 00000000 00000000 29fe99ca 00007ffb ...........)....

    0x0b4dfd40: fffffffe 00007ffb 2a0e0db0 00007ffb ...........*....

    0x0b4dfd50: 00000000 00000000 29febd2b 00007ffb ........+..)....

    0x0b4dfd60: 00000004 00000000 29fe9a21 00007ffb ........!..)....

    0x0b4dfd70: 2a0e0de0 00007ffb 21d0b208 00000000 ...*.......!....

    0x0b4dfd80: 2a08e320 00007ffb 00000004 00000000 ..*............

    0x0b4dfd90: 2a0e0de0 00007ffb 29fe9b72 00007ffb ...*....r..)....

    0x0b4dfda0: 00000000 00000000 2a0e0db0 00007ffb ...........*....

    0x0b4dfdb0: 9ef17f8b 0000b950 00000004 00000000 ....P...........

    0x0b4dfdc0: 00000004 00000000 29e81158 00007ffb ........X..)....

    0x0b4dfdd0: 2a0e0de0 00007ffb 00000000 00000000 ...*............

    0x0b4dfde0: 2a0a7493 00007ffb 21c45df0 00000000 .t.*.....].!....

    0x0b4dfdf0: 0b4dfec0 00000000 29e8117c 00007ffb ..M.....|..)....

    0x0b4dfe00: 21c45df0 00000000 00000000 00000000 .].!............

    0x0b4dfe10: 21d0b208 00000000 0b4dfec0 00000000 ...!......M.....

    0x0b4dfe20: 00000000 00000000 29f4fb76 00007ffb ........v..)....

    0x0b4dfe30: 0000000c 00000000 21d0b20c 00000000 ...........!....

    0x0b4dfe40: 2a0c2e68 00007ffb 2a08e320 00007ffb h..*.... ..*....

    0x0b4dfe50: 00001a62 00000000 2a08e4a4 00007ffb b..........*....

    0x0b4dfe60: 0000262b 00000000 0000000c 00000000 +&..............

    0x0b4dfe70: 21d0b20c 00000000 21d0b200 00000000 ...!.......!....
     
  29. Chiodini

    Chiodini

    Joined:
    Nov 10, 2015
    Posts:
    3
    @lukaszunity is this bug fixed for the QA team?
    I still can't debug anything done on the first frame because Unity crashes.
    Any help would be appreciated :)
     
  30. lukaszunity

    lukaszunity

    Unity Technologies

    Joined:
    Jun 11, 2014
    Posts:
    461
    If you are still experiencing a crash, please file a bug report with a repro project.
     
  31. YARARMAN

    YARARMAN

    Joined:
    Sep 2, 2014
    Posts:
    3
  32. Chiodini

    Chiodini

    Joined:
    Nov 10, 2015
    Posts:
    3
    I filed a bug an got an answer from QA. You just need to turn off the experimental exceptions in the VS options.
    It is likely a new version of the VSTU will fix the issue.
     
    Cameron_SM likes this.