What is the difference between the macOS `release`...
# kotlin-native
s
What is the difference between the macOS
release
and
debug
version? Cause my release version crashes directly but my debug version works. I don’t have add any special “cases” like “on
release
do this and
debug
do this”… so there should be a difference out of the box, right?
e
release
version (
-opt
compiler flag) includes some optimizations that
debug
doesn't.
debug
includes debug info, What crash do you have and what version do you use?
s
I use 1.3.61 as Multiplatform Plugin and 1.3.60 for Kotlinx Serilization. I build the binaries with the
linkMacosX64
task. This build two binaries.
release
and
debug
. Running the
release
version leads to:
zsh: segmentation fault  ./build/bin/macosX64/releaseExecutable/Komitter.kexe
. Not sure how this helps or how I can get a better stacktrace?!
I use heavily Ktor.. Maybe this is related.. 🤷
e
Could you share code for reproducing?
You can also try to add
binaries.getExecutable("DEBUG").optimized = true
to add
-opt
to debug build and try to run debug executable, it should crash as release build, but some runtime checks should be on, so may be it becomes more understandable where problem is.
👍 1
s
I haven’t found the crash. For some reasons I don’t get a good stacktrace… But I updated Kotlinx serilization to 1.3.61 and ktor to 1.3.0-rc2 (from 1.2.6) and now eveything works as expected 👍 Seems the versions should be aligned…
s
It might still be useful to file a bug report