I’ve just spent two days tracking down a very nasty
bug that caused a fairly mature program to crash.
The interesting fact is that while the program runs
fine under Photon 1.13, it fails under 1.14.
I’ve also isolated the problem to being in one
of the dynamic libraries, phlib_render_11, phlib_s11
or Aplib_s11. Most likely is is the Aplib_s11 as
you will see.
I’ve distilled the problem down to a very time
workable program which is uploaded to my
quics “maschoen” account as the file edit.pax.F.
Here is the jist of the problem. The following
subroutine is called. The widget data that “button”
points to is saved after the ApCreateWidget() call.
After the second ApCreateWidget() call is made, the
save data is compared with “button” again and found
to be different.
I hope that this is actually something simple and that
someone can point out my dumb mistake, or else report
that a fix is already on the way.
Thanks
void init_widgets()
{
ApDBase_t *widget_dbase;
if ((widget_dbase = ApOpenDBase( ABM_button_picture )) == NULL)
{
fprintf(stderr,“edit: ApOpenDBase open failed 1\n”);
exit(-1);
}
if ((button = ApCreateWidget(widget_dbase,“main_button”,0,0,0, NULL))
== NULL)
{
fprintf(stderr,“ApCreateWidget failed 1\n”);
exit(-1);
}
if ((label1=ApCreateWidget(widget_dbase,“but_label1_lbl”,0,0,0,NULL))
== NULL)
{
fprintf(stderr,“ApCreateWidget failed 2”);
exit(-1);
}
}