-
-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++ NoMethodError Exception does not provide anything useful in sentry.io UI #935
Comments
Hi, @georges, |
It seems like we are not able to get the thread that causes the error. A |
@georges I took the liberty to investigate this particular issue on your account and the error you see here is indeed raised by an embedded ruby runtime. Could it be that you're invoking an embedded ruby script that raises that error? If that's the case you might have to capture the ruby error at the boundary. Depending on your setup you might be able to capture the errors within your embedded ruby interpreter with the ruby SDK and report them separately and then silence them elsewhere. I'm assuming whatever it is you're using will propagate ruby exceptions (which are normally 'thrown' via longjmp) into a regular C++ exception at the boundary. If we can capture a stack trace for C++ exceptions or not depends on if sentry-cocoa/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_CPPException.cpp Lines 75 to 94 in 86411cd
|
Thanks for investigating. I should have mentioned that this is a macOS app built with RubyMotion, hence why there are ruby references there. However, as far as I can understand, it's not interpreted but compiled. RubyMotion is an evolution of MacRuby, an implementation of Ruby 1.9 directly on top of Mac OS X core technologies such as the Objective-C runtime and garbage collector, the LLVM compiler infrastructure and the Foundation and ICU frameworks. I don't understand all the magic that's involved there, only that it makes the programer life an order of magnitude happier :) So based on your suggestion, I'm gonna try to see if I can explicitly trap NoMethodError exception. What would be the best mechanism to send that information to Sentry so that it shows up as an event? |
@mitsuhiko according to the docs, RubyMotion uses the Objective-C runtime and is completely different than CRuby. @georges, how do you use Sentry in your project? Does it work for other types of errors? |
@georges for native errors to have sensible back traces they need to be captured where the exception is raised, not where it's captured. For different languages we do this in different ways. My guess is that RubyMotion does this in a way we do not support currently. I'm not sure how RubyMotion works but potentially you can use the ruby SDK we provide and capture exceptions at the boundary between objc and ruby. Though not sure if the SDK supports RubyMotion. |
@philipphofmann I use the sentry sdk like a Objective-C app would. It works reasonably well with most crash. For example here it did provide the right stack trace for a similar NoMethodError I understand I'm probably using the sdk not in the way it was intended. Just wanted to make sure I'm not missing something simple in the configuration. BTW, I tried to use |
Maybe merging some of the latest changes from KSCrashMonitor_MachException to SentryCrashMonitor_MachException could solve the issue. The same applies for KSCrashMonitor_CPPException |
Could be useful to look at the fixes added in: That seems to solve crashes related with C++ Exceptions |
Thanks @georges. We'll take a look. |
Still a problem with 7.31.5. I can't test with 8.1.0 because of the swift dependency. |
Thanks for the update, @georges. Can you share some insights on why you can't update because of the Swift dependency? |
RubyMotion does not support Swift based cocoapods. There might be some workaround but I did not investigate further. |
Platform:
Swift:
sentry-cocoa installed with:
Version of sentry-cocoa:
6.0.10
I have following issue:
I've receive sentry report of C++ Exception NoMethodError events. When I look at the various thread dump attached, there is nothing useful, i.e. I can't see an place in the code that would have triggered that exception.
I see a couple threads in
Transceive 0x0001000fb29c handleExceptions (Sentry/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c:258)
and
Transceive 0x0001000fb2d2 handleExceptions (Sentry/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c:266)
but nothing more specific about my application itself.
Am I missing something? Happy to provide more details, I don't know what would help.
The text was updated successfully, but these errors were encountered: