Omnisharp-vscode: Debugger (vsdbg-ui) crashes on OSX when using 'embedded' symbols

Created on 4 May 2017  路  11Comments  路  Source: OmniSharp/omnisharp-vscode

Environment data

C# Extension version: 1.9
Operating system: OSX

Steps to reproduce

  1. Create a new console app
  2. Open the .csproj and add this property: <DebugType>embedded</DebugType>
  3. F5

Expected behavior

Debugging works

Actual behavior

Get an error 'Debug adapter process has terminated unexpectedly'. If you look it crash reporter, you will see, for example that the crash is happening in MakeStream

...
Crashed Thread:        18

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x000000000102031c
...
Thread 18 Crashed:
0   libsystem_malloc.dylib          0x00007fffbbd8f27e malloc_zone_malloc + 103
1   libvsbaseservices.dylib         0x000000010a7d63f8 HeapAlloc + 40
2   libvsdebugeng.impl.dylib        0x000000010ab2c11e MakeStream(unsigned char const*, unsigned int, IStream**) + 46
3   libvsdebugeng.impl.dylib        0x000000010ab03fc8 SymProvider::CDiaLoader::LoadSymbolsForModuleInstance(Microsoft::VisualStudio::Debugger::DkmModuleInstance*) + 312
4   libvsdebugeng.dylib             0x000000010acd3cc2 dispatcher::DkmModuleInstance::FireCreateEvent() + 274
5   libvsdebugeng.dylib             0x000000010acd3acd dispatcher::Clr::DkmClrModuleInstance::Create(_GUID const&, dispatcher::DkmString*, dispatcher::DkmString*, unsigned long, dispatcher::DkmModuleVersion*, dispatcher::Symbols::DkmSymbolFileId*, dispatcher::DkmModuleFlags, dispatcher::DkmModuleMemoryLayout, unsigned long, unsigned int, unsigned int, dispatcher::DkmString*, dispatcher::Clr::DkmClrRuntimeInstance*, _GUID const&, dispatcher::Clr::DkmClrModuleFlags, dispatcher::Clr::DkmClrAppDomain*, unsigned int, bool, dispatcher::Symbols::DkmModule*, dispatcher::DkmModuleInstance::MinidumpInfo const*, dispatcher::DkmDataItem const&, dispatcher::Clr::DkmClrModuleInstance**) + 957
6   libvsdebugeng.dylib             0x000000010acd4175 ProcAEA58B7861C86E08A55546A1C4D0ACAD + 229
7   libvsdebugeng.impl.dylib        0x000000010aa9512c ManagedDM::CDbiCallback::DoLoadModuleImpl(ManagedDM::CClrInstance*, unsigned int, Microsoft::VisualStudio::Debugger::Clr::DkmClrAppDomain*, ICorDebugModule*, Microsoft::VisualStudio::Debugger::DkmModuleFlags, Microsoft::VisualStudio::Debugger::DkmString*, Microsoft::VisualStudio::Debugger::Clr::DkmClrModuleInstance**, ManagedDM::CDMModule**) + 2604
8   libvsdebugeng.impl.dylib        0x000000010aa95d4d ManagedDM::CDbiCallback::DoLoadModule(ICorDebugAppDomain*, ICorDebugModule*, Microsoft::VisualStudio::Debugger::DkmModuleFlags, Microsoft::VisualStudio::Debugger::Clr::DkmClrModuleInstance**) + 253
Debugger Resolved-Fixed

Most helpful comment

I have a PR out in our internal repo. So this should be fixed the next time we insert a new debugger.

All 11 comments

I have a PR out in our internal repo. So this should be fixed the next time we insert a new debugger.

@gregg-miskelly could you please provide a new beta with #1497 merged?

I believe Dustin is about to release a new beta that will have this. @DustinCampbell is that correct?

You're welcome to @gregg-miskelly. I'm completely swamped with an issue at the moment.

@DustinCampbell will do.

@azinoviev Please try installing v1.10.0-beta4 and see if this resolves your issue. See here for instructions.

Thanks a lot! xUnit debugging works now :) A real lifesaver!

@azinoviev thanks for verifying!

Gotta give my thanks on this too... between VSCode and JetBrains Rider, I had no way to debug my unit tests for a while. Thanks a lot!

StackExchange.Redis 1.2.3 still seems to crash under Visual Studio for Mac 7.0.1 (build 24), it is now working properly under Visual Studio Code (on Mac).

@llint I believe the Visual Studio for Mac alpha channel has the fix.

Was this page helpful?
0 / 5 - 0 ratings