Re: MAL Conduit in CVS crashing



--- Matt Davey <mcdavey mrao cam ac uk> wrote:

> > > I'm trying to use gnome-pilot and gnome-pilot-conduits from CVS, and I beli
> > ev
> > > e the MAL conduit is
> > > crashing. The weird thing is that it only seems to happen when I'm using th
> > e 
> > > Pilot Applet. I
> > > haven't been able to get a backtrace yet, but I wanted to make sure that th
> > is
> > >  gets noticed before
> > > 2.0.14 gets released.
> > 
> 
> I've updated gnome-pilots-conduits to fix this bug.
> 
> There was a truly horrible bug, in which the PalmSyncInfo was defined
> in both malsync.c and mal-conduit.c.  The pilot-link 0.12.0 porting
> effort had changed one of these definitions but not the other.  I've
> split out the structure definition into the new 'malsync.h' header file.
> 
> Hopefully this'll fix your problem.
> 
> I also fixed the pi_buffer bug that you spotted, which could have
> caused bad problems, for sure.
> 
> Matt

That fixed it. I also found another problem: the second time a sync occurs, the applet crashes.
Attached is a patch to fix it. The code removed was being used incorrectly (the 0 should actually
be a pointer). I removed it (instead of fixing it) since it's not necessary - deleting all text in
the buffer sets the cursor to the beginning.

I've been using the applet continuously, and it seems that it's working without crashing, being
used multiple times. I'll let you know if I have any more problems.

Nathan

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Index: pilot.c
===================================================================
RCS file: /cvs/gnome/gnome-pilot/applet/pilot.c,v
retrieving revision 1.94
diff -u -r1.94 pilot.c
--- pilot.c	8 Aug 2006 18:16:05 -0000	1.94
+++ pilot.c	14 Aug 2006 01:45:59 -0000
@@ -135,7 +135,7 @@
 
 	gtk_tooltips_set_tip (applet->tooltips, GTK_WIDGET(applet->applet),
 			("Synchronizing..."), NULL);
-  
+
 	if (!GTK_WIDGET_REALIZED (applet->image)) {
 		g_warning ("! realized");
 		return;
@@ -159,8 +159,7 @@
 		gtk_signal_connect (GTK_OBJECT (applet->cancel_button),"clicked",
 				   GTK_SIGNAL_FUNC (cancel_cb),applet);
 	} else {
-		gtk_text_buffer_place_cursor (applet->message_buffer,0);
-		gtk_text_buffer_set_text (applet->message_buffer, "", 0);
+		gtk_text_buffer_set_text (applet->message_buffer, "", -1);
 	}
 
 	gtk_widget_set_sensitive (applet->cancel_button, FALSE);


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