Skip to content
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.

kThreadSecondary Error #49

Open
JimLynchCodes opened this issue Oct 3, 2020 · 3 comments
Open

kThreadSecondary Error #49

JimLynchCodes opened this issue Oct 3, 2020 · 3 comments

Comments

@JimLynchCodes
Copy link

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 --version to fetch it)
  • Cross-platform modules: (check the 'version' attribute in the
    node_modules/tns-core-modules/package.json file in your project)
  • Runtime(s): (look for the "tns-android" and "tns-ios" properties in the package.json file of your project)
  • Plugin(s): (look for the version numbers in the package.json file 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.

@forgm
Copy link

forgm commented Nov 4, 2020

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

@JimLynchCodes
Copy link
Author

Thanks, can you open a PR with the fix pls? Modifying a consumed library's code is generally not a good practice.

@forgm
Copy link

forgm commented Nov 13, 2020

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants