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

EXC_BAD_ACCESS on IOS with codepush restart #644

Closed
Sangkwun opened this issue Mar 9, 2024 · 0 comments
Closed

EXC_BAD_ACCESS on IOS with codepush restart #644

Sangkwun opened this issue Mar 9, 2024 · 0 comments

Comments

@Sangkwun
Copy link

Sangkwun commented Mar 9, 2024

dependencies:

  • "react-native-mmkv": "^2.12.1"
  • "react-native-code-push": "8.1.0"
  • "react-native-quick-crypto": "^0.6.1"

OS: iOS only

Generally, using MMKV and CodePush together does not cause issues. However, it seems that after performing encryption/decryption using react-native-quick-crypto, problems arise during the CodePush update process due to the PropNameIDCache::invalidate step in MMKV.

I encountered an error while using the react-native-mmkv library during the CodePush update process. The error message I received is as follows

Incident Identifier: B1E4E27E-79D3-4DA4-9EBF-7BA5C1EE4B79
Hardware Model:      iPhone15,4
Process:             OverWallet [89710]
Path:                /private/var/containers/Bundle/Application/44F696DC-4554-45C8-9052-0D52B8B3ECAA/OverWallet.app/OverWallet
Identifier:          com.superblock.overmobile
Version:             2.0 (265)
AppStoreTools:       15E204
AppVariant:          1:iPhone15,4:17
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.superblock.overmobile [4350]

Date/Time:           2024-03-09 23:35:05.6566 +0900
Launch Time:         2024-03-09 23:34:22.6469 +0900
OS Version:          iPhone OS 17.3.1 (21D61)
Release Type:        User
Baseband Version:    1.40.01
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: KERN_PROTECTION_FAILURE at 0x00000002815db120
Exception Codes: 0x0000000000000002, 0x00000002815db120
VM Region Info: 0x2815db120 is in 0x280000000-0x2a0000000;  bytes after start: 22917408  bytes before end: 513953503
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      unused __TEXT            27c970000-27c974000 [   16K] r--/r-- SM=COW  ...ed lib __TEXT
      GAP OF 0x368c000 BYTES
--->  MALLOC_NANO              280000000-2a0000000 [512.0M] rw-/rwx SM=PRV  
      GAP OF 0xd20000000 BYTES
      commpage (reserved)      fc0000000-fffffc000 [  1.0G] ---/--- SM=NUL  ...(unallocated)
Termination Reason: SIGNAL 10 Bus error: 10
Terminating Process: exc handler [89710]

Triggered by Thread:  5
... 
Thread 5 name:
Thread 5 Crashed:
0   ???                           	0x00000002815db120 0x0 + 10760335648
1   OverWallet                    	0x0000000104dd8b08 std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID> >::reset[abi:v160006](facebook::jsi::PropNameID*) + 20 (unique_ptr.h:297)
2   OverWallet                    	0x0000000104dd8b08 std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID> >::~unique_ptr[abi:v160006]() + 20 (unique_ptr.h:263)
3   OverWallet                    	0x0000000104dd8b08 std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID> >::~unique_ptr[abi:v160006]() + 20 (unique_ptr.h:263)
4   OverWallet                    	0x0000000104dd8b08 std::__1::pair<Prop const, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID> > >::~pair() + 20 (pair.h:63)
5   OverWallet                    	0x0000000104dd8b08 std::__1::pair<Prop const, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID> > >::~pair() + 20 (pair.h:63)
6   OverWallet                    	0x0000000104dd8b08 void std::__1::allocator_traits<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::P... + 20 (allocator_traits.h:325)
7   OverWallet                    	0x0000000104dd8b08 std::__1::__hash_node_destructor<std::__1::allocator<std::__1::__hash_node<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::... + 44 (__hash_table:821)
8   OverWallet                    	0x0000000104df9400 std::__1::unique_ptr<std::__1::__hash_node<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID> > >, void*>, std::__... + 20 (unique_ptr.h:297)
9   OverWallet                    	0x0000000104df9400 std::__1::unique_ptr<std::__1::__hash_node<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID> > >, void*>, std::__... + 20 (unique_ptr.h:263)
10  OverWallet                    	0x0000000104df9400 std::__1::unique_ptr<std::__1::__hash_node<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID> > >, void*>, std::__... + 20 (unique_ptr.h:263)
11  OverWallet                    	0x0000000104df9400 std::__1::__hash_table<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID> > >, std::__1::__unordered_map_hasher<Pr... + 52 (__hash_table:2408)
12  OverWallet                    	0x0000000104df8c2c std::__1::__hash_table<std::__1::__hash_value_type<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID> > >, std::__1::__unordered_map_hasher<Pr... + 24 (__hash_table:2426)
13  OverWallet                    	0x0000000104df8c2c std::__1::unordered_map<Prop, std::__1::unique_ptr<facebook::jsi::PropNameID, std::__1::default_delete<facebook::jsi::PropNameID> >, std::__1::hash<Prop>, std::__1::equal_to<Prop>, std::__1::alloca... + 24 (unordered_map:1363)
14  OverWallet                    	0x0000000104df8c2c PropNameIDCache::invalidate() + 32 (MGLTypedArray.cpp:53)
15  OverWallet                    	0x0000000104df8c2c invalidateJsiPropNameIDCache() + 44 (MGLTypedArray.cpp:63)

An easier approach would be to not use react-native-quick-crypto, but it seems like modifying MMKV could also be a good solution.

Related issues

@Sangkwun Sangkwun changed the title EXC_BAD_ACCESS on PropNameIDCache::invalidate EXC_BAD_ACCESS PropNameIDCache::invalidate on IOS Mar 9, 2024
@Sangkwun Sangkwun changed the title EXC_BAD_ACCESS PropNameIDCache::invalidate on IOS EXC_BAD_ACCESS on IOS with codepush restart Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant