Search Issue Tracker

Fixed in Unity 2018.2

Votes

29

Found in

2018.2.0f2

Issue ID

1062852

Regression

Yes

Android application crashes when native function returns null

Mobile

-

-

Priority: 2Necessary for shipping a final release

-

Severity: 1Crash or major loss of functionality

Calling Android native function that returns null through AndroidJavaObject.CallStatic<object> method crashes application
Steps to reproduce:
1. Open attached project "RefExp2"
2. Build and run on Android
-Inspect logcat for crash logs (Application screen will also turn black)

Reproduced with: 2018.2.0a1, 2018.2.1f1, 2018.3.0a7
Didn't reproduce with: 2017.3.2f1, 2017.4.9f1, 2018.1.8f1
Regressed in: 2018.2.0a1

Devices under test:
VLNQA00031, Lge Nexus 5 (Nexus 5), 6.0.1, CPU: Snapdragon 800 MSM8974, GPU: Adreno (TM) 330
VLNQA00002, Samsung Galaxy S5 Neo (SM-G903F), 6.0.1, CPU: Exynos 7 Octa 7580, GPU: Mali-T720
VLNQA00025, Xiaomi Mi 5s (MI 5s), 6.0.1, CPU: Snapdragon 820 MSM8996, GPU: Adreno (TM) 530
Google Emulator (Android SDK built for x86), 8.0.0, GPU: Android Emulator OpenGL ES Translator (AMD Radeon (TM) R7 360 Series)

Comments (5)

  1. 4595c4b3a318edf9d9d331caa6f03e55?d=mm

    jschieck

    Aug 18, 2018 22:36

    Still seen in 2018.2.3f1 with Get<string>

  2. 688ff282579b0f342885184f2b464761?d=mm

    registervisualstudio

    Aug 15, 2018 17:24

    Please fix soon. Thanks in advance!

  3. 2fe7bc4395af07da164ec4ed120a8909?d=mm

    dongyiqi

    Aug 14, 2018 09:57

    mapObj.Call<string>("put", "publicKey", "keyabc"); also crashed
    https://forum.unity.com/threads/unity2018-2-3-call-java-method-crash.545029/#post-3596465

  4. 0dba04b5f2f7ea65ab40c52e8f344458?d=mm

    unity_ReK9RbvLXAmYMw

    Aug 08, 2018 03:56

    i understand this has nothing to do with this issue but theirs no other issue about this, i cant find the right mono develop download website so if anyone can post a link to a website for that that would be great. thanks.

  5. D56844e335022c720eeaf1adc248798a?d=mm

    aianovskyi

    Aug 06, 2018 06:58

    Also reproducible in Call<T> and GetField<T>

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.