FW: GtkText widget crashing application



To anybody to has taken an interest:

While using GDB-5.0 and DDD-3.2.1, I was able to capture a SIGSEGV signal at
line 5004 of gtktext.c in function draw_line with the following arguments
GtkText* text= 0x2044a0, gint pixel_start_height= -4, and LineParams*
lp=0x24d1b8.  Based on this I am guessing that my application has either got a
pointer stomping on memory used by draw_line or gtktext.c has a bug.  Does
anyone know of a good way that I can check for either?  Any help would be
appreciated.



				-- Stupid Genius

> ----------
> From: 	Dugas, Alan
> Sent: 	Wednesday, August 02, 2000 11:27 AM
> To: 	'gtk-app-devel-list@gnome.org'; 'gtk-list@gnome.org'
> Subject: 	GtkText widget crashing application
> 
> Hello all,
> 
> 	I'm am currently writing an application which monitors and displays
> changes to a file.  This file can get quite large and so I am attempting to
> limit how much of it my application displays to some value (say 128K).  Before
> I did this the application would bog down to a crawl after the gtktext widget
> became too large.  However, with the simple code below inserted, I get the
> following error message;
> 
> Gtk-ERROR **: file gtktext.c: line 4712 (find_line_params): assertion failed:
> (lp.end.property)
> aborting...
> Abort
> 
> I am somewhat suspicous of GtkText, as this code works fine on Solaris 2.6,
> but only for small blocks of character deletions/insertions or large blocks of
> characters over a small number of iterations on SunOS 4.1.4.  Does anybody
> have any idea(s) as to what may be going on?  I am currently running
> glib-1.2.8 and gtk+-1.2.8 compiled using gnu make 3.79 and gcc-2.95 for SunOS
> 4.1.4 and Solaris 2.6.  I have seen comments within the mailing lists by Owen
> Taylor concerning this issue dating back to 1998 indicating that patches were
> to be applied to either 1.0.5 or 1.1.0 to fixed this problem.  Any and all
> responses would be appreciated.  Note: this problem also existed when using
> glib-1.2.7 and gtk+-1.2.7.
> 
> 
> 
> 				-- Stupid Genius
> 
> 
> /* Declaring local variables */
> guint gtktext_memory_limit;
> guint gtktext_current_memory_usage;
> guint delete_length;
> 
> 
> 
> /* limiting gtktext widget to 128K bytes memory */
> gtktext_memory_limit = pow(2,17);
> gtktext_current_memory_usage = gtk_text_get_length(GTK_TEXT(text));
> 
> if ( gtktext_current_memory_usage > gtktext_memory_limit )
> {
> 	delete_length = gtktext_current_memory_usage - gtktext_memory_limit;
> 	while ( GTK_TEXT_INDEX(GTK_TEXT(text), delete_length++) != '\n' );
> 	gtk_text_set_point(GTK_TEXT(text), (guint) 0);
> 	gtk_text_forward_delete(GTK_TEXT(text), --delete_length);
> 	gtk_text_set_point(GTK_TEXT(text), gtk_text_get_length(GTK_TEXT(text)));
> }
> 
> 
> 




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