Closed kemalatli closed 5 years ago
If you updated your project to 1.3 properly, there shouldn't be such error.
Does restarting your IDE and making clean build
resolves the issue?
I have updated the project without any issues. I tried clean/build and invalidating caches. I'm using Room for offline persistence and I found that this exception occurs only if I try to assign values to integer properties of an entity defined in Java. I changed my Room entitiy definitions to Kotlin data classes and exception was gone. Still I wonder if this is a bug, after all this might happen again when someone assigns some integer value to a Java object in a suspending block.
I can't reproduce your problem. Could you please create a self-contained project which reproduces the issue?
@kemalatli Does this happen with java's int
or java.lang.Integer
? Is your project multi-modules? Any other detail?
I think problem is our system language. I have the same problem and both @kemalatli and I are Turkish. And in Turkish language "i" character's uppercase version is "İ", not "I" as it is in English. Expected method name boxInt but it's actual value is boxİnt so it must be a locale problem. I am not facing this issue in my company's computer which English is set as system language.
@LouisCAD it happens with java.lang.Integer
and I think @ErelOzcakirlar might have a point regarding system language settings. Still it is not obvious for me how it is related to the issue. I will check and let you know.
I've encountered this issue as well. As @ErelOzcakirlar mentioned that the problem is our system language, which is Turkish. After I changed system language TR to EN, the issue was solved.
Why is this issue closed? Apparently there is a problem with Turkish language. Problem is probably about pc's language in which kotlin code is compiled. Same project compiled with an english windows works fine but it gives this crash when compiled with a turkish windows.
I does not look like the issue in kotlinx.coroutines library. It looks like an issue in some of the toolchains that are used to build the project. Can you provide a small reproducer example that would show this project on Turkish locale?
I upgraded my project from experimental coroutines to stable 1.0.1 version. I configured my project with Kotlin 1.3 and with related plugins. I have two computers one of which is a Mac and the other one is a Windows machine. Strangely, I have no issues with my Windows machine. But I produce the following exception with my Macbook. I'm not sure if it is a bug.
FATAL EXCEPTION: DefaultDispatcher-worker-3 Process: me.app.android.dev, PID: 6612 java.lang.NoSuchMethodError: No static method boxİnt(I)Ljava/lang/Integer; in class Lkotlin/coroutines/jvm/internal/Boxing; or its super classes (declaration of 'kotlin.coroutines.jvm.internal.Boxing' appears in /data/app/me.app.android.dev-2/base.apk:classes4.dex) at me.app.android.persistence.datasource.CategoryDataSource$listenToCategories$1.invokeSuspend(CategoryDataSource.kt:27) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32) at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:236) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)
Exception points to below snippet: