kean / Pulse

Network logger for Apple platforms
https://pulselogger.com
MIT License
6.32k stars 302 forks source link

Search without scope selection leads to a crash #165

Closed bulymenko closed 1 year ago

bulymenko commented 1 year ago

Throws an "Range or index out of bounds" in character(at:) here: ConsoleSearchService.swift.149

Call stack

``` *** First throw call stack: ( 0 CoreFoundation 0x00007ff800427378 __exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007ff80004dbaf objc_exception_throw + 48 2 CoreFoundation 0x00007ff8004ae641 -[__NSCFString characterAtIndex:].cold.1 + 0 3 CoreFoundation 0x00007ff8004ae66a -[__NSCFString getCharacters:range:].cold.1 + 0 4 CoreFoundation 0x00007ff80035f0b8 -[__NSCFString characterAtIndex:] + 95 5 app 0x00000001090f2100 $s7PulseUI20ConsoleSearchServiceC6search33_CDBEA9F3FD0DA341A97D56890E5CC9B5LLySayAA0cD10OccurrenceVGSo8NSStringC_AA0cD10ParametersVAA0cD5ScopeOtF + 3072 6 app 0x00000001090f42ff $s7PulseUI20ConsoleSearchServiceC6search33_CDBEA9F3FD0DA341A97D56890E5CC9B5LL2in10parametersSayAA0cD10OccurrenceVGSg0A017NetworkTaskEntityC_AA0cD10ParametersVtF + 4623 7 app 0x00000001090f1434 $s7PulseUI20ConsoleSearchServiceC7_search33_CDBEA9F3FD0DA341A97D56890E5CC9B5LL_10parametersSayAA0cD10OccurrenceVGSg0A017NetworkTaskEntityC_AA0cD10ParametersVtF + 308 8 app 0x00000001090f1059 $s7PulseUI20ConsoleSearchServiceC6search_10parametersSayAA0cD10OccurrenceVGSgSo15NSManagedObjectC_AA0cD10ParametersVtF + 393 9 app 0x00000001090cf9e9 $s7PulseUI22ConsoleSearchOperationC6_start33_4C9FCC60AE1D173083FD8D461C4DF978LLyyF + 1177 10 app 0x00000001090cf52d $s7PulseUI22ConsoleSearchOperationC6resumeyyFyycfU_ + 45 11 app 0x00000001033715d8 $sIeg_IeyB_TR + 40 12 CoreData 0x00007ff804953487 developerSubmittedBlockToNSManagedObjectContextPerform + 151 13 libdispatch.dylib 0x0000000124686f5b _dispatch_client_callout + 8 14 libdispatch.dylib 0x000000012468ed41 _dispatch_lane_serial_drain + 1064 15 libdispatch.dylib 0x000000012468fb1b _dispatch_lane_invoke + 441 16 libdispatch.dylib 0x000000012469df13 _dispatch_workloop_worker_thread + 959 17 libsystem_pthread.dylib 0x00007ff833e39fd0 _pthread_wqthread + 326 18 libsystem_pthread.dylib 0x00007ff833e38f57 start_wqthread + 15 ) libc++abi: terminating with uncaught exception of type NSException *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString characterAtIndex:]: Range or index out of bounds' terminating with uncaught exception of type NSException CoreSimulator 857.7 - Device: iPhone 14 Pro - Runtime: iOS 16.0 (20A360) - DeviceType: iPhone 14 Pro ```

kean commented 1 year ago

Fixed in 3.5.3