vlang / ui

A cross-platform UI library written in V
MIT License
2.33k stars 153 forks source link

examples/group.v segfaults #378

Open xandro0777 opened 3 years ago

xandro0777 commented 3 years ago

Debian Bullseye 32 bit:


(gdb) run
Starting program: /home/rz/.vmodules/ui/examples/group 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Detaching after vfork from child process 5044]
Using font /usr/share/fonts/truetype/freefont/FreeSans.ttf
[New Thread 0xf7846b40 (LWP 5046)]
[New Thread 0xf7045b40 (LWP 5047)]
[New Thread 0xf553cb40 (LWP 5048)]
[New Thread 0xf4d3bb40 (LWP 5049)]
[New Thread 0xf41ffb40 (LWP 5050)]
[New Thread 0xf39feb40 (LWP 5051)]
g size: (0, 0) (300, 300) 

Thread 1 "group" received signal SIGSEGV, Segmentation fault.
ui__Stack_update_layout (s=0x56682670) at /home/rz/.vmodules/ui/stack.v:247
247                     window := s.ui.window
(gdb) print s.ui 
$3 = (ui__UI *) 0x0
(gdb) bt
#0  ui__Stack_update_layout (s=0x56682670) at /home/rz/.vmodules/ui/stack.v:247
#1  0x56634fe4 in ui__Window_update_layout (w=0x56683770)
    at /home/rz/.vmodules/ui/window.v:1418
#2  0x5662c590 in ui__gg_init (window=0x56683770)
    at /home/rz/.vmodules/ui/window.v:311
#3  0x565f48e9 in gg__gg_init_sokol_window (user_data=0x5673f030)
    at /home/rz/prog/v/vlib/gg/gg.c.v:156
#4  0x5659bdbd in _sapp_call_init ()
    at /home/rz/prog/v/thirdparty/sokol/sokol_app.h:2128
#5  0x5659c642 in _sapp_frame ()
    at /home/rz/prog/v/thirdparty/sokol/sokol_app.h:2329
#6  0x5659fb17 in _sapp_linux_run (desc=0x5673f0c8)
    at /home/rz/prog/v/thirdparty/sokol/sokol_app.h:9962
#7  0x5659fbe7 in sapp_run (desc=0x5673f0c8)
    at /home/rz/prog/v/thirdparty/sokol/sokol_app.h:10006
#8  0x565f3281 in sokol__sapp__run (desc=0x5673f0c8)
    at /home/rz/prog/v/vlib/sokol/sapp/sapp.c.v:156
#9  0x565f56bb in gg__Context_run (gg=0x5673f030)
    at /home/rz/prog/v/vlib/gg/gg.v:248
#10 0x56619230 in ui__run (window=0x56683770) at /home/rz/.vmodules/ui/ui.v:182
#11 0x56635847 in main__main () at /home/rz/.vmodules/ui/examples/group.v:48
#12 0x5663f394 in main (___argc=1, ___argv=0xffffd244)
    at /tmp/v/group.6374190473663304653.tmp.c:1000530