I am also encountering a lot of various crashes in...
# kotlin-native
r
I am also encountering a lot of various crashes in
Memory.cpp
. Looks like every time I relaunch my app it ends up crashing in a different place after a few seconds. It’s a big app, no way I can make a reproducer for these errors.
a
Are we talking about 1.4(.10) here?
r
Yes. I tried 1.4.20-M1 and had the same behavior of various crashes, not sure if they are the same ones. Do you prefer if I iterate in 1.4.20-M1?
a
On a first sight, this issue seems to be related(https://youtrack.jetbrains.com/issue/KT-41811), but it also has no direct answers. Can’t say anything about 1.4.20 milestone, just wanted to make sure problem was introduced recently.
r
It wasn’t happening in 1.3.61, but my codebase changed a lot due to the changes in Kotlin & libs between 1.3.61 and 1.4.10, so it may not be just that
Looks like it’s the same kind of issue at least. So we can’t make reproducers for that (because it crashes randomly in seemingly unrelated code) and it can’t be debugged without reproducers. So what? That’s it? We just drop the idea of upgrading to 1.4 and stop using Kotlin/Native for future apps?
s
The entire project is a reproducer too. It should be enough to debug the problem. Could you share it with us?
r
I don’t think that’s possible, even if I was allowed to by my company (which I’m not, but I could ask). Private project using private libraries relying on private apis available only via internal VPN…
Maybe I’ll try to make a small project and try to copy some of the weirder stuff I have. I’ve got a bunch of
memScope { }
,
autoreleasepool
, probably one or two
StableRef
somewhere, tons of coroutines and serialization…
👍 1
s
r
I’m no longer working on updating to Kotlin 1.4 right now, so I can’t test it. Hopefully it works. It’s far from being the only issue anyway
Hey, I just tried your fix and can also confirm that it fixed this issue for me. Thanks!
👍 1