Giter Club home page Giter Club logo

Comments (10)

ligi avatar ligi commented on May 30, 2024 1

Thanks for looking into this! Love this library!!

from kotpref.

chibatching avatar chibatching commented on May 30, 2024

Is this happen on only UI tests? Is your UI tests espresso?

from kotpref.

ligi avatar ligi commented on May 30, 2024

from kotpref.

chibatching avatar chibatching commented on May 30, 2024

I tried UI test of your project, and failed test with another error below.

E/AndroidRuntime: FATAL EXCEPTION: main
        Process: org.ligi.gobandroid_hd, PID: 4958
        java.lang.RuntimeException: Unable to create application org.ligi.gobandroid_hd.TestApp: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4710)
            at android.app.ActivityThread.-wrap1(ActivityThread.java)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:148)
            at android.app.ActivityThread.main(ActivityThread.java:5417)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
        Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference
            at org.ligi.gobandroid_hd.ui.GoPrefs.getThemeInt(GoPrefs.kt:73)
            at org.ligi.gobandroid_hd.App.onCreate(App.java:41)
            at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
            at android.support.test.runner.MonitoringInstrumentation.callApplicationOnCreate(MonitoringInstrumentation.java:323)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
            at android.app.ActivityThread.-wrap1(ActivityThread.java) 
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405) 
            at android.os.Handler.dispatchMessage(Handler.java:102) 
            at android.os.Looper.loop(Looper.java:148) 
            at android.app.ActivityThread.main(ActivityThread.java:5417) 
            at java.lang.reflect.Method.invoke(Native Method) 
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

I don't know it is the issue of kotpref, but Kotlin 1.1.1 seems having some bugs of androidTest.

So, I will investigate it continuously and watch kotlin issues.

Thanks

from kotpref.

ligi avatar ligi commented on May 30, 2024

Reading the diff - this might be a fix for the problem : JetBrains/kotlin@132393c

so it might have been this kotlin problem and just surfaced at kotpref for me - so waiting for 1.1.2 - feel free to close.

from kotpref.

chibatching avatar chibatching commented on May 30, 2024

I found the cause of this problem. I call java 8 function Map#forEach at KotprefPreference
I'll fix it as soon as possible. Sorry.

from kotpref.

chibatching avatar chibatching commented on May 30, 2024

Fixed this issue in latest version 2.1.1!
Thanks! :)

from kotpref.

ligi avatar ligi commented on May 30, 2024

I can confirm that the ClassDefNotFound is fixed in 2.1.1 - thanks! - unfortunately now on another emulator (differend SDK-level) I a similar NullPointer you mentioned:

appCrashed: org.ligi.gobandroid_hd:10429 java.lang.NullPointerException java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference java.lang.RuntimeException: Unable to create application org.ligi.gobandroid_hd.TestApp: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4710)
	at android.app.ActivityThread.-wrap1(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:148)
	at android.app.ActivityThread.main(ActivityThread.java:5417)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference
	at org.ligi.gobandroid_hd.ui.GoPrefs.isTransitionDone(GoPrefs.kt)
	at org.ligi.gobandroid_hd.ui.application.GobandroidSettingsTransition.transition(GobandroidSettingsTransition.java:25)
	at org.ligi.gobandroid_hd.App.onCreate(App.java:30)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
	at android.support.test.runner.MonitoringInstrumentation.callApplicationOnCreate(MonitoringInstrumentation.java:323)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
	... 8 more

isTransition looks like this:

var isTransitionDone: Boolean by booleanPref(default = false)

not yet sure how this can be null yet

from kotpref.

chibatching avatar chibatching commented on May 30, 2024

Oh... I'll investigate it :(

from kotpref.

Tunous avatar Tunous commented on May 30, 2024

@chibatching
I'm experiencing NoClassDefFoundError when using blockingBulk on Android 6.0 or lower. I think that similar change to this one in #44 should be also done for commit function in the same file.

Edit: Submitted a pull request at #53

from kotpref.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.