RE: [gtk-list] Re: gtk_init wierdness





> -----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;
	}



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