[comp.windows.x] vPaned problems

mcintyre@cs.rpi.edu (David McIntyre) (09/02/89)

I have a very large application that uses several nested vPaned
widgets.  

At (seemingly) random intervals, we get core dumps while inside
vPaned code.  Because of the randomness, it makes me think about
memory problems.

Debugging inside vPaned code reveals that sometimes the num_panes
variable of the vPane gets set to something like 76899847, or
the like.  I cannot detect where the problem is happening, but
once this variable is munged a core dump is inevitable.

The Question:  Have other people had similar problems with vPane?
               Has anyone come up with a fix?

			     Thanks,
				 Dave

Dave "mr question" McIntyre     |      "....say you're thinking about a plate
mcintyre@turing.cs.rpi.edu      |       of shrimp.....and someone says to 
office : 518-276-8633		|	you `plate,' or `shrimp'......"
home   : 518-271-6664		|

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (09/05/89)

> I have a very large application that uses several nested vPaned
> widgets.  

> At (seemingly) random intervals, we get core dumps while inside
> vPaned code.  Because of the randomness, it makes me think about
> memory problems.

> Debugging inside vPaned code reveals that sometimes the num_panes
> variable of the vPane gets set to something like 76899847...

I fixed this bug less than a week ago, why is it that we all see these things
at the same time?

The problem is that num_panes is not being initialized properly.  If you set
the num_panes variable to zero in the initialize proc. all should be well. 

For those of you who are wondering why this hasn't bitten you.  It turns out
that this problem only occures if the vPaned widget is realized before it
receives any managed children.  In most cases this does not happen. 

This bug has been fixed, and will go away in R4.

----------------------------------------------------------------
From the did you know department.

If you manage a child of a realized parent the child is automatically
realized for you.  So using XtCreateManagedWidget() passing a parent 
that is already realized is effectively using
XtCreateManagedAndRealizedWidget().
----------------------------------------------------------------

						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213