Hi...i'm back with another problem...
the problem apears when i use DBX to check memory access while freeing a
form :
I get this message :
Write to unallocated (wua):
Attempting to write 4 bytes at address 0x2ba7c
which is 36 bytes past end of heap block of size 264
bytes at 0x2b950
This block was allocated from:
calloc<-fl_make_object<-fl_create_input<-fl_add_input<-
create_form_listeForm<-main<-_start
I reproduced this error message with the simplified source code below...
thanks for any help...
(still sorry for my bad English...)
YG
/*****************************************************************/
#include "forms.h"
typedef struct {
FL_FORM *fl_form;
FL_OBJECT *fl_directory;
FL_OBJECT *fl_browser;
FL_OBJECT *fl_close;
FL_OBJECT *fl_fileSelector;
void *vdata;
char *cdata;
long ldata;
} FD_listeForm;
FD_listeForm *create_form_listeForm(void)
{
FL_OBJECT *obj;
FD_listeForm *fdui = (FD_listeForm *) fl_calloc(1, sizeof(*fdui));
fdui->fl_form = fl_bgn_form(FL_NO_BOX, 250, 270);
fdui->fl_directory = obj =
fl_add_input(FL_NORMAL_INPUT,20,30,170,20,"Directory");
fl_set_input_return(obj,FL_RETURN_CHANGED);
fl_set_object_lalign(obj,FL_ALIGN_TOP);
fdui->fl_browser=obj =
fl_add_browser(FL_MULTI_BROWSER,20,60,210,170,"");
fl_set_object_color(obj,FL_COL1,FL_MCOL);
fl_set_browser_fontsize(obj,12);
fl_set_browser_fontstyle(obj,FL_TIMESBOLD_STYLE);
fdui->fl_fileSelector = obj =
fl_add_button(FL_NORMAL_BUTTON,200,30,30,20,"...");
fl_set_object_lalign(obj,FL_ALIGN_CENTER);
fdui->fl_close = obj =
fl_add_button(FL_NORMAL_BUTTON,85,245,80,20,"Close");
fl_add_box(FL_UP_BOX,0,0,250,270,"");
fl_add_frame(FL_ENGRAVED_FRAME,10,10,230,230,"");
fl_end_form();
fdui->fl_form->fdui = fdui;
fl_set_form_position(fdui->fl_form,195,600);
return fdui;
}
/*---------------------------------------*/
int main(int argc, char *argv[])
{
Display *dpy;
FD_listeForm *liste;
dpy=fl_initialize(&argc, argv, "first", 0,0);
liste=create_form_listeForm();
fl_free_form(liste->fl_form); /*** memory error ***/
}
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/