Skip to content
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

SentryFileManager, allFilesContentInFolder App Crashes. #191

Closed
6 tasks
yoon-boom opened this issue Jul 22, 2017 · 1 comment
Closed
6 tasks

SentryFileManager, allFilesContentInFolder App Crashes. #191

yoon-boom opened this issue Jul 22, 2017 · 1 comment
Assignees

Comments

@yoon-boom
Copy link

yoon-boom commented Jul 22, 2017

Platform:

  • [x ] iOS
  • tvOS
  • MacOS
  • watchOS

Swift:

  • Yes -> If yes, which version?
  • [x ] No

sentry-cocoa installed with:

  • [x ] CocoaPods
  • Carthage
  • Manually

Version of sentry-cocoa:
3.0.4 but I see **3.2.0 I still see it.


I have following issue:
SentryFileManager.m line #90, where it reads the serialized data, creation of dictionary failed by [contents addObject:@{@"path": finalPath, @"data": [fileManager contentsAtPath:finalPath]}]; where file name was .dat.nosync44a5.osxiP1.
Description goes here ...

  • File doesn't exist on physical folder.
  • Show all Hidden Files activated, but still no see a file name with .dat.nosync44a5.osxiP1.
  • Other .json files are there.
  • It happens on real device.

Steps to reproduce:

  • Step
    // !!! Important, it might not happen because of the JSON validation fails.
  1. Sending Crash Report with additional data.
  2. JSON validation failed from SentryNSURLRequest. (I guess my data structure contains the unsupported by NSJSONSerialization)
  3. line Please expose an API to check if there are pending crash reports #156 on SentryClient if (nil != requestError) { writes log
  4. Restart the App.
  5. Not always, but often I get into critical

Actual result:

  • Actual
    Obviously, [contents addObject:@{@"path": finalPath, @"data": [fileManager contentsAtPath:finalPath]}]; are inserting null data value crashes. It should check the existence file or create category for mutable dictionary to ignore nil value and bypass.

Expected result:

  • Result
    By passes and iterate to next one.

Here is the Screenshot
screen shot 2017-07-21 at 5 11 19 pm

