realm / realm-swift

Realm is a mobile database: a replacement for Core Data & SQLite
https://realm.io
Apache License 2.0
16.34k stars 2.15k forks source link

Error in reading schema after upgrade #6724

Closed bennettyuan closed 3 years ago

bennettyuan commented 4 years ago

I have a problem when I upgrade the Realm version to 5.3.5 from 3.21.0. A crash I encountered, the log is below .

Is an issue or need to do something for migration (3 to 5)?

/Users/BennettYuan/Library/Caches/org.carthage.CarthageKit/DerivedData/11.6_11E708/realm-cocoa/v5.3.5/Build/Intermediates.noindex/ArchiveIntermediates/Realm/BuildProductsPath/Release-iphoneos/include/realm/table.hpp:1192: [realm-core-6.0.19] Assertion failed: spec_ndx < get_column_count() [18446744073709551615, 2]
0   Realm                               0x000000010cb7b2b0 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1   Realm                               0x000000010cb7b554 _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 328
2   Realm                               0x000000010c85e850 _ZZN5realm4util11FunctionRefIFvPNS_13BPlusTreeNodeEmEEC1IRZNS_9BPlusTreeIfE3setEmfEUlS3_mE_EEOT_ENUlPvS3_mE_8__invokeESD_S3_m + 0
3   Realm                               0x000000010c86bd90 _ZNK5realm5Table15get_column_nameENS_6ColKeyE + 248
4   Realm                               0x000000010c86bb50 _ZN5realm11ObjectStore26get_primary_key_for_objectERKNS_5GroupENS_10StringDataE + 96
5   Realm                               0x000000010c866b5c _ZN5realm12ObjectSchemaC2ERKNS_5GroupENS_10StringDataENS_8TableKeyE + 1312
6   Realm                               0x000000010c86dc70 _ZN5realm11ObjectStore17schema_from_groupERKNS_5GroupE + 272
7   Realm                               0x000000010c952af8 _ZN5realm5Realm13update_schemaENS_6SchemaEyNSt3__18functionIFvNS2_10shared_ptrIS0_EES5_RS1_EEENS3_IFvS5_EEEb + 1204
8   Realm                               0x000000010c921304 +[RLMRealm realmWithConfiguration:queue:error:] + 1984
9   RealmSwift                          0x000000010f88069c $s10RealmSwift0A0V13configuration5queueA2C13ConfigurationV_So012OS_dispatch_D0CSgtKcfC + 88
10  ZUSAPI                              0x00000001113fd648 $s10RealmSwift0A0V6ZUSAPIE7defaultACvgZ + 156
11  ZUSAPI                              0x00000001113cdbd4 $s6ZUSAPI3APIV14cachedVehiclesSayAA10RLMVehicleCGyFZ + 16
12  ZUS_DEV                             0x00000001033a8000 $s7ZUS_DEV6GarageC13loadFromCache33_015969306022DDFCFB0E2CA895A22B42LLyyF + 68
13  ZUS_DEV                             0x00000001033a7fa0 $s7ZUS_DEV6GarageC13loadFromCacheyyFZ + 84
14  ZUS_DEV                             0x00000001033a41a8 $s7ZUS_DEV6GarageC6launchyyFZ + 68
15  ZUS_DEV                             0x0000000102eee128 $s7ZUS_DEV11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0k6LaunchJ3KeyaypGSgtF + 2212
16  ZUS_DEV                             0x0000000102eee850 $s7ZUS_DEV11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0k6LaunchJ3KeyaypGSgtFTo + 232
17  UIKitCore                           0x00000001ab3cbddc 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 10898908
18  UIKitCore                           0x00000001ab3cdbbc 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 10906556
19  UIKitCore                           0x00000001ab3d3588 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 10929544
20  UIKitCore                           0x00000001aab43d60 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 1953120
21  UIKitCore                           0x00000001ab00f588 _UIScenePerformActionsWithLifecycleActionMask + 112
22  UIKitCore                           0x00000001aab44894 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 1955988
23  UIKitCore                           0x00000001aab442c0 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 1954496
24  UIKitCore                           0x00000001aab446b0 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 1955504
25  UIKitCore                           0x00000001aab43f38 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 1953592
26  UIKitCore                           0x00000001aab48654 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 1971796
27  UIKitCore                           0x00000001aaf2df8c 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 6057868
28  UIKitCore                           0x00000001ab02922c _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 260
29  UIKitCore                           0x00000001aab48390 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 1971088
30  UIKitCore                           0x00000001ab029114 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 108
31  UIKitCore                           0x00000001aab481e8 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 1970664
32  UIKitCore                           0x00000001aa9ae918 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 293144
33  UIKitCore                           0x00000001aa9ad418 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 287768
34  UIKitCore                           0x00000001aa9ae648 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 292424
35  UIKitCore                           0x00000001ab3d1828 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 10922024
36  UIKitCore                           0x00000001aaf54780 5AD0DCE8-0414-3CF9-97A5-13CED9C31CF7 + 6215552
37  FrontBoardServices                  0x00000001ac4f0084 B1591D9C-D7E5-336A-A279-8C1857EA65AD + 53380
38  FrontBoardServices                  0x00000001ac516610 B1591D9C-D7E5-336A-A279-8C1857EA65AD + 210448
39  FrontBoardServices                  0x00000001ac4faf40 B1591D9C-D7E5-336A-A279-8C1857EA65AD + 98112
40  FrontBoardServices                  0x00000001ac5162a4 B1591D9C-D7E5-336A-A279-8C1857EA65AD + 209572
41  libdispatch.dylib                   0x00000001119634d8 _dispatch_client_callout + 20
42  libdispatch.dylib                   0x0000000111966c88 _dispatch_block_invoke_direct + 364
43  FrontBoardServices                  0x00000001ac53c6c8 B1591D9C-D7E5-336A-A279-8C1857EA65AD + 366280
44  FrontBoardServices                  0x00000001ac53c374 B1591D9C-D7E5-336A-A279-8C1857EA65AD + 365428
45  FrontBoardServices                  0x00000001ac53c8e0 B1591D9C-D7E5-336A-A279-8C1857EA65AD + 366816
46  CoreFoundation                      0x00000001a7228d14 7769FFAC-4FCD-332D-A4BE-DA2F0E2FFEA5 + 707860
47  CoreFoundation                      0x00000001a7228c68 7769FFAC-4FCD-332D-A4BE-DA2F0E2FFEA5 + 707688
48  CoreFoundation                      0x00000001a72283c4 7769FFAC-4FCD-332D-A4BE-DA2F0E2FFEA5 + 705476
49  CoreFoundation                      0x00000001a72231fc 7769FFAC-4FCD-332D-A4BE-DA2F0E2FFEA5 + 684540
50  CoreFoundation                      0x00000001a7222bc8 CFRunLoopRunSpecific + 480
51  GraphicsServices                    0x00000001b16045cc GSEventRunModal + 164
52  UIKitCore                           0x00000001ab3d5744 UIApplicationMain + 1936
53  ZUS_DEV                             0x0000000102bf94bc main + 80
54  libdyld.dylib                       0x00000001a709f384 9DB07277-A537-351D-AB86-5408CB5F12C3 + 4996!!! IMPORTANT: Please send this log and info about Realm SDK version and other relevant reproduction info to help@realm.io.

