Michael,
do I read this correctly. To me, this is saying that purify finds
uninitialised memory at line 306 of WorkArea.C. Correct?
The appropriate code in that case is:
int WorkArea::work_area_handler(FL_OBJECT * ob, int event,
FL_Coord, FL_Coord ,
int key, void * xev)
{
XEvent * ev = static_cast<XEvent*>(xev);
...
if (!ev || ev->xbutton.button == 0) break;
}
It's the last line that generates the warning.
Perhaps the error stems from GUIRunTime?
void GUIRunTime::runTime()
{
XEvent ev;
while (!finished) {
if (fl_check_forms() == FL_EVENT) {
lyxerr << "LyX: This shouldn't happen..." << endl;
fl_XNextEvent(&ev);
}
}
}
As I read it, fl_check_forms() passes XEvents to WorkArea through
C_WorkArea_work_area_handler. In which case, there is little or nothing that
we can do about this particular problem as it's all internal to xforms and X.
Incidentally, shouldn't the GUIRunTime routine be re-written as
void GUIRunTime::runTime()
{
while (!finished) {
if (fl_check_forms() == FL_EVENT) {
lyxerr << "LyX: This shouldn't happen..." << endl;
XEvent ev;
fl_XNextEvent(&ev);
}
}
}
Angus
On Monday 30 July 2001 15:44, Michael Schmitt wrote:
> Sorry,
>
> the only information I can provide is the following backtrace given by
> Purify. Seems like some static variable is not initialized correctly. (if
> that is the case, the problem should be fixable without further info)
>
> Michael
>
> ********************
>
> UMR: Uninitialized memory read
> This is occurring while in:
> WorkArea::work_area_handler(flobjs_*,int,int,int,int,void*)
> [WorkArea.C:306]
> C_WorkArea_work_area_handler [WorkArea.C:58]
> fl_handle_it [objects.c]
> fl_handle_object [libforms.a]
> fl_handle_form [forms.c]
> do_interaction_step [forms.c]
> fl_treat_interaction_events [libforms.a]
> fl_check_forms [libforms.a]
> GUIRunTime::runTime() [GUIRunTime.C:86]
> LyXGUI::runTime() [lyx_gui.C:316]
> LyX::LyX(int*,char**) [lyx_main.C:179]
> main [main.C:38]
> _start [crt1.o]
> Reading 4 bytes from 0x8a9a7c in the zero'd data, bss section (3
> bytes at 0x8a9a7d uninit).
> Address 0x8a9a7c is 52 bytes past start of global variable
> "st_xev".
> This is defined in forms.c.