Hello!
If I create editbox after form, it
works inproperly and app crashes.
In this case it impossible to fill entire line. Only about 3/5 and
after pressing button programm crashes.
This is part of the output:
*** Error in `./dialogbasedapp': free(): invalid next size (fast): 0x0000000001c74c00 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x70bfb)[0x7f12f0599bfb]
/lib/x86_64-linux-gnu/libc.so.6(+0x76fc6)[0x7f12f059ffc6]
/lib/x86_64-linux-gnu/libc.so.6(+0x7780e)[0x7f12f05a080e]
./dialogbasedapp[0x40876f]
./dialogbasedapp[0x40321a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f12f05492e1]
./dialogbasedapp[0x4038da]
Code:
DIALOG_FORMITEM dlg_items_ip[1];
dlg_items_ip[0].name = (char *)"Server:";
dlg_items_ip[0].type = 0;//0 - text, 1- password
dlg_items_ip[0].text = server_ip;
//dlg_items[1].help = "";
dlg_items_ip[0].help_free = true;
dlg_items_ip[0].name_x = 1;
dlg_items_ip[0].name_y = 1;
dlg_items_ip[0].name_len = 20;
dlg_items_ip[0].name_free = 0;
dlg_items_ip[0].text_flen = 30;
dlg_items_ip[0].text_free = false;
dlg_items_ip[0].text_ilen = 0;
dlg_items_ip[0].text_len = 40;
dlg_items_ip[0].text_x = 10;
dlg_items_ip[0].text_y = 1;
int r;
//dialog_state.all_windows->normal->_begx = 440;
status = dlg_form("Sign in",help,12,60,0,1,dlg_items_ip,&r);
/*.........................*/
int rows;
char **list;
list = (char **) malloc(2+1);
(list)[0] = dlg_strclone("");
(list)[1] = 0;
status = dlg_editbox("Write a post", &list, &rows, 20,30);
OS:
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"