Crash on delete/create an object: Please report this at
#### SDK and version
SDK : JavaScript (react native ios)
Version: 12.14.1
#### Observations
* How frequent do the crash occur? Frequent give a fixed set of objects
* Does it happen in production or during dev/test? Both
* Can the crash be reproduced by you? Yes
* Can you provide instructions for how we can reproduce it? Not at the moment. I'll try to investigate more and if the issue persist try to make a standalone project with reproducable steps and or share code privately
#### Crash log / stacktrace
```
/Users/runner/work/realm-js/realm-js/packages/realm/bindgen/vendor/realm-core/src/realm/array.cpp:310: [realm-core-14.13.5] Assertion failed: begin <= end [1, 0]
0 QCInspectorDebug.debug.dylib 0x0000000107a2ac78 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 32
1 QCInspectorDebug.debug.dylib 0x0000000107a2abf0 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 396
2 QCInspectorDebug.debug.dylib 0x0000000107a2aa64 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 0
3 QCInspectorDebug.debug.dylib 0x00000001075e2684 _ZN5realm4util19terminate_with_infoIJRKcRmEEEvPS2_iS5_S5_DpOT_ + 0
4 QCInspectorDebug.debug.dylib 0x0000000107865074 _ZN5realm5Array4moveEmmm + 360
5 QCInspectorDebug.debug.dylib 0x000000010787b788 _ZN5realm10ArrayMixed5eraseEm + 276
6 QCInspectorDebug.debug.dylib 0x0000000107894f4c _ZN5realm7Cluster14do_erase_mixedEmNS_6ColKeyERNS_12CascadeStateE + 844
7 QCInspectorDebug.debug.dylib 0x000000010788c864 _ZN5realm7Cluster5eraseENS_11ClusterNode6RowKeyERNS_12CascadeStateE + 2980
8 QCInspectorDebug.debug.dylib 0x0000000107899964 _ZN5realm11ClusterTree5eraseENS_6ObjKeyERNS_12CascadeStateE + 124
9 QCInspectorDebug.debug.dylib 0x00000001079da618 _ZN5realm5Table16remove_recursiveERNS_12CascadeStateE + 412
10 QCInspectorDebug.debug.dylib 0x00000001079ddce0 _ZN5realm5Table13remove_objectENS_6ObjKeyE + 216
11 QCInspectorDebug.debug.dylib 0x0000000108d997cc _ZN5realm2js3JSI12_GLOBAL__N_122TableRef_remove_objectERN8facebook3jsi7RuntimeERKNS4_5ValueEPS8_m + 288
12 QCInspectorDebug.debug.dylib 0x00000001086ef640 _ZNSt3__18__invokeB8de190102IRPFN8facebook3jsi5ValueERNS2_7RuntimeERKS3_PS6_mEJS5_S7_S8_mEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSC_DpOSD_ + 76
13 QCInspectorDebug.debug.dylib 0x00000001086ef5c4 _ZNSt3__128__invoke_void_return_wrapperIN8facebook3jsi5ValueELb0EE6__callB8de190102IJRPFS3_RNS2_7RuntimeERKS3_PS8_mES7_S9_SA_mEEES3_DpOT_ + 64
14 QCInspectorDebug.debug.dylib 0x00000001086ef578 _ZNSt3__110__function12__alloc_funcIPFN8facebook3jsi5ValueERNS3_7RuntimeERKS4_PS7_mENS_9allocatorISB_EESA_EclB8de190102ES6_S8_OS9_Om + 72
15 QCInspectorDebug.debug.dylib 0x00000001086ee3ec _ZNSt3__110__function6__funcIPFN8facebook3jsi5ValueERNS3_7RuntimeERKS4_PS7_mENS_9allocatorISB_EESA_EclES6_S8_OS9_Om + 68
16 hermes 0x0000000101748294 _ZN8facebook6hermes17HermesRuntimeImpl9HFContext4funcEPvRN6hermes2vm7RuntimeENS5_10NativeArgsE + 536
17 hermes 0x00000001017f6f28 _ZN6hermes2vm14NativeFunction11_nativeCallEPS1_RNS0_7RuntimeE + 144
18 hermes 0x0000000101810c3c _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 2228
19 hermes 0x0000000101810354 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
20 hermes 0x00000001017f71fc _ZN6hermes2vm10JSFunction9_callImplENS0_6HandleINS0_8CallableEEERNS0_7RuntimeE + 40
21 hermes 0x00000001017f54ac _ZN6hermes2vm8Callable12executeCall3ENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES6_S6_S6_b + 200
22 hermes 0x000000010186f108 _ZN6hermes2vm21arrayPrototypeForEachEPvRNS0_7RuntimeENS0_10NativeArgsE + 632
23 hermes 0x00000001017f6f28 _ZN6hermes2vm14NativeFunction11_nativeCallEPS1_RNS0_7RuntimeE + 144
24 hermes 0x0000000101810c3c _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 2228
25 hermes 0x0000000101810354 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
26 hermes 0x00000001017f71fc _ZN6hermes2vm10JSFunction9_callImplENS0_6HandleINS0_8CallableEEERNS0_7RuntimeE + 40
27 hermes 0x00000001017f54ac _ZN6hermes2vm8Callable12executeCall3ENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES6_S6_S6_b + 200
28 hermes 0x000000010186f108 _ZN6hermes2vm21arrayPrototypeForEachEPvRNS0_7RuntimeENS0_10NativeArgsE + 632
29 hermes 0x00000001017f6f28 _ZN6hermes2vm14NativeFunction11_nativeCallEPS1_RNS0_7RuntimeE + 144
30 hermes 0x0000000101810c3c _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 2228
31 hermes 0x0000000101810354 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
32 hermes 0x00000001017f7d34 _ZN6hermes2vm22GeneratorInnerFunction17callInnerFunctionENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEENS1_6ActionE + 576
33 hermes 0x000000010188956c _ZN6hermes2vm22generatorPrototypeNextEPvRNS0_7RuntimeENS0_10NativeArgsE + 384
34 hermes 0x00000001017f6f28 _ZN6hermes2vm14NativeFunction11_nativeCallEPS1_RNS0_7RuntimeE + 144
35 hermes 0x0000000101810c3c _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 2228
36 hermes 0x0000000101810354 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
37 hermes 0x00000001017f71fc _ZN6hermes2vm10JSFunction9_callImplENS0_6HandleINS0_8CallableEEERNS0_7RuntimeE + 40
38 hermes 0x00000001017f5ba4 _ZN6hermes2vm8Callable11executeCallENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEES7_NS2_INS0_8JSObjectEEE + 1348
39 hermes 0x00000001018b57bc _ZN6hermes2vm22functionPrototypeApplyEPvRNS0_7RuntimeENS0_10NativeArgsE + 320
40 hermes 0x00000001017f6f28 _ZN6hermes2vm14NativeFunction11_nativeCallEPS1_RNS0_7RuntimeE + 144
41 hermes 0x0000000101810c3c _ZN6hermes2vm11Interpreter17interpretFunctionILb0ELb0EEENS0_10CallResultINS0_11HermesValueELNS0_6detail20CallResultSpecializeE2EEERNS0_7RuntimeERNS0_16InterpreterStateE + 2228
42 hermes 0x0000000101810354 _ZN6hermes2vm7Runtime21interpretFunctionImplEPNS0_9CodeBlockE + 132
43 hermes 0x00000001017f71fc _ZN6hermes2vm10JSFunction9_callImplENS0_6HandleINS0_8CallableEEERNS0_7RuntimeE + 40
44 hermes 0x00000001017f5128 _ZN6hermes2vm8Callable12executeCall0ENS0_6HandleIS1_EERNS0_7RuntimeENS2_INS0_11HermesValueEEEb + 176
45 hermes 0x000000010185104c _ZN6hermes2vm7Runtime9drainJobsEv + 144
46 hermes 0x000000010173bfcc _ZN8facebook6hermes17HermesRuntimeImpl15drainMicrotasksEi + 36
47 QCInspectorDebug.debug.dylib 0x0000000108d63d28 _ZN8facebook5react23RuntimeScheduler_Modern26performMicrotaskCheckpointERNS_3jsi7RuntimeE + 168
48 QCInspectorDebug.debug.dylib 0x0000000108d63b24 _ZN8facebook5react23RuntimeScheduler_Modern16runEventLoopTickERNS_3jsi7RuntimeERNS0_4TaskENSt3__16chrono10time_pointINS8_12steady_clockENS8_8durationIxNS7_5ratioILl1ELl1000000000EEEEEEE + 324
49 QCInspectorDebug.debug.dylib 0x0000000108d636a0 _ZN8facebook5react23RuntimeScheduler_Modern12runEventLoopERNS_3jsi7RuntimeEb + 252
50 QCInspectorDebug.debug.dylib 0x0000000108d6a980 _ZZN8facebook5react23RuntimeScheduler_Modern17scheduleEventLoopEvENK3$_0clERNS_3jsi7RuntimeE + 44
51 QCInspectorDebug.debug.dylib 0x0000000108d6a948 _ZNSt3__18__invokeB8de190102IRZN8facebook5react23RuntimeScheduler_Modern17scheduleEventLoopEvE3$_0JRNS1_3jsi7RuntimeEEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOS9_DpOSA_ + 32
52 QCInspectorDebug.debug.dylib 0x0000000108d6a8f8 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callB8de190102IJRZN8facebook5react23RuntimeScheduler_Modern17scheduleEventLoopEvE3$_0RNS3_3jsi7RuntimeEEEEvDpOT_ + 32
53 QCInspectorDebug.debug.dylib 0x0000000108d6a8cc _ZNSt3__110__function12__alloc_funcIZN8facebook5react23RuntimeScheduler_Modern17scheduleEventLoopEvE3$_0NS_9allocatorIS5_EEFvRNS2_3jsi7RuntimeEEEclB8de190102ESA_ + 36
54 QCInspectorDebug.debug.dylib 0x0000000108d69764 _ZNSt3__110__function6__funcIZN8facebook5react23RuntimeScheduler_Modern17scheduleEventLoopEvE3$_0NS_9allocatorIS5_EEFvRNS2_3jsi7RuntimeEEEclESA_ + 36
55 QCInspectorDebug.debug.dylib 0x0000000107d457c4 _ZNKSt3__110__function12__value_funcIFvRN8facebook3jsi7RuntimeEEEclB8de190102ES5_ + 68
56 QCInspectorDebug.debug.dylib 0x0000000107d456a0 _ZNKSt3__18functionIFvRN8facebook3jsi7RuntimeEEEclES4_ + 32
57 QCInspectorDebug.debug.dylib 0x0000000108cb8d7c _ZZZN8facebook5react13ReactInstanceC1ENSt3__110unique_ptrINS0_9JSRuntimeENS2_14default_deleteIS4_EEEENS2_10shared_ptrINS0_18MessageQueueThreadEEENS8_INS0_12TimerManagerEEENS2_8functionIFvRNS_3jsi7RuntimeERKNS0_14JsErrorHandler11ParsedErrorEEEEPNS0_18jsinspector_modern10HostTargetEENK3$_0clINSD_IFvSG_EEEEEDaT_ENKUlvE_clEv + 164
58 QCInspectorDebug.debug.dylib 0x0000000108cb8ccc _ZNSt3__18__invokeB8de190102IRZZN8facebook5react13ReactInstanceC1ENS_10unique_ptrINS2_9JSRuntimeENS_14default_deleteIS5_EEEENS_10shared_ptrINS2_18MessageQueueThreadEEENS9_INS2_12TimerManagerEEENS_8functionIFvRNS1_3jsi7RuntimeERKNS2_14JsErrorHandler11ParsedErrorEEEEPNS2_18jsinspector_modern10HostTargetEENK3$_0clINSE_IFvSH_EEEEEDaT_EUlvE_JEEEDTclclsr3stdE7declvalISW_EEspclsr3stdE7declvalIT0_EEEEOSW_DpOSZ_ + 24
59 QCInspectorDebug.debug.dylib 0x0000000108cb8c84 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callB8de190102IJRZZN8facebook5react13ReactInstanceC1ENS_10unique_ptrINS4_9JSRuntimeENS_14default_deleteIS7_EEEENS_10shared_ptrINS4_18MessageQueueThreadEEENSB_INS4_12TimerManagerEEENS_8functionIFvRNS3_3jsi7RuntimeERKNS4_14JsErrorHandler11ParsedErrorEEEEPNS4_18jsinspector_modern10HostTargetEENK3$_0clINSG_IFvSJ_EEEEEDaT_EUlvE_EEEvDpOT_ + 24
60 QCInspectorDebug.debug.dylib 0x0000000108cb8c60 _ZNSt3__110__function12__alloc_funcIZZN8facebook5react13ReactInstanceC1ENS_10unique_ptrINS3_9JSRuntimeENS_14default_deleteIS6_EEEENS_10shared_ptrINS3_18MessageQueueThreadEEENSA_INS3_12TimerManagerEEENS_8functionIFvRNS2_3jsi7RuntimeERKNS3_14JsErrorHandler11ParsedErrorEEEEPNS3_18jsinspector_modern10HostTargetEENK3$_0clINSF_IFvSI_EEEEEDaT_EUlvE_NS_9allocatorISY_EEFvvEEclB8de190102Ev + 28
61 QCInspectorDebug.debug.dylib 0x0000000108cb79a0 _ZNSt3__110__function6__funcIZZN8facebook5react13ReactInstanceC1ENS_10unique_ptrINS3_9JSRuntimeENS_14default_deleteIS6_EEEENS_10shared_ptrINS3_18MessageQueueThreadEEENSA_INS3_12TimerManagerEEENS_8functionIFvRNS2_3jsi7RuntimeERKNS3_14JsErrorHandler11ParsedErrorEEEEPNS3_18jsinspector_modern10HostTargetEENK3$_0clINSF_IFvSI_EEEEEDaT_EUlvE_NS_9allocatorISY_EEFvvEEclEv + 28
62 QCInspectorDebug.debug.dylib 0x0000000107d47768 _ZNKSt3__110__function12__value_funcIFvvEEclB8de190102Ev + 60
63 QCInspectorDebug.debug.dylib 0x0000000107d47720 _ZNKSt3__18functionIFvvEEclEv + 24
64 QCInspectorDebug.debug.dylib 0x0000000108815474 _ZN8facebook5react17tryAndReturnErrorERKNSt3__18functionIFvvEEE + 24
65 QCInspectorDebug.debug.dylib 0x0000000108842ed8 _ZN8facebook5react16RCTMessageThread7tryFuncERKNSt3__18functionIFvvEEE + 36
66 QCInspectorDebug.debug.dylib 0x0000000108847988 _ZZN8facebook5react16RCTMessageThread10runOnQueueEONSt3__18functionIFvvEEEENK3$_0clEv + 80
67 QCInspectorDebug.debug.dylib 0x000000010884792c _ZNSt3__18__invokeB8de190102IRZN8facebook5react16RCTMessageThread10runOnQueueEONS_8functionIFvvEEEE3$_0JEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSA_DpOSB_ + 24
68 QCInspectorDebug.debug.dylib 0x00000001088478e4 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callB8de190102IJRZN8facebook5react16RCTMessageThread10runOnQueueEONS_8functionIFvvEEEE3$_0EEEvDpOT_ + 24
69 QCInspectorDebug.debug.dylib 0x00000001088478c0 _ZNSt3__110__function12__alloc_funcIZN8facebook5react16RCTMessageThread10runOnQueueEONS_8functionIFvvEEEE3$_0NS_9allocatorIS9_EES6_EclB8de190102Ev + 28
70 QCInspectorDebug.debug.dylib 0x00000001088465f0 _ZNSt3__110__function6__funcIZN8facebook5react16RCTMessageThread10runOnQueueEONS_8functionIFvvEEEE3$_0NS_9allocatorIS9_EES6_EclEv + 28
71 QCInspectorDebug.debug.dylib 0x0000000107d47768 _ZNKSt3__110__function12__value_funcIFvvEEclB8de190102Ev + 60
72 QCInspectorDebug.debug.dylib 0x0000000107d47720 _ZNKSt3__18functionIFvvEEclEv + 24
73 QCInspectorDebug.debug.dylib 0x0000000108842c78 ___ZN8facebook5react16RCTMessageThread8runAsyncENSt3__18functionIFvvEEE_block_invoke + 48
74 CoreFoundation 0x00000001979f99b0 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 444848
75 CoreFoundation 0x000000019799c188 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 61832
76 CoreFoundation 0x000000019799d688 7821F73C-378B-3A10-BE90-EF526B7DBA93 + 67208
77 CoreFoundation 0x000000019799ec3c CFRunLoopRunSpecific + 572
78 QCInspectorDebug.debug.dylib 0x0000000108ca3524 +[RCTJSThreadManager runRunLoop] + 312
79 Foundation 0x000000019667c804 34DE055D-8683-380A-9198-C3347211D13D + 481284
80 libsystem_pthread.dylib 0x0000000221fcb344 _pthread_start + 136
81 libsystem_pthread.dylib 0x0000000221fc8ab8 thread_start + 8
!!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose
```
#### Steps & Code to Reproduce
The crash occurs when the user tries to delete an object or create an object. The above stacktrace is when deleting is attempted. I'll update with more information when available
0 条评论