f111fei / react-native-unity-view

Show an unity view in react native
MIT License
401 stars 102 forks source link

Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) #84

Closed omer-halici closed 5 years ago

omer-halici commented 5 years ago

Hi,

I am getting: "Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)" error when I build from XCode on real device(iPhone 6s Plus).

Also I'm not sure if thats relevant but I also get following error on xcode console: "2019-01-15 17:50:11.646908+0300 MyAppName[3979:1856266] [] nw_connection_get_connected_socket 152 Connection has no connected handler 2019-01-15 17:50:11.647018+0300 MyAppName[3979:1856266] TCP Conn 0x1c416edc0 Failed : error 0:61 [61]"

My unity version: 2018.2.20f1 and RN version: 0.57.5

Any help is appreciated!

alisherakb commented 5 years ago

@omer-halici Hi Omer, check whether you have this property in Info.plist. If you don't have, you can generate it in Unity, copypaste and create a key with string in Info.plist.

screenshot 2019-01-16 at 10 20 26

How to get UnityAppCloudID in Unity3d?

omer-halici commented 5 years ago

@alisherakb I can build and run without any problem if I use the same unity project from react-native-unity-demo. However when I create new unity project and set build settings as it is said in ReadMe, it gives the error above. Hence, I don't think problem is with cloudProjectId. Btw this problem is about null reference as far as I read. I will update here if I find difference between new project and react-native-unity-demo's project.

alisherakb commented 5 years ago

@omer-halici Got it. Have you granted access for NSCameraUsageDescription in your project?

omer-halici commented 5 years ago

@alisherakb I don't have that key-value pair in my info.plist so no i guess

alisherakb commented 5 years ago

@omer-halici Try to add that <key>NSCameraUsageDescription</key>. That might be a potential solution.

omer-halici commented 5 years ago

Forgive me I'm wrong but I'm not using camera in my app why is it required and also It also works without that key when I use react-native-unity-demo's project. Isn't this problem related with unity's configuration?

edit: In android it works perfectly

omer-halici commented 5 years ago

@omer-halici Hi Omer, check whether you have this property in Info.plist. If you don't have, you can generate it in Unity, copypaste and create a key with string in Info.plist.

screenshot 2019-01-16 at 10 20 26

How to get UnityAppCloudID in Unity3d?

  • Click Cloud icon on the top right corner and generate new cloud token. Click "Go to Dashboard" and copy "UPID" to dashboard (needed in info.plist).

@alisherakb You were right Ali. I guess original project didn't use unity analytics hence it doesn't require UnityCloudProjectID. When I create new project with analytics disable it works as expected. Thank you

OgieBen commented 5 years ago

@alisherakb I get this error "Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)" by UnityInitRuntime(g_argc, g_argv); inside UnityUtils.mm

Unity v2018.3.13f1, react-native-unity-view: v1.3.3 xcode 10

Any help would be appreciated

alisherakb commented 4 years ago

@OgieBen Is the issue still relevant? I can assist you.