-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Hey friends π,
I recently enabled this library in a project. Everything seemingly went through until I enabled Hermes engine. The app crashes immediately after launching with error:
error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x0).
The process has been returned to the state before expression evaluation.
I found out that the issue happens in either of these methods BN_bn2lebinpad, BN_bn2binpad:
react-native-bignumber/cpp/MGBigNumberHostObject.cpp
Lines 138 to 145 in 56873d9
| if (le) | |
| { | |
| BN_bn2lebinpad(thiz->bign, ab.data(runtime), len); | |
| } | |
| else | |
| { | |
| BN_bn2binpad(thiz->bign, ab.data(runtime), len); | |
| } |
What I tried so far:
- I commented out
toArrayLike(insidecommonjs/BigNumber.js) below here but weirdly the issue is still there. I wasn't able to find any toArrayLike invocations anywhere else
react-native-bignumber/src/BigNumber.ts
Lines 247 to 252 in 56873d9
| native.toArrayLike.call( | |
| this.internalBigNum, | |
| res.buffer, | |
| endian === 'le', | |
| len || -1 | |
| ); |
- If I wrap
if(ab.data(runtime) != NULL)the issue goes away but application doesn't behave correctly.
I would appreciate any suggestions.
Thanks!
JuanRdBO
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
