-
Notifications
You must be signed in to change notification settings - Fork 168
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
CHANGE FROM @AsyncOpen to @AutoOpen CRASHES #7798
Comments
➤ PM Bot commented: Jira ticket: RCORE-2163 |
Hi @chrisrohrer, are you able to set an "c++ exception breakpoint" in debug mode so that we can see what is being thrown?
|
Hi James,
I had just updated to macOS 15 beta and I’m getting this regularly now –
If I build & run while the app is still running it happens every time.
If I quit the running app and then build & run I get a 50% chance
I’ll get back to you with c++ exception breakpoint results ...
best
Christoph
___
… On 11. Jun 2024, at 20:25, James Stone ***@***.***> wrote:
Hi @chrisrohrer <https://github.com/chrisrohrer>, are you able to set an "c++ exception breakpoint" in debug mode so that we can see what is being thrown?
The unreachable code is due to exception_to_status() not being able to convert from a standard exception type.
Status exception_to_status() noexcept
{
try {
throw;
}
catch (const Exception& e) {
return e.to_status();
}
catch (const std::exception& e) {
return Status(ErrorCodes::UnknownError,
util::format("Caught std::exception of type %1: %2", util::get_type_name(e), e.what()));
}
catch (...) {
REALM_UNREACHABLE();
}
}
—
Reply to this email directly, view it on GitHub <#7798 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUB5DNBBHBYBAUENKSLYEELZG46JHAVCNFSM6AAAAABJEF3P56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRGM3DKMRTGA>.
You are receiving this because you were mentioned.
|
Thread 7: "Schema validation failed due to the following errors:\n- Property 'Zahlungslauf.auszahlungen' declared as origin of linking objects property 'Auszahlung.zahlungslauf' does not exist\n- Property 'Position.buchungskonto' declared as origin of linking objects property 'Buchungskonto.positionen' does not exist\n- Property 'Position.budget' declared as origin of linking objects property 'Budget.positionen' does not exist\n- Specified primary key 'Inventar._id' does not exist.\n- Specified primary key 'Kalkulation._id' does not exist.\n- Specified primary key 'Kunde._id' does not exist.\n- Specified primary key 'Leistung._id' does not exist.\n- Specified primary key 'Lieferant._id' does not exist.\n- Specified primary key 'Liquiditaet._id' does not exist.\n- Specified primary key 'Login._id' does not exist.\n- Specified primary key 'LoginGruppe._id' does not exist.\n- Specified primary key 'Mitarbeiter._id' does not exist.\n- Specified primary key 'Position._id' does not exist.\n- Specified primary key 'Projekt._id' does not ex"
Best
Christoph
___
… On 11. Jun 2024, at 20:25, James Stone ***@***.***> wrote:
Hi @chrisrohrer <https://github.com/chrisrohrer>, are you able to set an "c++ exception breakpoint" in debug mode so that we can see what is being thrown?
The unreachable code is due to exception_to_status() not being able to convert from a standard exception type.
Status exception_to_status() noexcept
{
try {
throw;
}
catch (const Exception& e) {
return e.to_status();
}
catch (const std::exception& e) {
return Status(ErrorCodes::UnknownError,
util::format("Caught std::exception of type %1: %2", util::get_type_name(e), e.what()));
}
catch (...) {
REALM_UNREACHABLE();
}
}
—
Reply to this email directly, view it on GitHub <#7798 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUB5DNBBHBYBAUENKSLYEELZG46JHAVCNFSM6AAAAABJEF3P56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRGM3DKMRTGA>.
You are receiving this because you were mentioned.
|
@chrisrohrer thanks for that! |
Not sure how to do that best,
Here is a screen shot ...