Version of Realm and Tooling

Realm framework version: v5.3.5 Xcode version: 11.6 iOS/OSX version: 13.6.1/10.15.6 Dependency manager + version: Carthage 0.35.0

leemaguire commented 4 years ago

@bennettyuan18 Would you be able to create a sandbox app that replicates this issue?

Thanks, Lee

varyP commented 4 years ago

I've the same issue while upgrading Realm & RealmSwift from 3.2.0 to 5.1.0

/Users/realm/workspace/realm_realm-core_release_6.0.6/src/realm/util/encrypted_file_mapping.hpp:147: [realm-core-6.0.6] Assertion failed: addr >= m_addr with (addr, m_addr) =  [true, true]
0   MyApp                            0x000000010494a6e4 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1   MyApp                            0x000000010494ab78 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 388
2   MyApp                            0x0000000104932a6c _ZNSt3__1L20__throw_length_errorEPKc + 0
3   MyApp                            0x0000000104932940 _ZN5realm4util20EncryptedFileMapping12read_barrierEPKvmPFmPKcE + 452
4   MyApp                            0x0000000103dc4db0 _ZN5realm4util26do_encryption_read_barrierEPKvmPFmPKcEPNS0_20EncryptedFileMappingE + 72
5   MyApp                            0x000000010485da58 _ZN5realm15ArraySmallBlobs3getEPKcmRNS_9AllocatorE + 100
6   MyApp                            0x00000001048d23f8 _ZN5realm11ArrayString3getEPKcmRNS_9AllocatorE + 124
7   MyApp                            0x00000001048cf000 _ZNK5realm8ConstObj4_getINS_10StringDataEEET_NS_6ColKey3IdxE + 568
8   MyApp                            0x00000001049068a8 _ZN5realm5Table21populate_search_indexENS_6ColKeyE + 240
9   MyApp                            0x0000000103cfc72c _ZZL27apply_pre_migration_changesRN5realm5GroupERKNSt3__16vectorINS_12SchemaChangeENS2_9allocatorIS4_EEEEEN7ApplierclENS_13schema_change8AddIndexE + 72
10  MyApp                            0x0000000103cfc398 _ZNK5realm12SchemaChange5visitIRZL27apply_pre_migration_changesRNS_5GroupERKNSt3__16vectorIS0_NS4_9allocatorIS0_EEEEE7ApplierEEDaOT_ + 348
11  MyApp                            0x0000000103cf226c _ZL27apply_pre_migration_changesRN5realm5GroupERKNSt3__16vectorINS_12SchemaChangeENS2_9allocatorIS4_EEEE + 112
12  MyApp                            0x0000000103cf1afc _ZN5realm11ObjectStore20apply_schema_changesERNS_11TransactionEyRNS_6SchemaEyNS_10SchemaModeERKNSt3__16vectorINS_12SchemaChangeENS6_9allocatorIS8_EEEENS_4util8OptionalINS6_12basic_stringIcNS6_11char_traitsIcEENS9_IcEEEEEENS6_8functionIFvvEEE + 592
13  MyApp                            0x0000000103f8953c _ZN5realm5Realm13update_schemaENS_6SchemaEyNSt3__18functionIFvNS2_10shared_ptrIS0_EES5_RS1_EEENS3_IFvS5_EEEb + 1076
14  MyApp                            0x0000000103ecf0cc +[RLMRealm realmWithConfiguration:queue:error:] + 3132
15  MyApp                            0x00000001040625b4 $sSo8RLMRealmC13configuration5queueABSo0A13ConfigurationC_So012OS_dispatch_C0CSgtKcfCTO + 156
16  MyApp                            0x00000001040903fc $s10RealmSwift0A0V13configuration5queueA2C13ConfigurationV_So012OS_dispatch_D0CSgtKcfC + 216
17  MyApp                            0x000000010292685c $s8MyApp11GlobalStoreC5realm10RealmSwift0E0VyF + 208
18  MyApp                            0x00000001033edddc $s8MyApp20SplashViewControllerC17preinitialization33_5004926C96F5686A2BAEB7DC5CAC1F33LLyyF + 204
19  MyApp                            0x00000001033edca8 $s8MyApp20SplashViewControllerC13viewDidAppearyySbF + 140
20  MyApp                            0x00000001033edcf8 $s8MyApp20SplashViewControllerC13viewDidAppearyySbFTo + 56
21  UIKitCore                           0x00000001aeeb5908 BD57BD6E-12B4-3F92-85CA-754932DA499D + 4131080
22  UIKitCore                           0x00000001aee18c80 BD57BD6E-12B4-3F92-85CA-754932DA499D + 3488896
23  UIKitCore                           0x00000001aeeb5908 BD57BD6E-12B4-3F92-85CA-754932DA499D + 4131080
24  UIKitCore                           0x00000001aeeb6324 BD57BD6E-12B4-3F92-85CA-754932DA499D + 4133668
25  UIKitCore                           0x00000001aedcfee0 BD57BD6E-12B4-3F92-85CA-754932DA499D + 3190496
26  UIKitCore                           0x00000001af4fcb64 BD57BD6E-12B4-3F92-85CA-754932DA499D + 10713956
27  UIKitCore                           0x00000001af4ec50c BD57BD6E-12B4-3F92-85CA-754932DA499D + 10646796
28  UIKitCore                           0x00000001af51c9f0 BD57BD6E-12B4-3F92-85CA-754932DA499D + 10844656
29  CoreFoundation                      0x00000001ab3ca06c 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 688236
30  CoreFoundation                      0x00000001ab3c4f60 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 667488
31  CoreFoundation                      0x00000001ab3c53dc 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 668636
32  CoreFoundation                      0x00000001ab3c4ce8 CFRunLoopRunSpecific + 424
33  GraphicsServices                    0x00000001b550f38c GSEventRunModal + 160
34  UIKitCore                           0x00000001af4f3444 UIApplicationMain + 1932
35  MyApp                            0x0000000102ca2f4c main + 88
36  libdyld.dylib                       0x00000001ab24c8f0 3D6D64B4-CB2B-3CC4-A7E9-02774DF7AE74 + 6384!!! IMPORTANT: Please send this log and info about Realm SDK version and other relevant reproduction info to help@realm.io.2020-09-03 10:46:10.817330+0800 MyApp[16525:10514100] /Users/realm/workspace/realm_realm-core_release_6.0.6/src/realm/util/encrypted_file_mapping.hpp:147: [realm-core-6.0.6] Assertion failed: addr >= m_addr with (addr, m_addr) =  [true, true]
andreadelfante commented 4 years ago

