Trying to use the menu side of ncurses and have ru...
# kotlin-native
n
Trying to use the menu side of ncurses and have run into a seg fault issue that occurs when calling the post_menu function (shows the menu), which expects a menu (type - CPointer<MENU>?) to be passed as a parameter. Had a menu created (via the new_menu function) that was populated from an array of items (type - Array<CPointer<ITEM>?>), which had to be converted via the toCValues function (returns this type - CValuesRef<CPointerVar<ITEM>>?). Are there any CLI tools that can be used for debugging a Kotlin Native program?
o
Sure, lldb works fine, gdb shall somewhat work
n
Are there some quirks when using GDB with Kotlin Native?
There was a old issue with the Debian version of ncurses (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=33116) where one developer thought the new_item function wasn't initialising a new ITEM (a struct) properly. Seems there are differences in behaviour with the function (in terms of whether the function argument is a pointer or value, could get a bit confusing) depending on which platform is used. Could affect how the memory is managed and might explain why the seg fault is occurring.