nativescript-sentry
nativescript-sentry copied to clipboard
kThreadSecondary Error
Which platform(s) does your issue occur on?
- iOS
- iOS 9+
- emulator
Please, provide the following version numbers that your issue occurs with:
- CLI: (run
tns --versionto fetch it) - Cross-platform modules: (check the 'version' attribute in the
node_modules/tns-core-modules/package.jsonfile in your project) - Runtime(s): (look for the
"tns-android"and"tns-ios"properties in thepackage.jsonfile of your project) - Plugin(s): (look for the version numbers in the
package.jsonfile of your project and paste your dependencies and devDependencies here)
Please, tell us how to recreate the issue in as much detail as possible.
Scaffold fresh nativescript project and add the plugin. Then run:
tns run ios
App crashed before starting up with this error:
/Users/jlynch/Git-Projects/Study-App/study-app/platforms/ios/Pods/Sentry/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c:269:19: warning:
result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Wstring-compare]
if(threadName == kThreadSecondary)
^ ~~~~~~~~~~~~~~~~
1 warning generated.
/Users/jlynch/Git-Projects/Study-App/study-app/platforms/ios/Pods/Sentry/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c:269:19: warning:
result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Wstring-compare]
if(threadName == kThreadSecondary)
^ ~~~~~~~~~~~~~~~~
1 warning generated.
/Users/jlynch/Git-Projects/Study-App/study-app/platforms/ios/Pods/Sentry/Sources/Sentry/NSString+SentryNSUIntegerValue.m:22:12: warning: implicit conversion
loses integer precision: 'unsigned long long' to 'NSUInteger' (aka 'unsigned int') [-Wshorten-64-to-32]
return strtoull([self UTF8String], NULL, 0);
~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
/Users/jlynch/Git-Projects/Study-App/study-app/platforms/ios/Pods/Sentry/Sources/SentryCrash/Recording/Monitors/SentryCrashMonitor_MachException.c:269:19: warning:
result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Wstring-compare]
if(threadName == kThreadSecondary)
^ ~~~~~~~~~~~~~~~~
1 warning generated.
I only got
result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Wstring-compare]
if(threadName == kThreadSecondary)
Fixed it by changing
if(threadName == kThreadSecondary)
to
if(strcmp( threadName, kThreadSecondary) == 0)
in SentryCrashMonitor_MachException.c
Thanks, can you open a PR with the fix pls? Modifying a consumed library's code is generally not a good practice.
From what I know this repo is inactive, and FinanzRitter/nativescript-sentry is the active one. I'll see what I can do there. They updated that problem in the newer version of sentry-cocoa so it can probably be done by updating the pod version of sentry-cocoa and migrating code to the new version.