Hi there, I have the same issue during my migration tests. I have upgraded RealmSwift from version 4.4.1 to 5.4.0.

/Users/andrea/Projects/ios/classevivastudente/Pods/Realm/include/core/realm/table.hpp:1193: [realm-core-6.0.25] Assertion failed: spec_ndx < get_column_count() [18446744073709551615, 5]

0   Realm                               0x0000000104b861cc _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1   Realm                               0x0000000104b864bb _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 395
2   Realm                               0x000000010445e082 _ZN5realm4util9terminateIJmmEEEvPKcS3_lDpT_ + 162
3   Realm                               0x000000010449b9ad _ZNK5realm5Table15get_column_nameENS_6ColKeyE + 189
4   Realm                               0x00000001044af907 _ZN5realm11ObjectStore26get_primary_key_for_objectERKNS_5GroupENS_10StringDataE + 215
5   Realm                               0x000000010449b5ff _ZN5realm12ObjectSchemaC2ERKNS_5GroupENS_10StringDataENS_8TableKeyE + 1903
6   Realm                               0x000000010449bde5 _ZN5realm12ObjectSchemaC1ERKNS_5GroupENS_10StringDataENS_8TableKeyE + 53
7   Realm                               0x00000001044c5526 _ZNSt3__19allocatorIN5realm12ObjectSchemaEE9constructIS2_JRKNS1_5GroupERNS1_10StringDataERNS1_8TableKeyEEEEvPT_DpOT0_ + 134
8   Realm                               0x00000001044c548e _ZNSt3__116allocator_traitsINS_9allocatorIN5realm12ObjectSchemaEEEE11__constructIS3_JRKNS2_5GroupERNS2_10StringDataERNS2_8TableKeyEEEEvNS_17integral_constantIbLb1EEERS4_PT_DpOT0_ + 126
9   Realm                               0x00000001044c51be _ZNSt3__116allocator_traitsINS_9allocatorIN5realm12ObjectSchemaEEEE9constructIS3_JRKNS2_5GroupERNS2_10StringDataERNS2_8TableKeyEEEEvRS4_PT_DpOT0_ + 126
10  Realm                               0x00000001044b2717 _ZNSt3__16vectorIN5realm12ObjectSchemaENS_9allocatorIS2_EEE12emplace_backIJRKNS1_5GroupERNS1_10StringDataERNS1_8TableKeyEEEERS2_DpOT_ + 215
11  Realm                               0x00000001044b20e4 _ZN5realm11ObjectStore17schema_from_groupERKNS_5GroupE + 468
12  Realm                               0x00000001044b1930 _ZN5realm11ObjectStore20apply_schema_changesERNS_11TransactionEyRNS_6SchemaEyNS_10SchemaModeERKNSt3__16vectorINS_12SchemaChangeENS6_9allocatorIS8_EEEENS_4util8OptionalINS6_12basic_stringIcNS6_11char_traitsIcEENS9_IcEEEEEENS6_8functionIFvvEEE + 944
13  Realm                               0x000000010481f063 _ZN5realm5Realm13update_schemaENS_6SchemaEyNSt3__18functionIFvNS2_10shared_ptrIS0_EES5_RS1_EEENS3_IFvS5_EEEb + 1667
14  Realm                               0x0000000104733196 +[RLMRealm realmWithConfiguration:queue:error:] + 4582
15  Realm                               0x0000000104731f4f +[RLMRealm realmWithConfiguration:error:] + 111
16  Realm                               0x0000000104738677 +[RLMRealm performMigrationForConfiguration:error:] + 311
17  RealmSwift                          0x000000010629e01a $s10RealmSwift0A0V16performMigration3foryAC13ConfigurationV_tKFZ + 202
18  classeviva studentiTests            0x0000000107a79371 $s24classeviva_studentiTests014BaseMigrationsC0C31performTestMigrationFromVersiony10RealmSwift0K0VSgs6UInt64VF + 1793
19  classeviva studentiTests            0x00000001079aaea4 $s24classeviva_studentiTests010MigrationsC0C27testMigrationFrom16ToLatestyyF + 68
20  classeviva studentiTests            0x00000001079aaeeb $s24classeviva_studentiTests010MigrationsC0C27testMigrationFrom16ToLatestyyFTo + 43
21  CoreFoundation                      0x00007fff23e44dec __invoking___ + 140
22  CoreFoundation                      0x00007fff23e41fd1 -[NSInvocation invoke] + 321
23  XCTest                              0x0000000107651fa7 __24-[XCTestCase invokeTest]_block_invoke_2 + 52
24  XCTest                              0x0000000107651f53 __24-[XCTestCase invokeTest]_block_invoke.206 + 320
25  XCTest                              0x00000001076acd32 +[XCTestCase(Failures) performFailableBlock:testCase:testCaseRun:shouldInterruptTest:] + 69
26  XCTest                              0x00000001076acc44 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 115
27  XCTest                              0x0000000107651966 -[XCTestCase invokeTest] + 1183
28  XCTest                              0x0000000107653299 __26-[XCTestCase performTest:]_block_invoke_2 + 43
29  XCTest                              0x00000001076acd32 +[XCTestCase(Failures) performFailableBlock:testCase:testCaseRun:shouldInterruptTest:] + 69
30  XCTest                              0x00000001076acc44 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 115
31  XCTest                              0x00000001076531d0 __26-[XCTestCase performTest:]_block_invoke.359 + 86
32  XCTest                              0x00000001076bf97d +[XCTContext runInContextForTestCase:block:] + 211
33  XCTest                              0x0000000107652a84 -[XCTestCase performTest:] + 566
34  XCTest                              0x00000001076992fe -[XCTest runTest] + 57
35  XCTest                              0x000000010764ccc0 __27-[XCTestSuite performTest:]_block_invoke + 354
36  XCTest                              0x000000010764c412 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 24
37  XCTest                              0x00000001076bf97d +[XCTContext runInContextForTestCase:block:] + 211
38  XCTest                              0x000000010764c3c9 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 148
39  XCTest                              0x000000010764c72e -[XCTestSuite performTest:] + 348
40  XCTest                              0x00000001076992fe -[XCTest runTest] + 57
41  XCTest                              0x000000010764ccc0 __27-[XCTestSuite performTest:]_block_invoke + 354
42  XCTest                              0x000000010764c412 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 24
43  XCTest                              0x00000001076bf97d +[XCTContext runInContextForTestCase:block:] + 211
44  XCTest                              0x000000010764c3c9 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 148
45  XCTest                              0x000000010764c72e -[XCTestSuite performTest:] + 348
46  XCTest                              0x00000001076992fe -[XCTest runTest] + 57
47  XCTest                              0x000000010764ccc0 __27-[XCTestSuite performTest:]_block_invoke + 354
48  XCTest                              0x000000010764c412 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 24
49  XCTest                              0x00000001076bf97d +[XCTContext runInContextForTestCase:block:] + 211
50  XCTest                              0x000000010764c3c9 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 148
51  XCTest                              0x000000010764c72e -[XCTestSuite performTest:] + 348
52  XCTest                              0x00000001076992fe -[XCTest runTest] + 57
53  XCTest                              0x00000001076cee84 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 171
54  XCTest                              0x00000001076cef71 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.100 + 96
55  XCTest                              0x00000001076676b6 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 682
56  XCTest                              0x00000001076cec0f -[XCTTestRunSession runTestsAndReturnError:] + 615
57  XCTest                              0x00000001076306b4 -[XCTestDriver runTestsAndReturnError:] + 456
58  XCTest                              0x00000001076bb5bc _XCTestMain + 2496
59  libXCTestBundleInject.dylib         0x0000000102189bfa __copy_helper_block_e8_32s + 0
60  CoreFoundation                      0x00007fff23da1abc __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
61  CoreFoundation                      0x00007fff23da11b3 __CFRunLoopDoBlocks + 195
62  CoreFoundation                      0x00007fff23d9bfa3 __CFRunLoopRun + 995
63  CoreFoundation                      0x00007fff23d9b8a4 CFRunLoopRunSpecific + 404
64  GraphicsServices                    0x00007fff38c05bbe GSEventRunModal + 139
65  UIKitCore                           0x00007fff49372964 UIApplicationMain + 1605
66  classeviva studenti                 0x0000000100c1da2b main + 75
67  libdyld.dylib                       0x00007fff5211c1fd start + 1
68  ???                                 0x0000000000000005 0x0 + 5!!! IMPORTANT: Please send this log and info about Realm SDK version and other relevant reproduction info to help@realm.io.2020-09-14 17:25:55.521670+0200 classeviva studenti[64150:426666] /Users/andrea/Projects/ios/classevivastudente/Pods/Realm/include/core/realm/table.hpp:1193: [realm-core-6.0.25] Assertion failed: spec_ndx < get_column_count() [18446744073709551615, 5]

