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 (82)

  1. Andrey-Postelzhuk

    Apr 29, 2014 11:58

    I updated my mac to mavericks (10.9.2) and now I can't debug. Did anybody find workaround?

  2. Steazy

    Apr 24, 2014 21:42

    I'm having the exact same issue I'm seeing described by many many other people.

    MacBook Pro Retina, 15-inch, Late 2013
    2.3 GHz Intel Core i7
    16 GB 1600 MHz DDR3
    NVIDIA GeForce GT 750M 2048 MB
    OS X 10.9.2 (13C64)
    Unity Version 4.3.4f1
    2 External Monitors via Thunderbolt

    Wish I had something new to add other than THIS IS TERRIBLE! Our team upgraded to 4.3.4 from 4.2.2 (which was surprisingly difficult, BTW) under the impression that it would fix this problem... Well, it's better... in about a dozen attempts I can sometimes use the debugger with marginal reliability (frequently simple things fail, like step-into stepping out of the current function *mind blown*). I'm back to using Debug.Logs though, because when the debugger doesn't work (~90% of the time?) it invariably deadlocks Unity and MonoDevelop requiring a force restart and many wasted hours.

    If I worked for Unity, I would be downright embarrassed that an issue like this made it out to consumers for even one release. And it's persisted for over a year across how many releases now? Every dev I work with using this configuration experiences the exact same issue, so the repro rate must be damned near 100%. Take the money you make from selling one license, pick up a used Retina MBP, and WORK FOR A LIVING!

  3. temptest123

    Apr 24, 2014 18:31

    This is still an issue in 4.3.4 and affects our development severely!

  4. AndyMartin458

    Apr 22, 2014 01:27

    Unplugging my second monitor did seem to help me be able to actually attach the debugger for the first time in over a month. When we first went to 4.3.1, everything seemed awesome. We could attach and hit breakpoints without a problem. I think that upgrading from OSX 10.9.1 to 10.9.2 might be the culprit. Upgrading Unity to 4.3.4 would be a huge pain for us, and people still seem to have the issue with that version. Please release 4.3.5 with at least a hacky fix until you release 4.4.0

  5. j1mmie

    Apr 12, 2014 08:33

    Still happens for me in Unity 4.3.4f1

    MacBook Pro
    Retina, 15-inch, Late 2013
    OS X 10.9.2
    2.6 GHz Intel Core i7
    16 GB 1600 MHz DDR3
    NVIDIA GeForce GT 750M 2048 MB

    Disabled Power Nap, App Nap, unplugged external monitors. No effect though - I can't even attach to the debugger after hitting play. Is there any more information I can offer to help resolve the bug?

  6. gmxtian

    Apr 02, 2014 21:44

    Okay, here is a clue. The problem with always locking up on Macbook Pro while debugging seems to be related to using a secondary monitor. When I disconnect the monitor I can still do the work-around method of playing first then attaching the debugger.

  7. gmxtian

    Apr 02, 2014 12:49

    The problem got worse when I got my new Macbook Pro, Retina with the Mavericks (10.9.2) and Unity 4.3.4f1. The workaround of playing Unity first and then attaching the debugger used to work sometimes. Now it never works and Unity locks up right away after attaching the debugger. So this problem has been plaguing me for about a year now. It's issues like this that will drive me to Unreal.

  8. kolchaud

    Mar 31, 2014 08:51

    Dear Unity team,

    Please find us at least a workaround, I'm fed up to write Debug.Log.
    I think the priority should be higher as Debugger is one of the basic tools for decent programing.
    We lost a lot of time.
    Thanks to give us an ETA or a workaround ASAP.

  9. 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?

  10. 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]

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.