vlang / ui

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

Invalid memory access when adding child to stack #562

Open xigoi opened 7 months ago

xigoi commented 7 months ago

V version: 0.4.3 dbdd96f UI version: 459eb3b OS: Debian GNU/Linux

What did you do?

Minimal example:

import ui

fn main() {
    mut row := ui.row()
    row.add(child: ui.label())
}

What did you expect to see? Nothing

What did you see instead?

/tmp/v_1000/foo.14760059955841381417.tmp.c:58784: at ui__Label_load_style: RUNTIME ERROR: invalid memory access
/tmp/v_1000/foo.14760059955841381417.tmp.c:52872: by ui__Label_init                                       
/tmp/v_1000/foo.14760059955841381417.tmp.c:58256: by ui__Stack_add                                        
/tmp/v_1000/foo.14760059955841381417.tmp.c:444: by main__main                                             
/tmp/v_1000/foo.14760059955841381417.tmp.c:1046: by main