Uploaded image for project: 'Realm Cocoa SDK'
  1. Realm Cocoa SDK
  2. RCOCOA-1907

App crashes when accessing String value of persisted object

      How frequently does the bug occur?

      Seen once

      Description

      This is a one time report from our user. It happens on older version 10.28.6 which is currently in production, if you think this has been already resolved in current release I can ask the user to beta test. I can't reproduce this issue yet.

      It happens on main thread when caching data for use in UITableView. The object is accessed from Results<Object> and Results are frozen.

      Stacktrace & log output

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      Incident Identifier: 4EF21B83-2704-43F9-B6B5-F90E48ABE2FA
      Hardware Model:      iPad13,16
      Process:         Zotero [367]
      Path:            /private/var/containers/Bundle/Application/1DAFB82B-D372-4833-AAA0-C5F78949F366/Zotero.app/Zotero
      Identifier:      org.zotero.ios.Zotero
      Version:         1.0.7 (5)
      Code Type:       ARM-64
      Parent Process:   [1]
      
      Date/Time:       2022-11-25 5:21:59 pm +0000
      OS Version:      iPhone OS 15.6.1 (19G82)
      Report Version:  104
      
      Exception Type:  SIGABRT
      Exception Codes: #0 at 0x1b753cb38
      Crashed Thread:  0
      
      Thread 0 Crashed:
      0   libsystem_kernel.dylib              0x00000001b753cb38 __pthread_kill + 8
      1   libsystem_c.dylib                   0x000000018b7e0524 abort + 168
      2   Zotero                              0x0000000104cb32c4 realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) + 11170500 (terminate.cpp:147)
      3   Zotero                              0x0000000104cb3604 realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 11171332 (terminate.cpp:142)
      4   Zotero                              0x0000000104cb3380 realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) + 11170688 (terminate.cpp:0)
      5   Zotero                              0x0000000104a4f384 realm::ArraySmallBlobs::create_array(unsigned long, realm::Allocator&, realm::BinaryData) + 8663940 (array_blobs_small.cpp:131)
      6   Zotero                              0x0000000104a4f294 realm::ArraySmallBlobs::get(char const*, unsigned long, realm::Allocator&) + 8663700 (array_blobs_small.cpp:105)
      7   Zotero                              0x0000000104ac784c realm::StringData realm::Obj::_get<realm::StringData>(realm::ColKey::Idx) const + 9156684 (obj.cpp:407)
      8   Zotero                              0x000000010485a2f8 objc_object* (anonymous namespace)::getBoxed<realm::StringData>(RLMObjectBase*, unsigned long) + 6611704 (RLMAccessor.mm:106)
      9   Zotero                              0x00000001049c6b74 protocol witness for static _Persistable._rlmGetProperty(_:_:) in conformance String + 8104820 (<compiler-generated>:216)
      10  Zotero                              0x00000001049fce84 Persisted.get(_:) + 8326788 (PersistedProperty.swift:182)
      11  Zotero                              0x00000001049fd9cc static Persisted.subscript.getter + 8329676 (PersistedProperty.swift:126)
      12  Zotero                              0x0000000104253878 ItemsActionHandler.cacheItemAccessory(for:in:) + 292984 (ItemsActionHandler.swift:355)
      13  Zotero                              0x000000010424fb18 ItemsActionHandler.process(action:in:) + 277272 (<compiler-generated>:0)
      14  Zotero                              0x00000001045b9f24 ItemsTableViewHandler.tableView(_:cellForRowAt:) + 3858212 (ItemsTableViewHandler.swift:312)
      15  Zotero                              0x00000001045bb4a0 @objc ItemsTableViewHandler.tableView(_:cellForRowAt:) + 3863712 (<compiler-generated>:0)
      16  UIKitCore                           0x0000000182d399c4 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 1532
      17  UIKitCore                           0x0000000182f37030 -[UITableView _updateVisibleCellsForRanges:createIfNecessary:] + 732
      18  UIKitCore                           0x0000000182d5ebbc -[UITableView _updateVisibleCellsNow:] + 1432
      19  UIKitCore                           0x0000000182c2eed8 -[UITableView layoutSubviews] + 456
      20  UIKitCore                           0x0000000182c3f17c -[UIView+ 1622396 (CALayerDelegate) layoutSublayersOfLayer:] + 2592
      21  QuartzCore                          0x00000001843b77fc CA::Layer::layout_if_needed+ 264188 (CA::Transaction*) + 532
      22  QuartzCore                          0x00000001843a9c60 CA::Layer::layout_and_display_if_needed+ 207968 (CA::Transaction*) + 136
      23  QuartzCore                          0x00000001843be5b4 CA::Context::commit_transaction+ 292276 (CA::Transaction*, double, double*) + 452
      24  QuartzCore                          0x00000001843c74a8 CA::Transaction::commit+ 328872 () + 704
      25  QuartzCore                          0x00000001843a93a0 CA::Transaction::flush_as_runloop_observer+ 205728 (bool) + 88
      26  UIKitCore                           0x0000000182ff16e0 _UIApplicationFlushCATransaction + 72
      27  UIKitCore                           0x000000018328bd5c _UIUpdateSequenceRun + 84
      28  UIKitCore                           0x0000000183912edc schedulerStepScheduledMainSection + 144
      29  UIKitCore                           0x00000001839126a4 runloopSourceCallback + 92
      30  CoreFoundation                      0x00000001806f0414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
      31  CoreFoundation                      0x00000001807011a0 __CFRunLoopDoSource0 + 208
      32  CoreFoundation                      0x000000018063a694 __CFRunLoopDoSources0 + 268
      33  CoreFoundation                      0x000000018064005c __CFRunLoopRun + 828
      34  CoreFoundation                      0x0000000180653bc8 CFRunLoopRunSpecific + 600
      35  GraphicsServices                    0x000000019c7bf374 GSEventRunModal + 164
      36  UIKitCore                           0x0000000182fc7b58 -[UIApplication _run] + 1100
      37  UIKitCore                           0x0000000182d49090 UIApplicationMain + 364
      38  Zotero                              0x0000000104211c3c main + 23612 (<compiler-generated>:0)
      39  ???                                 0x0000000105345da4 0x0 + 0
      
      Thread 1:
      0   libsystem_kernel.dylib              0x00000001b7536a74 __workq_kernreturn + 8
      1   libsystem_pthread.dylib             0x00000001f0694e5c start_wqthread + 8
      
      Thread 2:
      0   libsystem_kernel.dylib              0x00000001b7536a74 __workq_kernreturn + 8
      1   libsystem_pthread.dylib             0x00000001f0694e5c start_wqthread + 8
      
      Thread 3:
      0   libsystem_kernel.dylib              0x00000001b7536a74 __workq_kernreturn + 8
      1   libsystem_pthread.dylib             0x00000001f0694e5c start_wqthread + 8
      
      Thread 4:
      0   libsystem_kernel.dylib              0x00000001b7536a74 __workq_kernreturn + 8
      1   libsystem_pthread.dylib             0x00000001f0694e5c start_wqthread + 8
      
      Thread 5:
      0   libsystem_platform.dylib            0x00000001f068cff4 _platform_strlen + 52
      1   libicucore.A.dylib                  0x000000018044216c 0x180385000 + 774508
      2   libicucore.A.dylib                  0x0000000180441d24 ures_getByKeyWithFallback + 656
      3   libicucore.A.dylib                  0x00000001804419a8 ures_getStringByKeyWithFallback + 84
      4   libicucore.A.dylib                  0x000000018051cfc4 0x180385000 + 1671108
      5   libicucore.A.dylib                  0x000000018051cdfc 0x180385000 + 1670652
      6   libicucore.A.dylib                  0x000000018050429c 0x180385000 + 1569436
      7   libicucore.A.dylib                  0x0000000180503424 0x180385000 + 1565732
      8   libicucore.A.dylib                  0x0000000180502c78 icu::number::LocalizedNumberFormatter::computeCompiled+ 1563768 (UErrorCode&) const + 116
      9   libicucore.A.dylib                  0x0000000180502d1c icu::number::LocalizedNumberFormatter::getAffixImpl+ 1563932 (bool, bool, icu::UnicodeString&, UErrorCode&) const + 120
      10  libicucore.A.dylib                  0x00000001804ad480 icu::DecimalFormat::getPositiveSuffix+ 1213568 (icu::UnicodeString&) const + 60
      11  libicucore.A.dylib                  0x00000001805766b8 icu::SimpleDateFormat::checkIntSuffix+ 2037432 (icu::UnicodeString const&, int, int, signed char) const + 288
      12  libicucore.A.dylib                  0x0000000180573ab8 icu::SimpleDateFormat::subParse+ 2026168 (icu::UnicodeString const&, int&, char16_t, int, signed char, signed char, signed char*, int&, icu::Calendar&, int, icu::MessageFormat*, UTimeZoneFormatTimeType*, int*) const + 1316
      13  libicucore.A.dylib                  0x0000000180572d04 icu::SimpleDateFormat::parse+ 2022660 (icu::UnicodeString const&, icu::Calendar&, icu::ParsePosition&) const + 1200
      14  libicucore.A.dylib                  0x00000001805a5e04 udat_parseCalendar + 228
      15  CoreFoundation                      0x00000001806ffdd4 CFDateFormatterGetAbsoluteTimeFromString + 540
      16  CoreFoundation                      0x00000001807157d0 CFDateFormatterCreateDateFromString + 112
      17  Foundation                          0x0000000181e4a44c getObjectValue + 272
      18  Foundation                          0x0000000181ecd894 -[NSDateFormatter getObjectValue:forString:errorDescription:] + 200
      19  Foundation                          0x0000000181ee9e98 -[NSDateFormatter dateFromString:] + 64
      20  Zotero                              0x000000010430024c TranslatorMetadata.init(id:filename:rawLastUpdated:) + 1000012 (TranslatorMetadata.swift:46)
      21  Zotero                              0x0000000104300c28 TranslatorMetadata.init(from:) + 1002536 (TranslatorMetadata.swift:77)
      22  Zotero                              0x0000000104300c70 protocol witness for Decodable.init(from:) in conformance TranslatorMetadata + 1002608 (<compiler-generated>:0)
      23  libswiftCore.dylib                  0x00000001854667ac dispatch thunk of Decodable.init+ 3540908 (from:) + 32
      24  libswiftFoundation.dylib            0x0000000184dd793c _JSONUnkeyedDecodingContainer.decode<A>+ 280892 (_:) + 3340
      25  libswiftFoundation.dylib            0x0000000184dd8edc protocol witness for UnkeyedDecodingContainer.decode<A>+ 286428 (_:) in conformance _JSONUnkeyedDecodingContainer + 16
      26  libswiftCore.dylib                  0x0000000185467e4c dispatch thunk of UnkeyedDecodingContainer.decode<A>+ 3546700 (_:) + 32
      27  Zotero                              0x0000000104300df8 specialized TranslatorMetadatas.init(from:) + 1003000 (TranslatorMetadata.swift:27)
      28  Zotero                              0x0000000104300060 protocol witness for Decodable.init(from:) in conformance TranslatorMetadatas + 999520 (<compiler-generated>:19)
      29  libswiftCore.dylib                  0x00000001854667ac dispatch thunk of Decodable.init+ 3540908 (from:) + 32
      30  libswiftFoundation.dylib            0x0000000184db3f18 __JSONDecoder.unbox_+ 134936 (_:as:) + 1284
      31  libswiftFoundation.dylib            0x0000000184d9fe28 JSONDecoder.decode<A>+ 52776 (_:from:) + 1432
      32  libswiftFoundation.dylib            0x0000000184dd8088 dispatch thunk of JSONDecoder.decode<A>+ 282760 (_:from:) + 56
      33  Zotero                              0x000000010456fabc TranslatorsAndStylesController.loadIndex() + 3553980 (TranslatorsAndStylesController.swift:843)
      34  Zotero                              0x000000010456d01c TranslatorsAndStylesController.syncTranslatorsWithBundledData(deleteIndices:forceUpdate:) + 3543068 (TranslatorsAndStylesController.swift:365)
      35  Zotero                              0x000000010456c3c8 TranslatorsAndStylesController._updateTranslatorsFromBundle(forceUpdate:) + 3539912 (TranslatorsAndStylesController.swift:232)
      36  Zotero                              0x000000010456b9e8 closure #1 in TranslatorsAndStylesController.updateFromBundle(forceTranslatorBundleUpdate:) + 3537384 (TranslatorsAndStylesController.swift:198)
      37  Zotero                              0x00000001046e7584 partial apply for closure #1 in static PrimitiveSequenceType<>.create(subscribe:) + 5092740 (<compiler-generated>:0)
      38  Zotero                              0x00000001046a0afc AnonymousObservable.run<A>(_:cancel:) + 4803324 (Create.swift:75)
      39  Zotero                              0x00000001046d1ce8 closure #1 in Producer.subscribe<A>(_:) + 5004520 (Producer.swift:26)
      40  Zotero                              0x00000001046d13b0 specialized CurrentThreadScheduler.schedule<A>(_:action:) + 5002160 (CurrentThreadScheduler.swift:101)
      41  Zotero                              0x00000001046d12b0 Producer.subscribe<A>(_:) + 5001904 (<compiler-generated>:0)
      42  Zotero                              0x00000001046c0d6c MergeSink.subscribeInner(_:) + 4935020 (Merge.swift:480)
      43  Zotero                              0x00000001046c0b88 MergeSink.on(_:) + 4934536 (Merge.swift:459)
      44  Zotero                              0x00000001046c1a24 protocol witness for ObserverType.on(_:) in conformance MergeSink<A, B, C> + 4938276 (<compiler-generated>:0)
      45  Zotero                              0x00000001046c8e34 ObserveOnSink.run(_:_:) + 4967988 (ObserveOn.swift:134)
      46  Zotero                              0x00000001046c9ff8 partial apply for thunk for @escaping @callee_guaranteed (@unowned @callee_guaranteed () -> ()) -> () + 4972536 (<compiler-generated>:0)
      47  Zotero                              0x00000001046d73e4 partial apply for thunk for @escaping @callee_guaranteed (@in_guaranteed A, @unowned @callee_guaranteed @substituted <A> (@in_guaranteed A) -> () for <A>) -> () + 5026788 (<compiler-generated>:0)
      48  Zotero                              0x00000001046d6dc8 closure #1 in RecursiveImmediateScheduler.schedule(_:) + 5025224 (<compiler-generated>:0)
      49  Zotero                              0x00000001046aaac4 partial apply for closure #1 in DispatchQueueConfiguration.schedule<A>(_:action:) + 4844228 (<compiler-generated>:0)
      50  Zotero                              0x00000001046a03f8 thunk for @escaping @callee_guaranteed () -> () + 4801528 (<compiler-generated>:0)
      51  libdispatch.dylib                   0x0000000180333e6c _dispatch_call_block_and_release + 32
      52  libdispatch.dylib                   0x0000000180335a30 _dispatch_client_callout + 20
      53  libdispatch.dylib                   0x0000000180338eec _dispatch_continuation_pop + 500
      54  libdispatch.dylib                   0x0000000180338558 _dispatch_async_redirect_invoke + 584
      55  libdispatch.dylib                   0x0000000180347164 _dispatch_root_queue_drain + 396
      56  libdispatch.dylib                   0x000000018034796c _dispatch_worker_thread2 + 164
      57  libsystem_pthread.dylib             0x00000001f0695080 _pthread_wqthread + 228
      58  libsystem_pthread.dylib             0x00000001f0694e5c start_wqthread + 8
      
      Thread 6:
      0   libsystem_kernel.dylib              0x00000001b75364a0 mach_msg_trap + 8
      1   CoreFoundation                      0x000000018063bd30 __CFRunLoopServiceMachPort + 372
      2   CoreFoundation                      0x00000001806401bc __CFRunLoopRun + 1180
      3   CoreFoundation                      0x0000000180653bc8 CFRunLoopRunSpecific + 600
      4   Foundation                          0x0000000181e46444 -[NSRunLoop+ 103492 (NSRunLoop) runMode:beforeDate:] + 236
      5   Foundation                          0x0000000181e87e0c -[NSRunLoop+ 372236 (NSRunLoop) runUntilDate:] + 92
      6   UIKitCore                           0x0000000182f41cc4 -[UIEventFetcher threadMain] + 524
      7   Foundation                          0x0000000181e9641c __NSThread__start__ + 808
      8   libsystem_pthread.dylib             0x00000001f06959ac _pthread_start + 148
      9   libsystem_pthread.dylib             0x00000001f0694e68 thread_start + 8
      
      Thread 7:
      0   libsystem_kernel.dylib              0x00000001b75364a0 mach_msg_trap + 8
      1   Zotero                              0x0000000104ce5f20 exception_server_thread + 11378464 (PLCrashMachExceptionServer.m:683)
      2   libsystem_pthread.dylib             0x00000001f06959ac _pthread_start + 148
      3   libsystem_pthread.dylib             0x00000001f0694e68 thread_start + 8
      
      Thread 8:
      0   libsystem_kernel.dylib              0x00000001b75364a0 mach_msg_trap + 8
      1   CoreFoundation                      0x000000018063bd30 __CFRunLoopServiceMachPort + 372
      2   CoreFoundation                      0x00000001806401bc __CFRunLoopRun + 1180
      3   CoreFoundation                      0x0000000180653bc8 CFRunLoopRunSpecific + 600
      4   CFNetwork                           0x00000001810d01dc 0x180e58000 + 2589148
      5   Foundation                          0x0000000181e9641c __NSThread__start__ + 808
      6   libsystem_pthread.dylib             0x00000001f06959ac _pthread_start + 148
      7   libsystem_pthread.dylib             0x00000001f0694e68 thread_start + 8
      
      Thread 9:
      0   libsystem_kernel.dylib              0x00000001b7537e18 kevent + 8
      1   Zotero                              0x0000000104aefdcc void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, realm::_impl::ExternalCommitHelper::ExternalCommitHelper(realm::_impl::RealmCoordinator&)::$_0> >(void*) + 9321932 (thread:300)
      2   libsystem_pthread.dylib             0x00000001f06959ac _pthread_start + 148
      3   libsystem_pthread.dylib             0x00000001f0694e68 thread_start + 8
      
      Thread 0 crashed with ARM-64 Thread State:
          pc: 0x00000001b753cb38     fp: 0x000000016bbee340     sp: 0x000000016bbee320     x0: 0x0000000000000000 
          x1: 0x0000000000000000     x2: 0x0000000000000000     x3: 0x0000000000000000     x4: 0x000000000000000a 
          x5: 0x000000010a8dec00     x6: 0x0000000000001400     x7: 0x0000000000000000     x8: 0xd5c58bde9a27b255 
          x9: 0xd5c58bdf9f1e37d5    x10: 0x0000000000699e00    x11: 0x0000000000bf3d01    x12: 0x0000000000004009 
         x13: 0x000000010a8e0000    x14: 0x0000000000003fff    x15: 0x0000000000000a8a    x16: 0x0000000000000148 
         x17: 0x0000000105398580    x18: 0x0000000000000000    x19: 0x0000000000000006    x20: 0x0000000000000103 
         x21: 0x0000000105398660    x22: 0x000000016bbee400    x23: 0x0000000104d84d84    x24: 0x00000001d9865258 
         x25: 0x000000016bbee990    x26: 0x0000000109ace730    x27: 0x0000000105079d28    x28: 0x000000016bbee950 
          lr: 0x00000001f069b3bc   cpsr: 0x0000000040001000
      

      Can you reproduce the bug?

      Not yet

      Reproduction Steps

      No response

      Version

      10.28.6

      What SDK flavour are you using?

      Local Database only

      Are you using encryption?

      No, not using encryption

      Platform OS and version(s)

      iOS 15.6.1

      Build environment

      Xcode version: 14.1
      Dependency manager and version: SPM

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: