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

Thread 1: EXC_BAD_ACCESS (code=1, address=0x88) #98

Closed
alisherakb opened this issue Mar 15, 2019 · 6 comments
Closed

Thread 1: EXC_BAD_ACCESS (code=1, address=0x88) #98

alisherakb opened this issue Mar 15, 2019 · 6 comments

Comments

@alisherakb
Copy link

alisherakb commented Mar 15, 2019

App is crashing after on launching
Screenshot 2019-03-15 at 11 40 33 AM

What can cause the issue?

Unity: 2018.2.17
"react-native": 0.58.6

@alisherakb
Copy link
Author

@JanOwiesniak Have you ever experienced that behavior?

@JanOwiesniak
Copy link

Yes i ran into this issue several times.

It can be caused by a lot of stuff, sadly there is no general solution to this issue.

In summary, when you run into EXC_BAD_ACCESS, it means that you try to send a message to a block of memory that can't execute that message.

In some cases, however, EXC_BAD_ACCESS is caused by a corrupt pointer. Whenever your application attempts to dereference a corrupt pointer, an exception is thrown by the kernel.

In my particular case (i think) i lost a pointer to a 3rd party library (Vuforia) which resulted in this crash:

Vuforia::init()
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000992616966020

This workflow helped me fix this issue.
I think step 8. (keeping a reference to the unity module was the game changer)


Another time i had issues with combination of react-navigation and UnityModule.createUnity.
You can read more here.

@alisherakb
Copy link
Author

Yes i ran into this issue several times.

It can be caused by a lot of stuff, sadly there is no general solution to this issue.

In summary, when you run into EXC_BAD_ACCESS, it means that you try to send a message to a block of memory that can't execute that message.
In some cases, however, EXC_BAD_ACCESS is caused by a corrupt pointer. Whenever your application attempts to dereference a corrupt pointer, an exception is thrown by the kernel.

In my particular case (i think) i lost a pointer to a 3rd party library (Vuforia) which resulted in this crash:

Vuforia::init()
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000992616966020

This workflow helped me fix this issue.
I think step 8. (keeping a reference to the unity module was the game changer)

Another time i had issues with combination of react-navigation and UnityModule.createUnity.
You can read more here.

In my case it's related somehow with "validateTextureDimensions, line 1074: error 'MTLTextureDescriptor has width of zero.'
validateTextureDimensions:1074: failed assertion `MTLTextureDescriptor has width of zero.'
(lldb) " in UnityExport/Classes/Unity/MetalHelper.mm

Something related with resolution of a scene I think..

@JanOwiesniak
Copy link

Honestly i have no idea. Just because i'm reading UnityExport/Classes/Unity/MetalHelper.mm, have you tried to remove metal from the Graphics API?

IOS Platform:

Other Settings find the Rendering part, uncheck the Auto Graphics API and select only OpenGLES2.

https://github.com/f111fei/react-native-unity-view#configure-player-settings

@alisherakb
Copy link
Author

Honestly i have no idea. Just because i'm reading UnityExport/Classes/Unity/MetalHelper.mm, have you tried to remove metal from the Graphics API?

IOS Platform:
Other Settings find the Rendering part, uncheck the Auto Graphics API and select only OpenGLES2.

https://github.com/f111fei/react-native-unity-view#configure-player-settings

Downgrading react-native-unity-view to 1.2.1 fixed the issue.
The newer versions create UnityNativeModule.h which causes somehow an error with our stack (Unity3d/ARFoundation + RN).

@mistakelly
Copy link

educative discussion, it did helped out.

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

3 participants