the error isn't always the same, but it's always o...
# coroutines
b
the error isn't always the same, but it's always on the same call to
actor
e
Any clue under what conditions it reproduces?
b
not really, it's always the same place,
onCreateView
in a
Fragment
calls this extension:
Copy code
inline fun <T : View> T.onClick(disableDuring: Boolean = false, noinline action: suspend T.() -> Unit) {
    val actor = actor<Unit>(UI) {
        for (event in channel) {
            try {
                if (disableDuring) isEnabled = false
                action()
            } finally {
                if (disableDuring) isEnabled = true
            }
        }
    }

    setOnClickListener { actor.offer(Unit) }
}
the call to
actor
throws, and sometimes it's the arity error, sometimes it's a 'calling method on null object' error. I had copied several of them but deleted them. Whenever it happens I just gradle clean and rebuild (sometimes have to do it twice) and it works again
e
It is definitely a bug in incremental compilation somewhere. It would be extremely helpful if you find what changes reproduce it.
b
not sure how to tell, the project is pretty big and it seemed to happen everytime I recompiled yesturday