Search Issue Tracker

Fixed in 4.5.X

Votes

225

Found in

4.3.0f2

Issue ID

573949

Regression

No

Stepping out while debugging causes the standalone player to freeze

Mono

-

To reproduce:
1. Build Angry bots x64 standalone on OSX 10.9
2. Put a breakpoint in FreeMovementMotor line 18
3. Pin some variables
4. Attach to player
5. Hit breakpoint, step through some code
5. Player crashes (stack trace attached)

Expected result: Debugging proceeds
Actual result: player freezes

*Note :

The issue is related to Stepping Out when debugging and is fixed. We found another issue related to Stepping Over which has the same result, the player freezing but it only occurs when using Step Over.

Comments (84)

  1. ShaneStevens

    Mar 28, 2014 01:06

    This is insane. It's nearly April and not a single word from Unity. Paying customers are not able to interactively debug their code. We can't just upgrade to the latest Unity 4.3x, it actually performs worse for our game, so we're stuck using log prints.

    UNITY - WHAT IS HAPPENING HERE?

  2. rejemy

    Mar 26, 2014 23:57

    Happening on Unity 4.3.4f1, OS X 10.7.5. Details:

    Debugging is possible if you attach the debugger after the game has started. If the debugger is attached when you hit play in Unity, a deadlock occurs in both Unity and MonoDevelop, and both must be killed.

    Steps to reproduce:

    Edit some C# code in your project
    Use MonoDevelop debugger to attach to your Unity Editor process
    Hit play in Unity

    Observe the spinning beachball of eternity, as Unity deadlocks somewhere inside mono code. Crash Reporter find the following stack traces (which seem to hint towards a deadlock involving compiling mono code, and maybe garbage collection?):

    Thread 0x6a356
    User stack:
    6 start + 53 (in Unity) [0x3375]
    6 main + 24 (in Unity) [0x13c00e8]
    6 EditorMain(int, char const**) + 1227 (in Unity) [0x13bfd3b]
    6 NSApplicationMain + 1054 (in AppKit) [0x90707ac5]
    6 -[NSApplication run] + 911 (in AppKit) [0x90476ac1]
    6 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 113 (in AppKit) [0x9047a752]
    6 _DPSNextEvent + 678 (in AppKit) [0x9047aee8]
    6 BlockUntilNextEventMatchingListInMode + 88 (in HIToolbox) [0x9a3fb71a]
    6 ReceiveNextEventCommon + 168 (in HIToolbox) [0x9a3fb7d6]
    6 RunCurrentEventLoopInMode + 318 (in HIToolbox) [0x9a3f4543]
    6 CFRunLoopRunInMode + 120 (in CoreFoundation) [0x91573088]
    6 CFRunLoopRunSpecific + 332 (in CoreFoundation) [0x915731dc]
    6 __CFRunLoopRun + 1888 (in CoreFoundation) [0x91573cd0]
    6 __CFRunLoopDoTimer + 743 (in CoreFoundation) [0x91594c37]
    6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22 (in CoreFoundation) [0x915952a6]
    6 __NSFireTimer + 166 (in Foundation) [0x96f83bab]
    6 -[EditorApplication TickTimer] + 24 (in Unity) [0x13ae6b8]
    6 Application::TickTimer() + 2214 (in Unity) [0x11f9826]
    6 Application::SetIsPlaying(bool) + 1206 (in Unity) [0x11f6628]
    6 Application::UpdateScene(bool) + 815 (in Unity) [0x11f4aef]
    6 GUIView::RepaintAll(bool) + 574 (in Unity) [0x13b93de]
    6 -[OpenGLView drawRect:] + 339 (in Unity) [0x13a6793]
    6 -[GUIOpenGLView renderRect:] + 310 (in Unity) [0x13b6996]
    6 GUIView::OnInputEvent(InputEvent&) + 459 (in Unity) [0x13bbcbf]
    6 GUIView::SendLayoutEvent(GUIState&) + 140 (in Unity) [0x13bba98]
    6 MonoBehaviour::DoGUI(MonoBehaviour::GUILayoutType, int) + 518 (in Unity) [0x879d52]
    6 ScriptingInvocationNoArgs::Invoke(MonoException**) + 100 (in Unity) [0x8929fe]
    6 scripting_method_invoke(ScriptingMethod*, MonoObject*, ScriptingArguments&, MonoException**) + 270 (in Unity) [0x6dddbe]
    6 mono_runtime_invoke + 186 (in libmono.0.dylib) [0x431a5ca]
    6 ??? (in libmono.0.dylib) [0x40dd332]
    6 ??? [0x13affa7f]
    6 ??? [0x14d0f9f4]
    6 ??? [0x14d14bf7]
    6 ??? [0x14d14e8a]
    6 ??? [0x5d51066]
    6 mono_magic_trampoline + 3457 (in libmono.0.dylib) [0x41bd891]
    6 mono_compile_method + 99 (in libmono.0.dylib) [0x4316ec3]
    6 mono_jit_compile_method + 65 (in libmono.0.dylib) [0x40dc551]
    6 ??? (in libmono.0.dylib) [0x40e833d]
    6 ??? (in libmono.0.dylib) [0x40e7238]
    6 mono_compile_method + 99 (in libmono.0.dylib) [0x4316ec3]
    6 mono_jit_compile_method + 65 (in libmono.0.dylib) [0x40dc551]
    6 ??? (in libmono.0.dylib) [0x40e833d]
    6 ??? (in libmono.0.dylib) [0x40e7fd9]
    6 mono_profiler_method_end_jit + 167 (in libmono.0.dylib) [0x432fa27]
    6 ??? (in libmono.0.dylib) [0x41f1a01]
    6 ??? (in libmono.0.dylib) [0x41e5e6f]
    6 mono_loader_lock + 37 (in libmono.0.dylib) [0x42b5485]
    6 __psynch_mutexwait + 10 (in libsystem_kernel.dylib) [0x93639876]

    Thread 0x6a36b
    User stack:
    6 thread_start + 34 (in libsystem_c.dylib) [0x99baf6de]
    6 _pthread_start + 335 (in libsystem_c.dylib) [0x99babed9]
    6 GC_start_routine + 142 (in libmono.0.dylib) [0x440320e]
    6 ??? (in libmono.0.dylib) [0x43bf2b1]
    6 ??? (in libmono.0.dylib) [0x41dff8a]
    6 ??? (in libmono.0.dylib) [0x41e9ab4]
    6 ??? (in libmono.0.dylib) [0x41de2e2]
    6 ??? (in libmono.0.dylib) [0x41de128]
    6 mono_loader_lock + 37 (in libmono.0.dylib) [0x42b5485]
    6 __psynch_mutexwait + 10 (in libsystem_kernel.dylib) [0x93639876]

    Thread 0x6a3cd
    User stack:
    6 thread_start + 34 (in libsystem_c.dylib) [0x99baf6de]
    6 _pthread_start + 335 (in libsystem_c.dylib) [0x99babed9]
    6 GC_start_routine + 142 (in libmono.0.dylib) [0x440320e]
    6 ??? (in libmono.0.dylib) [0x43bf2b1]
    6 ??? (in libmono.0.dylib) [0x436de23]
    6 ??? (in libmono.0.dylib) [0x437330d]
    6 WaitForSingleObjectEx + 737 (in libmono.0.dylib) [0x43baa21]
    6 _wapi_handle_wait_signal_handle + 59 (in libmono.0.dylib) [0x439bc7b]
    6 _wapi_handle_timedwait_signal_handle + 633 (in libmono.0.dylib) [0x439bc09]
    6 pthread_cond_wait$UNIX2003 + 71 (in libsystem_c.dylib) [0x99b6042c]
    6 __psynch_cvwait + 10 (in libsystem_kernel.dylib) [0x9363983e]

    Thread 0x6a761
    User stack:
    6 thread_start + 34 (in libsystem_c.dylib) [0x99baf6de]
    6 _pthread_start + 335 (in libsystem_c.dylib) [0x99babed9]
    6 Thread::RunThreadWrapper(void*) + 65 (in Unity) [0x9743f9]
    6 PreloadManager::Run(void*) + 37 (in Unity) [0x7f079b]
    6 PreloadManager::Run() + 364 (in Unity) [0x7f0c32]
    6 PreloadLevelOperation::Perform() + 1893 (in Unity) [0x7efbdb]
    6 PersistentManager::LoadFileCompletelyThreaded(std::string const&, int*, int*, int, bool, LoadProgress*) + 1360 (in Unity) [0x90ed66]
    6 SerializedFile::ReadObject(int, int, ObjectCreationMode, bool, TypeTree**, bool*, Object**) + 1272 (in Unity) [0x9260c6]
    6 MonoBehaviour::VirtualRedirectTransfer(YAMLRead&) + 519 (in Unity) [0x83cccf]
    6 MonoBehaviour::SetScript(PPtr<MonoScript> const&, MonoObject*) + 39 (in Unity) [0x876441]
    6 MonoBehaviour::RebuildMonoInstanceFromScriptChange(MonoObject*) + 43 (in Unity) [0x876345]
    6 MonoBehaviour::RebuildMonoInstance(MonoObject*) + 1417 (in Unity) [0x8761bd]
    6 mono_runtime_object_init_exception(MonoObject*, MonoException**) + 376 (in Unity) [0x6dc7f8]
    6 mono_runtime_invoke_profiled(MonoMethod*, MonoObject*, void**, MonoException**, MonoClass*) + 294 (in Unity) [0x6dd046]
    6 mono_runtime_invoke + 186 (in libmono.0.dylib) [0x431a5ca]
    6 ??? (in libmono.0.dylib) [0x40dd332]
    6 ??? [0x13affa7f]
    6 ??? [0x5d51066]
    6 mono_magic_trampoline + 3457 (in libmono.0.dylib) [0x41bd891]
    6 mono_compile_method + 99 (in libmono.0.dylib) [0x4316ec3]
    6 mono_jit_compile_method + 65 (in libmono.0.dylib) [0x40dc551]
    6 ??? (in libmono.0.dylib) [0x40e82d5]
    6 mono_runtime_class_init_full + 2243 (in libmono.0.dylib) [0x4326113]
    6 mono_runtime_invoke + 186 (in libmono.0.dylib) [0x431a5ca]
    6 ??? (in libmono.0.dylib) [0x40dd332]
    6 ??? [0x1017c518]
    6 ??? [0x5d51474]
    6 ??? (in libmono.0.dylib) [0x41be185]
    6 mono_class_fill_runtime_generic_context + 498 (in libmono.0.dylib) [0x4296422]
    6 ??? (in libmono.0.dylib) [0x4295fd3]
    6 ??? (in libmono.0.dylib) [0x4294cbf]
    6 ??? (in libmono.0.dylib) [0x429483b]
    6 mono_loader_lock + 37 (in libmono.0.dylib) [0x42b5485]
    6 ??? [0xffffffff]
    6 _sigtramp + 43 (in libsystem_c.dylib) [0x99c0359b]
    6 ??? (in libmono.0.dylib) [0x424179d]
    6 mono_debugger_agent_thread_interrupt + 628 (in libmono.0.dylib) [0x41f08b4]
    6 mono_jit_walk_stack_from_ctx_in_thread + 422 (in libmono.0.dylib) [0x41b90d6]
    6 mono_find_jit_info_ext + 318 (in libmono.0.dylib) [0x41b8d9e]
    6 mono_arch_find_jit_info_ext + 750 (in libmono.0.dylib) [0x4239d9e]
    6 mono_method_signature + 70 (in libmono.0.dylib) [0x42b5856]
    6 mono_loader_lock + 37 (in libmono.0.dylib) [0x42b5485]
    6 __psynch_mutexwait + 10 (in libsystem_kernel.dylib) [0x93639876]

  3. SigKST

    Mar 25, 2014 19:52

    No amount of workarounds makes this ok to leave unresolved. Still seeing this and variations of this in 4.3.4f1.

  4. disturbing

    Mar 20, 2014 21:26

    This is still an issue =/ So annoying!

  5. Troyminator

    Mar 11, 2014 15:29

    Still seeing this in 4.3.4. Additionally, I'm seeing the following, which I believe is related:

    - Start Unity game by hitting play.
    - Set a breakpoint and attach the debugger to the Unity process.
    - Make sure the code hits that breakpoint.
    - Hit 'Go' in the debugger.
    - Detach the debugger.
    - Quit MonoDevelop.
    - MonoDevelop freezes without actually quitting. Force Quit required to close the process

    Running Mac OS X 10.8.5
    27-inch iMac, Late 2012 Model
    3.4 GHz Core i7
    8 GB 1600MHz DDR3 RAM
    Unity 4.3.4f1
    MonoDevelop 4.0.1

    Hope this helps.

  6. AquaGhost

    Feb 26, 2014 19:42

    Still getting this on 4.3.4 late 2013 macbook pro retina 15.

  7. Cybexx

    Feb 26, 2014 01:22

    4.3.4f1 with Mavericks is debuggable but only if the debugger isn't attached while the script is compiling. If Unity goes into script compilation with the debugger I am getting 100% crash rate around multiple projects and multiple machines.

    If you attach the debugger after play mode is running then I never get a crash but if after that I stop Play mode and hit Play again it will crash if that causes the compiler to trigger.

  8. Stephan_v

    Feb 20, 2014 18:37

    @RELAYONE those are how many votes you have personally left to devote to issues. There is no vote threshold for bugs in that manner.

  9. relayOne

    Feb 19, 2014 15:07

    Why is the "votes left" frozen at "9"? I've seen votes increase from 50 to 124, and the entire time the "votes left" has been locked on 9. I'm getting the impression that this issue is not important to Unity, and it doesn't matter how many votes this issue is getting.

  10. davekalina

    Feb 18, 2014 20:32

    Worth noting that I am running MacOS 10.8.5, Unity 4.3.4f1, and MonoDevelop 4.0.1

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.