becker@CS.ROCHESTER.EDU (Tim Becker) (02/08/90)
I wrote a tool under R3 that puts load, biff, and clock widgets all in one program. In addition, I added a command widget that changes the info displayed in the load widget (load avg, packets in+out, network collisions, cpu usage). It does this by deleting the current load widget and creating a new one. When porting this to R4, I had to change the load widget to a stripchart widget. When I click my command button to change the stats displayed in the stripchart, I get a BadGC server error. If I watch it carefully, all seems to be well (the current stripchart widget gets destroyed, a new one gets created, the new one is displayed) until the first time it has to display a value. Then I get the BadGC error. Af first I thought it might be my program. So, I wrote a small program that created a form widget containing a command widget and a label widget. When I click the command widget, it destroys the current label widget, increments a counter, and creates a new label widget displaying the counter value. This runs fine. I can click away -- no problem. I then replaced the label widget with a stripchart widget (without putting in a routine to call to get a value to display). If I click 3 times, I get a core dump (segmentation violation, I think). I'd be glad to submit a report to xbugs, but I want to be sure this a bug with X11 R4 and not my mistake. Any help? Tim Becker.
kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (02/09/90)
> When porting this to R4, I had to change the load widget to a > stripchart widget. When I click my command button to change the stats > displayed in the stripchart, I get a BadGC server error. We just noticed this bug two days ago. It is amazing how these things always seem to come in waves. The fix is to change line 155 in StripChart.c from XFreeGC() to XtReleaseGC(). > I'd be glad to submit a report to xbugs, but I want to be sure this a > bug with X11 R4 and not my mistake. Any help? No need to submit a bug report, we have already fixed the problem, but thanks anyway. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213