Debugger crashes on a certain solution
The debugger works fine on a few solutions I've tried it with. It however crashes on a certain solution. I create a new ".NET Executable" configuration and hit F5, and I instantly get a SIGABRT. When I paste the mono debug command in a command line (but set `suspend` to `n`), my process runs to completion just fine. So I suspect the error doesn't come from the debugged process, but from Rider itself. Also, the stack trace seems to indicate that it happens while Rider is trying to get type info (see the stack trace below).
I am pretty sure I've step debugged this solution before, with the same Rider version, so one idea I had was that some symbols might be outdated/wrong. I figured I'd try to delete the ReSharper cache, and after searching a bit, I found `~/.local/share/JetBrains/Transient/ReSharperHost/v08/SolutionCaches/_<MySolution>.<SomeNumbers>`, which I tried to delete, but that didn't help.
Here's the command Rider runs, which works fine when I run it in a terminal (except I set `suspend` to `n`):
`/Library/Frameworks/Mono.framework/Versions/Current/bin/mono --debug --debugger-agent=transport=dt_socket,server=y,suspend=y,address=127.0.0.1:55555,setpgid=y /path/to/my.exe --some-arg`
Here's the stack trace:
Native stacktrace:
0 mono 0x000df3d6 mono_handle_native_sigsegv + 342
1 mono 0x001322a1 sigabrt_signal_handler + 145
2 libsystem_platform.dylib 0xa18bde5b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 libsystem_c.dylib 0xa1743a34 abort + 141
5 mono 0x002961b1 monoeg_log_default_handler + 129
6 mono 0x002962ab monoeg_assertion_message + 107
7 mono 0x00176b83 mono_loader_assert_no_error + 115
8 mono 0x0013ad2e mono_class_create_from_typedef + 174
9 mono 0x00149dee mono_class_get_checked + 254
10 mono 0x0014ac29 mono_class_from_name_checked_aux + 1145
11 mono 0x0013abd5 mono_class_from_typeref_checked + 1221
12 mono 0x00149dd8 mono_class_get_checked + 232
13 mono 0x0019aeb9 mono_metadata_parse_type_internal + 1593
14 mono 0x0019ecfe mono_metadata_parse_mh_full + 1374
15 mono 0x0017b646 mono_method_get_header + 614
16 mono 0x0010fdda method_commands_internal + 346
17 mono 0x00107e40 debugger_thread + 5104
18 mono 0x0028e9bd inner_start_thread + 349
19 libsystem_pthread.dylib 0xa18c7047 _pthread_body + 184
20 libsystem_pthread.dylib 0xa18c6f8f _pthread_body + 0
21 libsystem_pthread.dylib 0xa18c684a thread_start + 34
I'm using mono 4.4.2 and my Rider specs are as follows:
Rider 2017.1.1
Build #RD-171.4456.2813, built on August 21, 2017
Licensed to Rider Evaluator
Expiration date: September 16, 2017
JRE: 1.8.0_112-release-736-b22 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6
Any tips on how to solve this issue, or how to better investigate it?
Please sign in to leave a comment.
Is it possible for you to try newer mono?
Unfortunately this is a rather large and complicated project, so we can't upgrade quite yet. I can however see if it's possible to try a newer version temporarily with a stripped-down version of the project.
I'll also try Rider on a different machine, to see if that makes a difference.
It will help much if you share with us some project at which problem can be reproduced. You can attach it privately to YouTrack issue or we can sign NDA, if needed.
Sharing logs from Rider Help-Show log in Files may also help. Thanks!
Thanks Ivan! I think I'm getting closer to figuring out what exactly is triggering the issue. As soon as I understand it properly, I'll make a reproduction.
I've figured out what the issue is now, and created a reproduction at https://github.com/knatten/DebugCrasher.
Everything is described in the README, so you can have a look at that before deciding whether to investigate this issue at all. As you can see, I think the issue is low priority, and is mostly due to us having a stupid issue in our own code.
Please let me know if you have any questions or comments, either here or as issues on the repro repo.
Wow! Many thanks for such a detailed report!
No worries Ivan, as a developer of developer tools myself, I know how frustrating bad bug reports are! :)
Hi! I reproduced it only on Mono 4.4.2, everything works fine using Mono 5.2.0. I will investigate this issue, maybe we could help you somehow
Hi Arseny,
We'll be ok, we're already refactoring our projects to avoid this problem in the first place.
Since this is such a corner case issue, which is even fixed with newer versions of Mono, I'd be perfectly happy with you just closing the issue.