Re: [gtk-list] Re: gtk_init wierdness



I see what you are saying now.  I had to look back at his code.  I
answered the way I did because I only looked for the #ifdef/#endif
combination and assumed that he put the function in there because it WAS
being called.  As such, it looks like a memory layout problem that could
be related to the libraries or the compiler/OS combination.

--Jason

On Thu, 22 Oct 1998, Rostedt, Steven wrote:

> 
> 
> > -----Original Message-----
> > From:	Jason A. Pfeil [SMTP:pfeil@nu.cs.fsu.edu]
> > Sent:	Thursday, October 22, 1998 1:20 PM
> > To:	gtk-list@redhat.com
> > Subject:	[gtk-list] Re: gtk_init wierdness
> > 
> > If I remember right, you said that it crashed without the #ifdef in place
> > and didn't crash with the #ifdef in place...  Well, the #ifdef jumps over
> > the fclose() call, but without the #ifdef, it will execute the fclose()
> > call.
> > 
> > --Jason
> > 
> 	The point that I think Katre is trying to make is that that function
> is NEVER
> 	called.  The main function only calls the two print statements and
> the gtk_init.
> 	But it crashes if the other function defines the code, although the
> other
> 	function never gets called.
> 
> 	I had similar problems that were caused by writing to memory where
> 	I should not have been. The other function is not the problem, but 
> 	most likely it's the case of gtk_init writing to a bad memory
> location.
> 
> 	The code for the other function just changes the address that
> 	causes the crash.  The code is not executing, but is changing
> 	the addresses to cause some pointer somewhere to fail.
> 
> 	Katre, are you sending any parameters in? Maybe this could be
> 	OS dependent?
> 	Have you compiled with "-Wall"?
> 
> 	And try to step through, you might find a bad pointer :)
> 
> 	int
> 	main (int argc, char *argv[])
> 	{
>    		/* initialization */
> 	   printf("Starting gtk.\n");
> 	   gtk_init(&argc, &argv);
> 	   printf("Gtk has started.\n");
> 	   return EXIT_SUCCESS;
> 	}
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 

-------------------------------------------------------------------------------
Jason A. Pfeil, Computer Science Graduate Student      101 Carothers Hall
http://www.cs.fsu.edu/~pfeil			       C3527 University Center
pfeil@cs.fsu.edu				       (850)644-8014



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]