0   Realm                               0x0000000104b861cc _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1   Realm                               0x0000000104b864bb _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 395
2   Realm                               0x000000010445e082 _ZN5realm4util9terminateIJmmEEEvPKcS3_lDpT_ + 162
3   Realm                               0x000000010449b9ad _ZNK5realm5Table15get_column_nameENS_6ColKeyE + 189
4   Realm                               0x00000001044af907 _ZN5realm11ObjectStore26get_primary_key_for_objectERKNS_5GroupENS_10StringDataE + 215
5   Realm                               0x000000010449b5ff _ZN5realm12ObjectSchemaC2ERKNS_5GroupENS_10StringDataENS_8TableKeyE + 1903
6   Realm                               0x000000010449bde5 _ZN5realm12ObjectSchemaC1ERKNS_5GroupENS_10StringDataENS_8TableKeyE + 53
7   Realm                               0x00000001044c5526 _ZNSt3__19allocatorIN5realm12ObjectSchemaEE9constructIS2_JRKNS1_5GroupERNS1_10StringDataERNS1_8TableKeyEEEEvPT_DpOT0_ + 134
8   Realm                               0x00000001044c548e _ZNSt3__116allocator_traitsINS_9allocatorIN5realm12ObjectSchemaEEEE11__constructIS3_JRKNS2_5GroupERNS2_10StringDataERNS2_8TableKeyEEEEvNS_17integral_constantIbLb1EEERS4_PT_DpOT0_ + 126
9   Realm                               0x00000001044c51be _ZNSt3__116allocator_traitsINS_9allocatorIN5realm12ObjectSchemaEEEE9constructIS3_JRKNS2_5GroupERNS2_10StringDataERNS2_8TableKeyEEEEvRS4_PT_DpOT0_ + 126
10  Realm                               0x00000001044b2717 _ZNSt3__16vectorIN5realm12ObjectSchemaENS_9allocatorIS2_EEE12emplace_backIJRKNS1_5GroupERNS1_10StringDataERNS1_8TableKeyEEEERS2_DpOT_ + 215
11  Realm                               0x00000001044b20e4 _ZN5realm11ObjectStore17schema_from_groupERKNS_5GroupE + 468
12  Realm                               0x00000001044b1930 _ZN5realm11ObjectStore20apply_schema_changesERNS_11TransactionEyRNS_6SchemaEyNS_10SchemaModeERKNSt3__16vectorINS_12SchemaChangeENS6_9allocatorIS8_EEEENS_4util8OptionalINS6_12basic_stringIcNS6_11char_traitsIcEENS9_IcEEEEEENS6_8functionIFvvEEE + 944
13  Realm                               0x000000010481f063 _ZN5realm5Realm13update_schemaENS_6SchemaEyNSt3__18functionIFvNS2_10shared_ptrIS0_EES5_RS1_EEENS3_IFvS5_EEEb + 1667
14  Realm                               0x0000000104733196 +[RLMRealm realmWithConfiguration:queue:error:] + 4582
15  Realm                               0x0000000104731f4f +[RLMRealm realmWithConfiguration:error:] + 111
16  Realm                               0x0000000104738677 +[RLMRealm performMigrationForConfiguration:error:] + 311
17  RealmSwift                          0x000000010629e01a $s10RealmSwift0A0V16performMigration3foryAC13ConfigurationV_tKFZ + 202
18  classeviva studentiTests            0x0000000107a79371 $s24classeviva_studentiTests014BaseMigrationsC0C31performTestMigrationFromVersiony10RealmSwift0K0VSgs6UInt64VF + 1793
19  classeviva studentiTests            0x00000001079aaea4 $s24classeviva_studentiTests010MigrationsC0C27testMigrationFrom16ToLatestyyF + 68
20  classeviva studentiTests            0x00000001079aaeeb $s24classeviva_studentiTests010MigrationsC0C27testMigrationFrom16ToLatestyyFTo + 43
21  CoreFoundation                      0x00007fff23e44dec __invoking___ + 140
22  CoreFoundation                      0x00007fff23e41fd1 -[NSInvocation invoke] + 321
23  XCTest                              0x0000000107651fa7 __24-[XCTestCase invokeTest]_block_invoke_2 + 52
24  XCTest                              0x0000000107651f53 __24-[XCTestCase invokeTest]_block_invoke.206 + 320
25  XCTest                              0x00000001076acd32 +[XCTestCase(Failures) performFailableBlock:testCase:testCaseRun:shouldInterruptTest:] + 69
26  XCTest                              0x00000001076acc44 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 115
27  XCTest                              0x0000000107651966 -[XCTestCase invokeTest] + 1183
28  XCTest                              0x0000000107653299 __26-[XCTestCase performTest:]_block_invoke_2 + 43
29  XCTest                              0x00000001076acd32 +[XCTestCase(Failures) performFailableBlock:testCase:testCaseRun:shouldInterruptTest:] + 69
30  XCTest                              0x00000001076acc44 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 115
31  XCTest                              0x00000001076531d0 __26-[XCTestCase performTest:]_block_invoke.359 + 86
32  XCTest                              0x00000001076bf97d +[XCTContext runInContextForTestCase:block:] + 211
33  XCTest                              0x0000000107652a84 -[XCTestCase performTest:] + 566
34  XCTest                              0x00000001076992fe -[XCTest runTest] + 57
35  XCTest                              0x000000010764ccc0 __27-[XCTestSuite performTest:]_block_invoke + 354
36  XCTest                              0x000000010764c412 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 24
37  XCTest                              0x00000001076bf97d +[XCTContext runInContextForTestCase:block:] + 211
38  XCTest                              0x000000010764c3c9 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 148
39  XCTest                              0x000000010764c72e -[XCTestSuite performTest:] + 348
40  XCTest                              0x00000001076992fe -[XCTest runTest] + 57
41  XCTest                              0x000000010764ccc0 __27-[XCTestSuite performTest:]_block_invoke + 354
42  XCTest                              0x000000010764c412 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 24
43  XCTest                              0x00000001076bf97d +[XCTContext runInContextForTestCase:block:] + 211
44  XCTest                              0x000000010764c3c9 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 148
45  XCTest                              0x000000010764c72e -[XCTestSuite performTest:] + 348
46  XCTest                              0x00000001076992fe -[XCTest runTest] + 57
47  XCTest                              0x000000010764ccc0 __27-[XCTestSuite performTest:]_block_invoke + 354
48  XCTest                              0x000000010764c412 __59-[XCTestSuite _performProtectedSectionForTest:testSection:]_block_invoke + 24
49  XCTest                              0x00000001076bf97d +[XCTContext runInContextForTestCase:block:] + 211
50  XCTest                              0x000000010764c3c9 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 148
51  XCTest                              0x000000010764c72e -[XCTestSuite performTest:] + 348
52  XCTest                              0x00000001076992fe -[XCTest runTest] + 57
53  XCTest                              0x00000001076cee84 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 171
54  XCTest                              0x00000001076cef71 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.100 + 96
55  XCTest                              0x00000001076676b6 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 682
56  XCTest                              0x00000001076cec0f -[XCTTestRunSession runTestsAndReturnError:] + 615
57  XCTest                              0x00000001076306b4 -[XCTestDriver runTestsAndReturnError:] + 456
58  XCTest                              0x00000001076bb5bc _XCTestMain + 2496
59  libXCTestBundleInject.dylib         0x0000000102189bfa __copy_helper_block_e8_32s + 0
60  CoreFoundation                      0x00007fff23da1abc __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
61  CoreFoundation                      0x00007fff23da11b3 __CFRunLoopDoBlocks + 195
62  CoreFoundation                      0x00007fff23d9bfa3 __CFRunLoopRun + 995
63  CoreFoundation                      0x00007fff23d9b8a4 CFRunLoopRunSpecific + 404
64  GraphicsServices                    0x00007fff38c05bbe GSEventRunModal + 139
65  UIKitCore                           0x00007fff49372964 UIApplicationMain + 1605
66  classeviva studenti                 0x0000000100c1da2b main + 75
67  libdyld.dylib                       0x00007fff5211c1fd start + 1
68  ???                                 0x0000000000000005 0x0 + 5!!! IMPORTANT: Please send this log and info about Realm SDK version and other relevant reproduction info to help@realm.io.
jedelbo commented 4 years ago

@bennettyuan18 , @andreadelfante or @varyP would it be possible to share a realm that causes this behavior? You can share it privately by sending it to jorgen.edelbo@mongodb.com.

andreadelfante commented 4 years ago

@bennettyuan18 , @andreadelfante or @varyP would it be possible to share a realm that causes this behavior? You can share it privately by sending it to jorgen.edelbo@mongodb.com.

My email is coming right up!

jedelbo commented 4 years ago

The realms received from @andreadelfante did not give any hint as to what may be wrong here. It should be noted that the stacktrace provided by @varyP is pointing to a different issue.

jedelbo commented 4 years ago

After having investigated for several days now, I am out of ideas about what could be wrong here. I have received rather detailed information from @andreadelfante , so I have a pretty good idea of where to look (changing nullability for a primary key column), but I have not been able to reproduce. I have added a few more assertions into the Core code, so I would like to wait and see if this brings more light.

RealmBot commented 4 years ago

➤ Jørgen Edelbo commented:

Setting to "Blocked" as I don't know how to proceed on this.

jedelbo commented 3 years ago

No activity for a long time. Closing. Should you experience anything like this again, feel free to create a new issue.