Skip to content
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

Can't use Realm in iOS Simulator while Realm Studio is open; can otherwise #8057

Closed
josephmalam opened this issue Dec 12, 2022 · 9 comments
Closed
Assignees

Comments

@josephmalam
Copy link

josephmalam commented Dec 12, 2022

How frequently does the bug occur?

All the time

Description

I am using Realm in my iOS project, and it works fine when testing in the iOS Simulator (have tried various simulators), as long as Realm Studio is not open. If Realm Studio is open, I get the following error:

Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=io.realm Code=8 "Realm file is currently open in another process which cannot share access with this process. All processes sharing a single file must be the same architecture. For sharing files between the Realm Browser and an iOS simulator, this means that you must use a 64-bit simulator

Stacktrace & log output

Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=io.realm Code=8 "Realm file is currently open in another process which cannot share access with this process. All processes sharing a single file must be the same architecture. For sharing files between the Realm Browser and an iOS simulator, this means that you must use a 64-bit simulator. Path: /Users/josephmalam/Library/Developer/CoreSimulator/Devices/8D8397BF-CE13-453F-8E41-EB9EF35D04B1/data/Containers/Data/Application/9914B161-0173-419B-A05C-2528678E69EE/Documents/default.realm
Exception backtrace:
0   RealmTest                           0x00000001043fc344 _ZN5realm4util6detail26ExceptionWithBacktraceBaseC2Ev + 48
1   RealmTest                           0x0000000104655888 _ZN5realm4util22ExceptionWithBacktraceISt13runtime_errorEC2IJRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEDpOT_ + 84
2   RealmTest                           0x0000000104655694 _ZN5realm4util4File11AccessErrorC2ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ + 64
3   RealmTest                           0x0000000104655634 _ZN5realm4util4File16PermissionDeniedC2ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ + 68
4   RealmTest                           0x000000010464a780 _ZN5realm4util4File16PermissionDeniedC1ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ + 44
5   RealmTest                           0x000000010464a324 _Z26RLMRealmTranslateExceptionPU15__autoreleasingP7NSError + 1068
6   RealmTest                           0x000000010464ac48 +[RLMRealm realmWithConfiguration:queue:error:] + 888
7   RealmTest                           0x0000000104702934 $sSo8RLMRealmC13configuration5queueABSo0A13ConfigurationC_So012OS_dispatch_C0CSgtKcfCTO + 128
8   RealmTest                           0x00000001047bb598 $s10RealmSwift0A0V13configuration5queueA2C13ConfigurationV_So012OS_dispatch_D0CSgtKcfC + 188
9   RealmTest                           0x00000001047ed7a0 $s10RealmSwift15ObservedResultsV7Storage33_06F2B43D1E2DA64D3C5AC1DADA9F5BA7LLC11updateValueyyF + 352
10  RealmTest                           0x00000001047ea4b0 $s10RealmSwift24ObservableResultsStorage33_06F2B43D1E2DA64D3C5AC1DADA9F5BA7LLC10setupValueyyF + 132
11  RealmTest                           0x00000001047efc88 $s10RealmSwift15ObservedResultsV12wrappedValueAA0D0VyxGvg + 252
12  RealmTest                           0x00000001047f1964 $s10RealmSwift15ObservedResultsVyxGAA15BoundCollectionA2aEP12wrappedValue0H0QzvgTW + 20
13  RealmTest                           0x00000001047fad74 $s10RealmSwift15BoundCollectionPAASo0aB6ObjectC7ElementRczAA7ResultsVyAGG5ValueRtzrlE6appendyyAGF + 392
14  RealmTest                           0x00000001043c8030 $s9RealmTest21AddShoppingListScreenV4bodyQrvg7SwiftUI4ViewPAEE15navigationTitleyQrAE18LocalizedStringKeyVFQOyAE4FormVyAE05TupleJ0VyAE9TextFieldVyAE0R0VG_AsgEE11buttonStyleyQrqd__AE015PrimitiveButtonU0Rd__lFQOyAE0W0VyAgEE5frame8minWidth05idealZ003maxZ00Y6Height11idealHeight9maxHeight9alignmentQr12CoreGraphics7CGFloatVSg_A7_A7_A7_A7_A7_AE9AlignmentVtFQOyAR_Qo_G_AE08BorderedwU0VQo_tGG_Qo_yXEfU_A15_yXEfU_yycfU_ + 900
15  SwiftUI                             0x000000010cc0f2cc __swift_memcpy3_1 + 8096
16  SwiftUI                             0x000000010cc0fb54 __swift_memcpy3_1 + 10280
17  SwiftUI                             0x000000010cc0fac4 __swift_memcpy3_1 + 10136
18  SwiftUI                             0x000000010cfd01b0 OUTLINED_FUNCTION_30 + 4452
19  SwiftUI                             0x000000010cfd01cc OUTLINED_FUNCTION_30 + 4480
20  SwiftUI                             0x000000010cfd01b0 OUTLINED_FUNCTION_30 + 4452
21  SwiftUI                             0x000000010cd393c0 OUTLINED_FUNCTION_11 + 3028
22  SwiftUI                             0x000000010cd38e78 OUTLINED_FUNCTION_11 + 1676
23  SwiftUI                             0x000000010ce88a18 OUTLINED_FUNCTION_11 + 1224
24  SwiftUI                             0x000000010d58fdf4 OUTLINED_FUNCTION_2 + 9296
25  SwiftUI                             0x000000010d58e698 OUTLINED_FUNCTION_2 + 3316
26  SwiftUI                             0x000000010d58e770 OUTLINED_FUNCTION_2 + 3532
27  UIKitCore                           0x00000001090eb070 -[UIGestureRecognizer _componentsEnded:withEvent:] + 152
28  UIKitCore                           0x00000001095b7648 -[UITouchesEvent _sendEventToGestureRecognizer:] + 556
29  UIKitCore                           0x00000001090e0300 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 160
30  UIKitCore                           0x00000001090e00f0 -[UIGestureEnvironment _updateForEvent:window:] + 156
31  UIKitCore                           0x0000000109573f80 -[UIWindow sendEvent:] + 3168
32  UIKitCore                           0x0000000109552224 -[UIApplication sendEvent:] + 692
33  UIKitCore                           0x00000001095ceb10 __dispatchPreprocessedEventFromEventQueue + 6824
34  UIKitCore                           0x00000001095d0774 __processEventQueue + 5612
35  UIKitCore                           0x00000001095c9650 __eventFetcherSourceCallback + 220
36  CoreFoundation                      0x00000001803731dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
37  CoreFoundation                      0x0000000180373124 __CFRunLoopDoSource0 + 172
38  CoreFoundation                      0x0000000180372894 __CFRunLoopDoSources0 + 232
39  CoreFoundation                      0x000000018036cf00 __CFRunLoopRun + 756
40  CoreFoundation                      0x000000018036c7f4 CFRunLoopRunSpecific + 584
41  GraphicsServices                    0x0000000188faec98 GSEventRunModal + 160
42  UIKitCore                           0x00000001095385d4 -[UIApplication _run] + 868
43  UIKitCore                           0x000000010953c5cc UIApplicationMain + 124
44  SwiftUI                             0x000000010d54ab18 OUTLINED_FUNCTION_51 + 496
45  SwiftUI                             0x000000010d54a9c0 OUTLINED_FUNCTION_51 + 152
46  SwiftUI                             0x000000010ccee36c OUTLINED_FUNCTION_10 + 88
47  RealmTest                           0x00000001043c5cfc $s9RealmTest0aB3AppV5$mainyyFZ + 40
48  RealmTest                           0x00000001043c5da4 main + 12
49  dyld                                0x00000001082fdfa0 start_sim + 20
50  ???                                 0x00000001083d1e50 0x0 + 4433190480
51  ???                                 0x4f2b800000000000 0x0 + 5704794090483220480" UserInfo={NSFilePath=/Users/josephmalam/Library/Developer/CoreSimulator/Devices/8D8397BF-CE13-453F-8E41-EB9EF35D04B1/data/Containers/Data/Application/9914B161-0173-419B-A05C-2528678E69EE/Documents/default.realm, NSLocalizedDescription=Realm file is currently open in another process which cannot share access with this process. All processes sharing a single file must be the same architecture. For sharing files between the Realm Browser and an iOS simulator, this means that you must use a 64-bit simulator. Path: /Users/josephmalam/Library/Developer/CoreSimulator/Devices/8D8397BF-CE13-453F-8E41-EB9EF35D04B1/data/Containers/Data/Application/9914B161-0173-419B-A05C-2528678E69EE/Documents/default.realm
Exception backtrace:
0   RealmTest                           0x00000001043fc344 _ZN5realm4util6detail26ExceptionWithBacktraceBaseC2Ev + 48
1   RealmTest                           0x0000000104655888 _ZN5realm4util22ExceptionWithBacktraceISt13runtime_errorEC2IJRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEDpOT_ + 84
2   RealmTest                           0x0000000104655694 _ZN5realm4util4File11AccessErrorC2ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ + 64
3   RealmTest                           0x0000000104655634 _ZN5realm4util4File16PermissionDeniedC2ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ + 68
4   RealmTest                           0x000000010464a780 _ZN5realm4util4File16PermissionDeniedC1ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ + 44
5   RealmTest                           0x000000010464a324 _Z26RLMRealmTranslateExceptionPU15__autoreleasingP7NSError + 1068
6   RealmTest                           0x000000010464ac48 +[RLMRealm realmWithConfiguration:queue:error:] + 888
7   RealmTest                           0x0000000104702934 $sSo8RLMRealmC13configuration5queueABSo0A13ConfigurationC_So012OS_dispatch_C0CSgtKcfCTO + 128
8   RealmTest                           0x00000001047bb598 $s10RealmSwift0A0V13configuration5queueA2C13ConfigurationV_So012OS_dispatch_D0CSgtKcfC + 188
9   RealmTest                           0x00000001047ed7a0 $s10RealmSwift15ObservedResultsV7Storage33_06F2B43D1E2DA64D3C5AC1DADA9F5BA7LLC11updateValueyyF + 352
10  RealmTest                           0x00000001047ea4b0 $s10RealmSwift24ObservableResultsStorage33_06F2B43D1E2DA64D3C5AC1DADA9F5BA7LLC10setupValueyyF + 132
11  RealmTest                           0x00000001047efc88 $s10RealmSwift15ObservedResultsV12wrappedValueAA0D0VyxGvg + 252
12  RealmTest                           0x00000001047f1964 $s10RealmSwift15ObservedResultsVyxGAA15BoundCollectionA2aEP12wrappedValue0H0QzvgTW + 20
13  RealmTest                           0x00000001047fad74 $s10RealmSwift15BoundCollectionPAASo0aB6ObjectC7ElementRczAA7ResultsVyAGG5ValueRtzrlE6appendyyAGF + 392
14  RealmTest                           0x00000001043c8030 $s9RealmTest21AddShoppingListScreenV4bodyQrvg7SwiftUI4ViewPAEE15navigationTitleyQrAE18LocalizedStringKeyVFQOyAE4FormVyAE05TupleJ0VyAE9TextFieldVyAE0R0VG_AsgEE11buttonStyleyQrqd__AE015PrimitiveButtonU0Rd__lFQOyAE0W0VyAgEE5frame8minWidth05idealZ003maxZ00Y6Height11idealHeight9maxHeight9alignmentQr12CoreGraphics7CGFloatVSg_A7_A7_A7_A7_A7_AE9AlignmentVtFQOyAR_Qo_G_AE08BorderedwU0VQo_tGG_Qo_yXEfU_A15_yXEfU_yycfU_ + 900
15  SwiftUI                             0x000000010cc0f2cc __swift_memcpy3_1 + 8096
16  SwiftUI                             0x000000010cc0fb54 __swift_memcpy3_1 + 10280
17  SwiftUI                             0x000000010cc0fac4 __swift_memcpy3_1 + 10136
18  SwiftUI                             0x000000010cfd01b0 OUTLINED_FUNCTION_30 + 4452
19  SwiftUI                             0x000000010cfd01cc OUTLINED_FUNCTION_30 + 4480
20  SwiftUI                             0x000000010cfd01b0 OUTLINED_FUNCTION_30 + 4452
21  SwiftUI                             0x000000010cd393c0 OUTLINED_FUNCTION_11 + 3028
22  SwiftUI                             0x000000010cd38e78 OUTLINED_FUNCTION_11 + 1676
23  SwiftUI                             0x000000010ce88a18 OUTLINED_FUNCTION_11 + 1224
24  SwiftUI                             0x000000010d58fdf4 OUTLINED_FUNCTION_2 + 9296
25  SwiftUI                             0x000000010d58e698 OUTLINED_FUNCTION_2 + 3316
26  SwiftUI                             0x000000010d58e770 OUTLINED_FUNCTION_2 + 3532
27  UIKitCore                           0x00000001090eb070 -[UIGestureRecognizer _componentsEnded:withEvent:] + 152
28  UIKitCore                           0x00000001095b7648 -[UITouchesEvent _sendEventToGestureRecognizer:] + 556
29  UIKitCore                           0x00000001090e0300 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 160
30  UIKitCore                           0x00000001090e00f0 -[UIGestureEnvironment _updateForEvent:window:] + 156
31  UIKitCore                           0x0000000109573f80 -[UIWindow sendEvent:] + 3168
32  UIKitCore                           0x0000000109552224 -[UIApplication sendEvent:] + 692
33  UIKitCore                           0x00000001095ceb10 __dispatchPreprocessedEventFromEventQueue + 6824
34  UIKitCore                           0x00000001095d0774 __processEventQueue + 5612
35  UIKitCore                           0x00000001095c9650 __eventFetcherSourceCallback + 220
36  CoreFoundation                      0x00000001803731dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
37  CoreFoundation                      0x0000000180373124 __CFRunLoopDoSource0 + 172
38  CoreFoundation                      0x0000000180372894 __CFRunLoopDoSources0 + 232
39  CoreFoundation                      0x000000018036cf00 __CFRunLoopRun + 756
40  CoreFoundation                      0x000000018036c7f4 CFRunLoopRunSpecific + 584
41  GraphicsServices                    0x0000000188faec98 GSEventRunModal + 160
42  UIKitCore                           0x00000001095385d4 -[UIApplication _run] + 868
43  UIKitCore                           0x000000010953c5cc UIApplicationMain + 124
44  SwiftUI                             0x000000010d54ab18 OUTLINED_FUNCTION_51 + 496
45  SwiftUI                             0x000000010d54a9c0 OUTLINED_FUNCTION_51 + 152
46  SwiftUI                             0x000000010ccee36c OUTLINED_FUNCTION_10 + 88
47  RealmTest                           0x00000001043c5cfc $s9RealmTest0aB3AppV5$mainyyFZ + 40
48  RealmTest                           0x00000001043c5da4 main + 12
49  dyld                                0x00000001082fdfa0 start_sim + 20
50  ???                                 0x00000001083d1e50 0x0 + 4433190480
51  ???                                 0x4f2b800000000000 0x0 + 5704794090483220480, Error Code=8}
2022-12-12 10:18:21.014975+0400 RealmTest[25603:5902472] RealmSwift/SwiftUI.swift:483: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=io.realm Code=8 "Realm file is currently open in another process which cannot share access with this process. All processes sharing a single file must be the same architecture. For sharing files between the Realm Browser and an iOS simulator, this means that you must use a 64-bit simulator. Path: /Users/josephmalam/Library/Developer/CoreSimulator/Devices/8D8397BF-CE13-453F-8E41-EB9EF35D04B1/data/Containers/Data/Application/9914B161-0173-419B-A05C-2528678E69EE/Documents/default.realm
Exception backtrace:
0   RealmTest                           0x00000001043fc344 _ZN5realm4util6detail26ExceptionWithBacktraceBaseC2Ev + 48
1   RealmTest                           0x0000000104655888 _ZN5realm4util22ExceptionWithBacktraceISt13runtime_errorEC2IJRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEDpOT_ + 84
2   RealmTest                           0x0000000104655694 _ZN5realm4util4File11AccessErrorC2ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ + 64
3   RealmTest                           0x0000000104655634 _ZN5realm4util4File16PermissionDeniedC2ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ + 68
4   RealmTest                           0x000000010464a780 _ZN5realm4util4File16PermissionDeniedC1ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ + 44
5   RealmTest                           0x000000010464a324 _Z26RLMRealmTranslateExceptionPU15__autoreleasingP7NSError + 1068
6   RealmTest                           0x000000010464ac48 +[RLMRealm realmWithConfiguration:queue:error:] + 888
7   RealmTest                           0x0000000104702934 $sSo8RLMRealmC13configuration5queueABSo0A13ConfigurationC_So012OS_dispatch_C0CSgtKcfCTO + 128
8   RealmTest                           0x00000001047bb598 $s10RealmSwift0A0V13configuration5queueA2C13ConfigurationV_So012OS_dispatch_D0CSgtKcfC + 188
9   RealmTest                           0x00000001047ed7a0 $s10RealmSwift15ObservedResultsV7Storage33_06F2B43D1E2DA64D3C5AC1DADA9F5BA7LLC11updateValueyyF + 352
10  RealmTest                           0x00000001047ea4b0 $s10RealmSwift24ObservableResultsStorage33_06F2B43D1E2DA64D3C5AC1DADA9F5BA7LLC10setupValueyyF + 132
11  RealmTest                           0x00000001047efc88 $s10RealmSwift15ObservedResultsV12wrappedValueAA0D0VyxGvg + 252
12  RealmTest                           0x00000001047f1964 $s10RealmSwift15ObservedResultsVyxGAA15BoundCollectionA2aEP12wrappedValue0H0QzvgTW + 20
13  RealmTest                           0x00000001047fad74 $s10RealmSwift15BoundCollectionPAASo0aB6ObjectC7ElementRczAA7ResultsVyAGG5ValueRtzrlE6appendyyAGF + 392
14  RealmTest                           0x00000001043c8030 $s9RealmTest21AddShoppingListScreenV4bodyQrvg7SwiftUI4ViewPAEE15navigationTitleyQrAE18LocalizedStringKeyVFQOyAE4FormVyAE05TupleJ0VyAE9TextFieldVyAE0R0VG_AsgEE11buttonStyleyQrqd__AE015PrimitiveButtonU0Rd__lFQOyAE0W0VyAgEE5frame8minWidth05idealZ003maxZ00Y6Height11idealHeight9maxHeight9alignmentQr12CoreGraphics7CGFloatVSg_A7_A7_A7_A7_A7_AE9AlignmentVtFQOyAR_Qo_G_AE08BorderedwU0VQo_tGG_Qo_yXEfU_A15_yXEfU_yycfU_ + 900
15  SwiftUI                             0x000000010cc0f2cc __swift_memcpy3_1 + 8096
16  SwiftUI                             0x000000010cc0fb54 __swift_memcpy3_1 + 10280
17  SwiftUI                             0x000000010cc0fac4 __swift_memcpy3_1 + 10136
18  SwiftUI                             0x000000010cfd01b0 OUTLINED_FUNCTION_30 + 4452
19  SwiftUI                             0x000000010cfd01cc OUTLINED_FUNCTION_30 + 4480
20  SwiftUI                             0x000000010cfd01b0 OUTLINED_FUNCTION_30 + 4452
21  SwiftUI                             0x000000010cd393c0 OUTLINED_FUNCTION_11 + 3028
22  SwiftUI                             0x000000010cd38e78 OUTLINED_FUNCTION_11 + 1676
23  SwiftUI                             0x000000010ce88a18 OUTLINED_FUNCTION_11 + 1224
24  SwiftUI                             0x000000010d58fdf4 OUTLINED_FUNCTION_2 + 9296
25  SwiftUI                             0x000000010d58e698 OUTLINED_FUNCTION_2 + 3316
26  SwiftUI                             0x000000010d58e770 OUTLINED_FUNCTION_2 + 3532
27  UIKitCore                           0x00000001090eb070 -[UIGestureRecognizer _componentsEnded:withEvent:] + 152
28  UIKitCore                           0x00000001095b7648 -[UITouchesEvent _sendEventToGestureRecognizer:] + 556
29  UIKitCore                           0x00000001090e0300 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 160
30  UIKitCore                           0x00000001090e00f0 -[UIGestureEnvironment _updateForEvent:window:] + 156
31  UIKitCore                           0x0000000109573f80 -[UIWindow sendEvent:] + 3168
32  UIKitCore                           0x0000000109552224 -[UIApplication sendEvent:] + 692
33  UIKitCore                           0x00000001095ceb10 __dispatchPreprocessedEventFromEventQueue + 6824
34  UIKitCore                           0x00000001095d0774 __processEventQueue + 5612
35  UIKitCore                           0x00000001095c9650 __eventFetcherSourceCallback + 220
36  CoreFoundation                      0x00000001803731dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
37  CoreFoundation                      0x0000000180373124 __CFRunLoopDoSource0 + 172
38  CoreFoundation                      0x0000000180372894 __CFRunLoopDoSources0 + 232
39  CoreFoundation                      0x000000018036cf00 __CFRunLoopRun + 756
40  CoreFoundation                      0x000000018036c7f4 CFRunLoopRunSpecific + 584
41  GraphicsServices                    0x0000000188faec98 GSEventRunModal + 160
42  UIKitCore                           0x00000001095385d4 -[UIApplication _run] + 868
43  UIKitCore                           0x000000010953c5cc UIApplicationMain + 124
44  SwiftUI                             0x000000010d54ab18 OUTLINED_FUNCTION_51 + 496
45  SwiftUI                             0x000000010d54a9c0 OUTLINED_FUNCTION_51 + 152
46  SwiftUI                             0x000000010ccee36c OUTLINED_FUNCTION_10 + 88
47  RealmTest                           0x00000001043c5cfc $s9RealmTest0aB3AppV5$mainyyFZ + 40
48  RealmTest                           0x00000001043c5da4 main + 12
49  dyld                                0x00000001082fdfa0 start_sim + 20
50  ???                                 0x00000001083d1e50 0x0 + 4433190480
51  ???                                 0x4f2b800000000000 0x0 + 5704794090483220480" UserInfo={NSFilePath=/Users/josephmalam/Library/Developer/CoreSimulator/Devices/8D8397BF-CE13-453F-8E41-EB9EF35D04B1/data/Containers/Data/Application/9914B161-0173-419B-A05C-2528678E69EE/Documents/default.realm, NSLocalizedDescription=Realm file is currently open in another process which cannot share access with this process. All processes sharing a single file must be the same architecture. For sharing files between the Realm Browser and an iOS simulator, this means that you must use a 64-bit simulator. Path: /Users/josephmalam/Library/Developer/CoreSimulator/Devices/8D8397BF-CE13-453F-8E41-EB9EF35D04B1/data/Containers/Data/Application/9914B161-0173-419B-A05C-2528678E69EE/Documents/default.realm
Exception backtrace:
0   RealmTest                           0x00000001043fc344 _ZN5realm4util6detail26ExceptionWithBacktraceBaseC2Ev + 48
1   RealmTest                           0x0000000104655888 _ZN5realm4util22ExceptionWithBacktraceISt13runtime_errorEC2IJRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEEEDpOT_ + 84
2   RealmTest                           0x0000000104655694 _ZN5realm4util4File11AccessErrorC2ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ + 64
3   RealmTest                           0x0000000104655634 _ZN5realm4util4File16PermissionDeniedC2ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ + 68
4   RealmTest                           0x000000010464a780 _ZN5realm4util4File16PermissionDeniedC1ERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEESB_ + 44
5   RealmTest                           0x000000010464a324 _Z26RLMRealmTranslateExceptionPU15__autoreleasingP7NSError + 1068
6   RealmTest                           0x000000010464ac48 +[RLMRealm realmWithConfiguration:queue:error:] + 888
7   RealmTest                           0x0000000104702934 $sSo8RLMRealmC13configuration5queueABSo0A13ConfigurationC_So012OS_dispatch_C0CSgtKcfCTO + 128
8   RealmTest                           0x00000001047bb598 $s10RealmSwift0A0V13configuration5queueA2C13ConfigurationV_So012OS_dispatch_D0CSgtKcfC + 188
9   RealmTest                           0x00000001047ed7a0 $s10RealmSwift15ObservedResultsV7Storage33_06F2B43D1E2DA64D3C5AC1DADA9F5BA7LLC11updateValueyyF + 352
10  RealmTest                           0x00000001047ea4b0 $s10RealmSwift24ObservableResultsStorage33_06F2B43D1E2DA64D3C5AC1DADA9F5BA7LLC10setupValueyyF + 132
11  RealmTest                           0x00000001047efc88 $s10RealmSwift15ObservedResultsV12wrappedValueAA0D0VyxGvg + 252
12  RealmTest                           0x00000001047f1964 $s10RealmSwift15ObservedResultsVyxGAA15BoundCollectionA2aEP12wrappedValue0H0QzvgTW + 20
13  RealmTest                           0x00000001047fad74 $s10RealmSwift15BoundCollectionPAASo0aB6ObjectC7ElementRczAA7ResultsVyAGG5ValueRtzrlE6appendyyAGF + 392
14  RealmTest                           0x00000001043c8030 $s9RealmTest21AddShoppingListScreenV4bodyQrvg7SwiftUI4ViewPAEE15navigationTitleyQrAE18LocalizedStringKeyVFQOyAE4FormVyAE05TupleJ0VyAE9TextFieldVyAE0R0VG_AsgEE11buttonStyleyQrqd__AE015PrimitiveButtonU0Rd__lFQOyAE0W0VyAgEE5frame8minWidth05idealZ003maxZ00Y6Height11idealHeight9maxHeight9alignmentQr12CoreGraphics7CGFloatVSg_A7_A7_A7_A7_A7_AE9AlignmentVtFQOyAR_Qo_G_AE08BorderedwU0VQo_tGG_Qo_yXEfU_A15_yXEfU_yycfU_ + 900
15  SwiftUI                             0x000000010cc0f2cc __swift_memcpy3_1 + 8096
16  SwiftUI                             0x000000010cc0fb54 __swift_memcpy3_1 + 10280
17  SwiftUI                             0x000000010cc0fac4 __swift_memcpy3_1 + 10136
18  SwiftUI                             0x000000010cfd01b0 OUTLINED_FUNCTION_30 + 4452
19  SwiftUI                             0x000000010cfd01cc OUTLINED_FUNCTION_30 + 4480
20  SwiftUI                             0x000000010cfd01b0 OUTLINED_FUNCTION_30 + 4452
21  SwiftUI                             0x000000010cd393c0 OUTLINED_FUNCTION_11 + 3028
22  SwiftUI                             0x000000010cd38e78 OUTLINED_FUNCTION_11 + 1676
23  SwiftUI                             0x000000010ce88a18 OUTLINED_FUNCTION_11 + 1224
24  SwiftUI                             0x000000010d58fdf4 OUTLINED_FUNCTION_2 + 9296
25  SwiftUI                             0x000000010d58e698 OUTLINED_FUNCTION_2 + 3316
26  SwiftUI                             0x000000010d58e770 OUTLINED_FUNCTION_2 + 3532
27  UIKitCore                           0x00000001090eb070 -[UIGestureRecognizer _componentsEnded:withEvent:] + 152
28  UIKitCore                           0x00000001095b7648 -[UITouchesEvent _sendEventToGestureRecognizer:] + 556
29  UIKitCore                           0x00000001090e0300 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 160
30  UIKitCore                           0x00000001090e00f0 -[UIGestureEnvironment _updateForEvent:window:] + 156
31  UIKitCore                           0x0000000109573f80 -[UIWindow sendEvent:] + 3168
32  UIKitCore                           0x0000000109552224 -[UIApplication sendEvent:] + 692
33  UIKitCore                           0x00000001095ceb10 __dispatchPreprocessedEventFromEventQueue + 6824
34  UIKitCore                           0x00000001095d0774 __processEventQueue + 5612
35  UIKitCore                           0x00000001095c9650 __eventFetcherSourceCallback + 220
36  CoreFoundation                      0x00000001803731dc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
37  CoreFoundation                      0x0000000180373124 __CFRunLoopDoSource0 + 172
38  CoreFoundation                      0x0000000180372894 __CFRunLoopDoSources0 + 232
39  CoreFoundation                      0x000000018036cf00 __CFRunLoopRun + 756
40  CoreFoundation                      0x000000018036c7f4 CFRunLoopRunSpecific + 584
41  GraphicsServices                    0x0000000188faec98 GSEventRunModal + 160
42  UIKitCore                           0x00000001095385d4 -[UIApplication _run] + 868
43  UIKitCore                           0x000000010953c5cc UIApplicationMain + 124
44  SwiftUI                             0x000000010d54ab18 OUTLINED_FUNCTION_51 + 496
45  SwiftUI                             0x000000010d54a9c0 OUTLINED_FUNCTION_51 + 152
46  SwiftUI                             0x000000010ccee36c OUTLINED_FUNCTION_10 + 88
47  RealmTest                           0x00000001043c5cfc $s9RealmTest0aB3AppV5$mainyyFZ + 40
48  RealmTest                           0x00000001043c5da4 main + 12
49  dyld                                0x00000001082fdfa0 start_sim + 20
50  ???                                 0x00000001083d1e50 0x0 + 4433190480
51  ???                                 0x4f2b800000000000 0x0 + 5704794090483220480, Error Code=8}