#0	0x0000000108ad8111 in objc_exception_throw ()
#1	0x0000000103600a62 in -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] ()
#2	0x00000001036008cb in +[NSDictionary dictionaryWithObjects:forKeys:count:] ()
#3	0x00000001049bad7c in -[SentryFileManager allFilesContentInFolder:] at /Users/yoonlee/Desktop/BlackCloset/Pods/Sentry/Sources/Sentry/SentryFileManager.m:90
#4	0x00000001049baada in -[SentryFileManager getAllStoredBreadcrumbs] at /Users/yoonlee/Desktop/BlackCloset/Pods/Sentry/Sources/Sentry/SentryFileManager.m:82
#5	0x00000001049b1ab8 in -[SentryBreadcrumbStore serialize] at /Users/yoonlee/Desktop/BlackCloset/Pods/Sentry/Sources/Sentry/SentryBreadcrumbStore.m:63
#6	0x00000001049b3c8d in -[SentryClient setSharedPropertiesOnEvent:] at /Users/yoonlee/Desktop/BlackCloset/Pods/Sentry/Sources/Sentry/SentryClient.m:232
#7	0x00000001049b293a in -[SentryClient sendEvent:useClientProperties:withCompletionHandler:] at /Users/yoonlee/Desktop/BlackCloset/Pods/Sentry/Sources/Sentry/SentryClient.m:145
#8	0x00000001049b2756 in -[SentryClient sendEvent:withCompletionHandler:] at /Users/yoonlee/Desktop/BlackCloset/Pods/Sentry/Sources/Sentry/SentryClient.m:137
#9	0x0000000101b622dc in __40+[App sendSentryMessage:level:userInfo:]_block_invoke at /Users/yoonlee/Desktop/BlackCloset/blackcloset/Classes/App.m:889
#10	0x00000001049b4a78 in __35-[SentryClient snapshotStacktrace:]_block_invoke at /Users/yoonlee/Desktop/BlackCloset/Pods/Sentry/Sources/Sentry/SentryClient.m:348
#11	0x00000001049bcbfa in __58-[SentryKSCrashInstallation sendAllReportsWithCompletion:]_block_invoke at /Users/yoonlee/Desktop/BlackCloset/Pods/Sentry/Sources/Sentry/SentryKSCrashInstallation.m:57
#12	0x00000001043aa9fd in kscrash_callCompletion at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Reporting/Filters/KSCrashReportFilter.h:72
#13	0x00000001043aa93a in __40-[KSCrash sendAllReportsWithCompletion:]_block_invoke at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Recording/KSCrash.m:354
#14	0x00000001043aa9fd in kscrash_callCompletion at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Reporting/Filters/KSCrashReportFilter.h:72
#15	0x00000001043ab2d9 in __36-[KSCrash sendReports:onCompletion:]_block_invoke at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Recording/KSCrash.m:438
#16	0x00000001043c98fd in kscrash_callCompletion at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Reporting/Filters/KSCrashReportFilter.h:72
#17	0x00000001043ccea6 in __58-[KSCrashReportFilterPipeline filterReports:onCompletion:]_block_invoke.150 at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Reporting/Filters/KSCrashReportFilterBasic.m:341
#18	0x00000001049c327c in __54-[SentryKSCrashReportSink filterReports:onCompletion:]_block_invoke at /Users/yoonlee/Desktop/BlackCloset/Pods/Sentry/Sources/Sentry/SentryKSCrashReportSink.m:59
#19	0x00000001064dc4a6 in _dispatch_call_block_and_release ()
#20	0x000000010650505c in _dispatch_client_callout ()
#21	0x00000001064e4dcd in _dispatch_queue_override_invoke ()
#22	0x00000001064e6ec4 in _dispatch_root_queue_drain ()
#23	0x00000001064e6bef in _dispatch_worker_thread3 ()
#24	0x0000000109950616 in _pthread_wqthread ()
#25	0x00000001099500f1 in start_wqthread ()
Enqueued from com.apple.main-thread (Thread 1)Queue : com.apple.main-thread (serial)
#0	0x00000001064e5421 in _dispatch_root_queue_push_override ()
#1	0x00000001049c2c54 in -[SentryKSCrashReportSink filterReports:onCompletion:] at /Users/yoonlee/Desktop/BlackCloset/Pods/Sentry/Sources/Sentry/SentryKSCrashReportSink.m:43
#2	0x00000001043cce4c in __58-[KSCrashReportFilterPipeline filterReports:onCompletion:]_block_invoke.150 at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Reporting/Filters/KSCrashReportFilterBasic.m:336
#3	0x00000001043c98fd in kscrash_callCompletion at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Reporting/Filters/KSCrashReportFilter.h:72
#4	0x00000001043cc606 in -[KSCrashReportFilterPipeline filterReports:onCompletion:] at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Reporting/Filters/KSCrashReportFilterBasic.m:292
#5	0x00000001043cc91e in -[KSCrashReportFilterPipeline filterReports:onCompletion:] at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Reporting/Filters/KSCrashReportFilterBasic.m:348
#6	0x00000001043ab1ea in -[KSCrash sendReports:onCompletion:] at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Recording/KSCrash.m:435
#7	0x00000001043aa7d5 in -[KSCrash sendAllReportsWithCompletion:] at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Recording/KSCrash.m:341
#8	0x00000001043b3e2a in -[KSCrashInstallation sendAllReportsWithCompletion:] at /Users/yoonlee/Desktop/BlackCloset/Pods/KSCrash/Source/KSCrash/Installations/KSCrashInstallation.m:355
#9	0x00000001049bca44 in -[SentryKSCrashInstallation sendAllReportsWithCompletion:] at /Users/yoonlee/Desktop/BlackCloset/Pods/Sentry/Sources/Sentry/SentryKSCrashInstallation.m:51
#10	0x00000001049b49ad in -[SentryClient snapshotStacktrace:] at /Users/yoonlee/Desktop/BlackCloset/Pods/Sentry/Sources/Sentry/SentryClient.m:347
#11	0x0000000101b62165 in +[App sendSentryMessage:level:userInfo:] at /Users/yoonlee/Desktop/BlackCloset/blackcloset/Classes/App.m:880
#12	0x0000000101abcb40 in __45-[BBShowroomGroupsViewController viewDidLoad]_block_invoke at /Users/yoonlee/Desktop/BlackCloset/blackcloset/Classes/ViewControllers/BBShowroomGroupsViewController.m:221
#13	0x0000000101acc4d4 in __73-[BBShowroomGroupsViewController assembleMainComponents:completionBlock:]_block_invoke.894 at /Users/yoonlee/Desktop/BlackCloset/blackcloset/Classes/ViewControllers/BBShowroomGroupsViewController.m:1523
#14	0x00000001064dc4a6 in _dispatch_call_block_and_release ()
#15	0x000000010650505c in _dispatch_client_callout ()
#16	0x00000001064e640b in _dispatch_main_queue_callback_4CF ()
#17	0x00000001036aa909 in __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ ()
#18	0x0000000103670ae4 in __CFRunLoopRun ()
#19	0x0000000103670016 in CFRunLoopRunSpecific ()
#20	0x000000010ac2ea24 in GSEventRunModal ()
#21	0x0000000104afe134 in UIApplicationMain ()
#22	0x0000000101a67a5f in main at /Users/yoonlee/Desktop/BlackCloset/blackcloset/main.m:15
#23	0x000000010655165d in start ()
@HazAT
Copy link
Member

HazAT commented Jul 24, 2017

Hey, I've just released 3.2.1 which should fix the issue.
Please upgrade and see if it works.

@HazAT HazAT self-assigned this Jul 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants