[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] [bug] xgraph crashes when output is to a file
It helps - thanks!
Andrei
On Thu, 15 Nov 2001, Di-Fa Chang wrote:
> apply this patch:
>
> diff -u draw.c xgraph-12.1/draw.c
> --- draw.c Thu Nov 15 13:01:57 2001
> +++ xgraph-12.1/draw.c Fri Dec 3 15:16:42 1999
> @@ -50,6 +50,7 @@
> {
> /* Figure out the transformation constants */
> if (TransformCompute(win_info)) {
> +
> /* Draw the title */
> DrawTitle(win_info);
>
> @@ -848,8 +849,7 @@
> thisList = thisList->next;
> }
> }
> - if (disp)
> - XFlush (disp);
> + XFlush (disp);
> }
>
>
> @@ -889,8 +889,7 @@
>
> /* PW Suggests we Flush and set first */
> theDelay = PM_INT("DelayValue")*100000;
> - if (disp)
> - XFlush(disp);
> + XFlush(disp);
> if (PM_BOOL("Animate")) sleep(1);
> set_mark_flags(&markFlag, &pixelMarks, &bigPixel, &colorMark);
> for (idx = 0; idx < MAXSETS; idx++) {
> @@ -1102,8 +1101,7 @@
> lineWidth, L_VAR,
> LINESTYLE(1), PIXVALUE(2));
> }
> - if (disp)
> - XFlush (disp);
> + XFlush (disp);
> for (X_idx=1;X_idx<theDelay;X_idx++);
> X_idx = StoreIDX;
> if ((thisList->numPoints > 0) && (!noLines) && (X_idx > 0))
> {
> @@ -1147,8 +1145,7 @@
> LINESTYLE(1), PIXVALUE(2));
> }
> }
> - if (disp)
> - XFlush (disp);
> + XFlush (disp);
> }
>
>
>
>
> On Thu, 15 Nov 2001, Andrei Gurtov wrote:
>
> >
> > [Bug Report]
> >
> > -----------------------------
> > Category: Other
> > Package: other xgraph 12.1
> > OS: Linux 2.2.14-5.0
> > Environment Variables:
> > LD_LIBRARY_PATH=/usr/lib-elf:/opt/RH5.2/lib:/usr/local/src/ns-allinone-2.1b8
> > /otcl-1.0a7:/usr/local/src/ns-allinone-2.1b8/lib
> > TCL_LIBRARY=/usr/local/src/ns-allinone-2.1b8/tcl8.3.2/library
> > TK_LIBRARY=
> >
> >
> > -----------------------------
> > Description:
> >
> > Description of Problem:
> >
> > xgraph crashes for all output types (ps, tgif,..)
> > when file output option is used. If output is saved to a file
> > from GUI, everything is fine.
> >
> > How Easily Reproducible:
> > (e.g. every time, intermittent, once only, etc.)
> >
> > every time
> >
> > Steps to Reproduce:
> > (describe the minimal set of steps necessary to trigger the bug)
> > 1. xgraph -device ps -o tmp.ps rcv.xgr
> > 2.
> > 3.
> >
> >
> > Actual Results:
> > (describe what the application did after performing the above steps)
> >
> > Segmentation fault (core dumped)
> > tmp.ps has PS funtions, but no actual data
> >
> > Expected Results:
> > (describe what the application should have done, were the bug not present)
> >
> > Saved output in tmp.ps
> >
> > Additional Information:
> > (e.g. URLs to your script, detailed output files, packet trace, etc. if they
> > are big files.)
> >
> > Core was generated by `xgraph -device ps -o tmp.ps rcv.xgr'
> > 0x40053e44 in XFlush () from /usr/X11R6/lib/libX11.so.6
> >
>