Can you reproduce the bug?

Yes, always

Reproduction Steps

Try to use Realm in iOS project in Simulator with Realm Studio open

Version

RealmDatabase 12.13.0 (updated in XCode)
Realm Studio 13.0.2 (updated)

What SDK flavour are you using?

Local Database only

Are you using encryption?

No, not using encryption

Platform OS and version(s)

macOS 13.0.1 on M1 Pro MBP; XCode 14.1

Build environment

Xcode version: ...
Dependency manager and version: ...

@josephmalam
Copy link
Author

Update: I downloaded Studio 12.0.0, and it all works as expected — I can keep Studio open and write to the db in iOS Simulator. The package is up-to-date in Xcode, so why should there be such an error?

@dianaafanador3
Copy link
Collaborator

Hi @josephmalam Let me understand the questions first. You were not able to modify the realm file while the simulator is open and now you can do it with the new Studio version?.
If that's the case, we probably had a lock over the realm file from Studio and that's why you were not able to access the database from the simulator, and probably this was fixed in Core 13.0.0, which includes changes to the lock-file.

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Dec 12, 2022
@josephmalam
Copy link
Author

Hi @dianaafanador3 , actually I was not able to do it with the latest Studio version. I downgraded to Studio version 12.0.0 and it works normally.

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Dec 12, 2022
@dianaafanador3
Copy link
Collaborator