… On 12. Jun 2024, at 00:54, James Stone ***@***.***> wrote:
@chrisrohrer <https://github.com/chrisrohrer> thanks for that!
Could you provide the stack trace of that exception please? I'd expect it should have attach_to_subscription_initializer in it somewhere.
—
Reply to this email directly, view it on GitHub <#7798 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUB5DNDVRZJ2KD4AUANP5E3ZG5535AVCNFSM6AAAAABJEF3P56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRG4ZTANRRGY>.
You are receiving this because you were mentioned.
|
@chrisrohrer thanks, a screenshot should work. But I am unable to view your image when you reply by email. Are you able to go to the github issue and add the attachment directly in a comment there? |
Thanks @chrisrohrer that is good information. The exception is from ObjectiveC which is why our conversion handlers don't recognize it. |
Can you share the code for your models? These schema validation errors are surprising and I'm hoping there's something in your models that could point us in the right direction. |
Specific models or all of them? It has around 40 model classes ... |
OK, I did have an incorrect one to many relationship definition:
Lets see if that fixes it ... |
I don't know if we need all of them, but at least those that are mentioned in the error message - for example it states that |
all those error messages don't make sense, as the program and database work in 90% of the time. My guess is the schema is not yet fully loaded when it s checked internally - or some issue with concurrency? |
I think this may have been fixed by #7723 @danieltabacaru do you think so? @chrisrohrer if you are able to, could you try to reproduce this with core v14.10.1? (the realm-swift SDK has not picked this up yet, but should do so in the next week or so) |
@ironage I am not sure if my change is going to make a difference, but it's worth trying. I find it odd that setting rerunOnOpen to false fixes the issue, when it's the schema validation in update_schema that seems to cause the issue. @chrisrohrer Are you changing the schema between runs? Is it a fresh realm the app uses? Are you using developer mode? At the point of the crash the schema should already be downloaded from the server, and if it matches the client one, then there should be no schema validation (unless you use developer mode or make additive changes to the schema). |
@danieltabacaru I am actually using developer mode! |
SDK and version
SDK : RealmSwift
Version: 10.51.0
Observations
Crash log / stacktrace
/Users/crohrer/Library/Developer/Xcode/DerivedData/PooolRealm-dzsawcsrvibeudciyiphrqrzernr/SourcePackages/checkouts/realm-core/src/realm/exceptions.cpp:80: [realm-core-14.9.0] Unreachable code
0 RealmSwift 0x000000010b1cdb14 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1 RealmSwift 0x000000010b1cdaf4 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 308
2 RealmSwift 0x000000010b1cd9c0 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 0
3 RealmSwift 0x000000010aa32f58 _ZN5realm19exception_to_statusEv + 304
4 RealmSwift 0x000000010ad2b93c _ZN5realm13AsyncOpenTask34attach_to_subscription_initializerEONS_4util14UniqueFunctionIFvNS_19ThreadSafeReferenceESt13exception_ptrEEENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEEb + 224
5 RealmSwift 0x000000010ad2c528 _ZN5realm13AsyncOpenTask30wait_for_bootstrap_or_completeEONS_4util14UniqueFunctionIFvNS_19ThreadSafeReferenceESt13exception_ptrEEENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEENS_6StatusE + 256
6 RealmSwift 0x000000010ad2c1ec _ZN5realm13AsyncOpenTask26migrate_schema_or_completeEONS_4util14UniqueFunctionIFvNS_19ThreadSafeReferenceESt13exception_ptrEEENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEENS_6StatusE + 236
7 RealmSwift 0x000000010ad2d4e8 _ZZN5realm13AsyncOpenTask5startENS_4util14UniqueFunctionIFvNS_19ThreadSafeReferenceESt13exception_ptrEEEEN3$_0clENS_6StatusE + 396
8 RealmSwift 0x000000010ad2d214 _ZN5realm4util14UniqueFunctionIFvNS_6StatusEEE12SpecificImplIZNS_13AsyncOpenTask5startENS1_IFvNS_19ThreadSafeReferenceESt13exception_ptrEEEE3$0E4callEOS2 + 60
9 RealmSwift 0x000000010ad65944 ZNK5realm4util14UniqueFunctionIFvNS_6StatusEEEclES2 + 112
10 RealmSwift 0x000000010ad86314 _ZZN5realm11SyncSession23add_completion_callbackENS_4util14UniqueFunctionIFvNS_6StatusEEEENS_5_impl20SyncProgressNotifier12NotifierTypeEENK3$0clES3 + 224
11 RealmSwift 0x000000010ad86174 _ZN5realm4util14UniqueFunctionIFvNS_6StatusEEE12SpecificImplIZNS_11SyncSession23add_completion_callbackES4_NS_5_impl20SyncProgressNotifier12NotifierTypeEE3$0E4callEOS2 + 60
12 RealmSwift 0x000000010ad65944 ZNK5realm4util14UniqueFunctionIFvNS_6StatusEEEclES2 + 112
13 RealmSwift 0x000000010af31284 _ZN5realm4sync14SessionWrapper22on_download_completionEv + 112
14 RealmSwift 0x000000010af31204 _ZN5realm4sync10ClientImpl7Session22on_download_completionEv + 56
15 RealmSwift 0x000000010b017a64 _ZN5realm4sync10ClientImpl7Session29check_for_download_completionEv + 304
16 RealmSwift 0x000000010b01550c _ZN5realm4sync10ClientImpl7Session20receive_mark_messageEy + 416
17 RealmSwift 0x000000010b0152f0 _ZN5realm4sync10ClientImpl10Connection20receive_mark_messageEyy + 124
18 RealmSwift 0x000000010b01232c _ZN5realm5_impl14ClientProtocol22parse_message_receivedINS_4sync10ClientImpl10ConnectionEEEvRT_NSt3__117basic_string_viewIcNS8_11char_traitsIcEEEE + 4444
19 RealmSwift 0x000000010b00deb4 _ZN5realm4sync10ClientImpl10Connection23handle_message_receivedENS_4util4SpanIKcLm18446744073709551615EEE + 112
20 RealmSwift 0x000000010b00dd9c _ZN5realm4sync10ClientImpl10Connection33websocket_binary_message_receivedENS_4util4SpanIKcLm18446744073709551615EEE + 252
21 RealmSwift 0x000000010b026e24 _ZN5realm4sync10ClientImpl10Connection21WebSocketObserverShim33websocket_binary_message_receivedENS_4util4SpanIKcLm18446744073709551615EEE + 100
22 RealmSwift 0x000000010af86f20 _ZN5realm4sync9websocket12_GLOBAL__N_120DefaultWebSocketImpl33websocket_binary_message_receivedEPKcm + 80
23 RealmSwift 0x000000010afbfbe8 _ZN12_GLOBAL__N_19WebSocket17frame_reader_loopEv + 232
24 RealmSwift 0x000000010afc16a4 _ZZN12_GLOBAL__N_19WebSocket17frame_reader_loopEvENKUlNSt3__110error_codeEmE_clES2_m + 176
25 RealmSwift 0x000000010afc15bc _ZN5realm4util14UniqueFunctionIFvNSt3__110error_codeEmEE12SpecificImplIZN12_GLOBAL__N_19WebSocket17frame_reader_loopEvEUlS3_mE_E4callEOS3_Om + 64
26 RealmSwift 0x000000010af99f78 _ZNK5realm4util14UniqueFunctionIFvNSt3__110error_codeEmEEclES3_m + 120
27 RealmSwift 0x000000010af99cec ZN5realm4sync7network7Service9AsyncOper29do_recycle_and_execute_helperINS_4util14UniqueFunctionIFvNSt3__110error_codeEmEEEJS8_mEEEvbRbT_DpT0 + 116
28 RealmSwift 0x000000010af99bfc ZN5realm4sync7network7Service9AsyncOper22do_recycle_and_executeINS_4util14UniqueFunctionIFvNSt3__110error_codeEmEEEJRS8_RmEEEvbRT_DpOT0 + 168
29 RealmSwift 0x000000010af9964c _ZN5realm4sync7network7Service14BasicStreamOpsINS1_3ssl6StreamEE16BufferedReadOperINS_4util14UniqueFunctionIFvNSt3__110error_codeEmEEEE19recycle_and_executeEv + 656
30 RealmSwift 0x000000010afab448 _ZN5realm4sync7network7Service4Impl7executeERNSt3__110unique_ptrINS2_9AsyncOperENS2_18LendersOperDeleterEEE + 36
31 RealmSwift 0x000000010afab154 _ZN5realm4sync7network7Service4Impl8run_implEb + 316
32 RealmSwift 0x000000010afa6f08 _ZN5realm4sync7network7Service4Impl17run_until_stoppedEv + 32
33 RealmSwift 0x000000010afa6edc _ZN5realm4sync7network7Service17run_until_stoppedEv + 28
34 RealmSwift 0x000000010af80474 _ZN5realm4sync9websocket21DefaultSocketProvider10event_loopEv + 352
35 RealmSwift 0x000000010af84c00 ZNSt3__18__invokeB8de180100IMN5realm4sync9websocket21DefaultSocketProviderEFvvEPS4_JEvEEDTcldsdeclsr3stdE7declvalIT0_EEclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT1_EEEEOS9_OS8_DpOSA + 132
36 RealmSwift 0x000000010af84b70 _ZNSt3__116__thread_executeB8de180100INS_10unique_ptrINS_15__thread_structENS_14default_deleteIS2_EEEEMN5realm4sync9websocket21DefaultSocketProviderEFvvEJPS9_EJLm2EEEEvRNS_5tupleIJT_T0_DpT1_EEENS_15__tuple_indicesIJXspT2_EEEE + 48
37 RealmSwift 0x000000010af8481c ZNSt3__114__thread_proxyB8de180100INS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN5realm4sync9websocket21DefaultSocketProviderEFvvEPSA_EEEEEPvSF + 84
38 libsystem_pthread.dylib 0x00000001031529ac _pthread_start + 136
39 libsystem_pthread.dylib 0x000000010315ccfc thread_start + 8
Steps & Code to Reproduce
CHANGED FROM @AsyncOpen to @AutOOpeN
The text was updated successfully, but these errors were encountered: