I've recently installed the sparc solaris 0.89 version on our systems and
came across a problem with choice objects demonstrated by the attached
source. Running this program through gdb results in:
(gdb) run
Starting program: /dcs/sys/ms/./test
Program received signal SIGSEGV, Segmentation fault.
0xff0b6dcc in strlen () from /usr/lib/libc.so.1
(gdb) bt
#0 0xff0b6dcc in strlen () from /usr/lib/libc.so.1
#1 0xff208548 in fl_strdup () from /usr/local/lib/libforms.so.0.89
#2 0xff1a73dc in draw_droplist_choice () from
/usr/local/lib/libforms.so.0.89
#3 0xff1a7880 in handle_choice () from /usr/local/lib/libforms.so.0.89
#4 0xff1f4660 in fl_handle_it () from /usr/local/lib/libforms.so.0.89
#5 0xff1f4754 in fl_handle_object () from /usr/local/lib/libforms.so.0.89
#6 0xff1f3d38 in redraw_marked () from /usr/local/lib/libforms.so.0.89
#7 0xff1bfffc in fl_show_form_window () from /usr/local/lib/libforms.so.0.89
#8 0x10f88 in main (argc=1, argv=0xffbee984) at test.c:48
It was compiled with:
gcc -c -g -Wall -pedantic -Wno-implicit-int -I /usr/local/include test.c
gcc -o test test.o -L/usr/local/lib -R/usr/local/lib -lX11 -lforms -lm
Any ideas? The same works fine under 0.88...
Mike
-- Dr. Michael K. Steliaros / Comp. Sci. Dept., Warwick University, Systems Programmer / Coventry CV4 7AL, UK. ms@dcs.warwick.ac.uk / Tel: +44 24 76523296, (Fax: 76573024)
#include <stdio.h> #include <stdlib.h> #include <forms.h>
typedef struct { FL_FORM *SCORING_FORM; void *vdata; char *cdata; long ldata; FL_OBJECT *ROUND_CHOICE; } FD_SCORING_FORM;
void session_cb(FL_OBJECT *ob, long data) { fprintf(stderr, "session_cb\n"); }
FD_SCORING_FORM *create_form_SCORING_FORM(void) { FL_OBJECT *obj; FD_SCORING_FORM *fdui = (FD_SCORING_FORM *) fl_calloc(1, sizeof(*fdui));
fdui->SCORING_FORM = fl_bgn_form(FL_NO_BOX, 630, 520); obj = fl_add_box(FL_FLAT_BOX,0,0,630,520,""); fdui->ROUND_CHOICE = obj = fl_add_choice(FL_DROPLIST_CHOICE,315,60,195,25,""); fl_set_object_boxtype(obj,FL_DOWN_BOX); fl_set_object_lsize(obj,FL_NORMAL_SIZE); fl_set_object_lstyle(obj,FL_BOLD_STYLE); fl_set_object_gravity(obj, FL_NorthWest, FL_NorthEast); fl_set_object_resize(obj, FL_RESIZE_X); fl_set_object_callback(obj,session_cb,0); fl_end_form();
fdui->SCORING_FORM->fdui = fdui;
return fdui; }
int main(int argc, char *argv[]) { FD_SCORING_FORM *fdui;
fl_initialize(&argc, argv, 0, 0, 0);
fdui = create_form_SCORING_FORM();
fl_show_form(fdui->SCORING_FORM, FL_PLACE_FREE, FL_FULLBORDER, argv[0]);
fl_do_forms();
return(0); }
_________________________________________________ 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://world.std.com/~xforms List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Tue Jan 25 2000 - 09:11:58 EST