HI I'm sorry (I was confused about Studio latest version).
So the issue may be that Studio uses the new file-lock system from Core in their newest version and this will work with our SDK when we make a release with Core version>= 13.0.0.
We are working on a release which will be available in the next few weeks.

@sync-by-unito sync-by-unito bot removed the Needs-Attention Reporter has responded. Review comment. label Dec 12, 2022
@Kernelzero
Copy link

I faced same issue.
down-graded to 12.0.0 then works fine.

@sync-by-unito
Copy link

sync-by-unito bot commented Jan 24, 2023

➤ bmunkholm commented:

This is awaiting a release with Core13.

@dianaafanador3
Copy link
Collaborator

There is a new version of Realm Swift that should work with Realm Studio 13.0.2

@robertmylne
Copy link

I am using the latest version of realm swift and realm studio on a new Mac and I have the exact same issue. Can’t open studio at same time as the simulator or it crashes.

Realm Studio: 13.0.2
Realm Swift: 10.38.0

@Jaycyn
Copy link

Jaycyn commented Apr 10, 2023

The original issue that was closed is still around: Issue duplicated

When running in the simulator and then opening a Realm file with Realm Studio, attempting to access that file (read or write) from the project crashes.

macOS 12.6.4
iOS Project built for 16.2
XCode 14.2
Realm Studio 13.0.2
RealmSwift: 10.38.0

Button in UI that writes a Todo Realm Object. Once that's done, open the Realm file with Realm Studio and then try to write another ToDo Object from the XCode project

let realm = try! Realm()
let todo = Todo(name: "Do laundry", ownerId: "owner 0")
try! realm.write {
realm.add(todo)
}
with the file open with RealmStudio, it crashes

Thread 1: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=io.realm Code=8 "Realm file '/Users/jay/Library/Developer/CoreSimulator/Devices/5CB2D090-0541-4D90-A008-5078461A96B5/data/Containers/Data/Application/1BCED675-BA3C-4F45-9309-8FD2671FB196/Documents/default.realm' is currently open in another process which cannot share access with this process. This could either be due to the existing process being a different architecture or due to the existing process using an incompatible vers

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants