https://kotlinlang.org logo
#kotlin-native
Title
# kotlin-native
n

napperley

01/25/2023, 4:16 AM
Some memory management problems have been encountered while running a Kotlin Native program ( https://gitlab.com/embed-soft/lvgl-kt/samples/widget-showcase-sample ) targeting linuxArm32Hfp. All problems are connected with the use of LVGL's Roller widget ( https://docs.lvgl.io/8.3/widgets/core/roller.html ). When selecting an item repeatedly, and very quickly in the Roller for an extended period of time the program eventually crashes with the following message:
Copy code
malloc(): memory corruption (fast)
In other cases when selecting an item repeatedly, at a very slow rate in the Roller, and tapping on the Back button afterwords the program crashes with the following message:
Copy code
free(): invalid pointer
In many cases this problem occurs, but not always. None of the memory management problems occur with the linuxX64 version of the Kotlin Native program, even though it uses the same view that contains the Roller widget as the linuxArm32Hfp version of the program.