Bug 98929

Summary: jpilot is broken with FreeBSD 6.1 / GTK2
Product: Ports & Packages Reporter: Guy Brand <gb>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Guy Brand 2006-06-14 08:50:11 UTC
    after upgrading gtk2 (and related), jpilot is no longer working
	and aborts with jpilot in free(): error: modified (page-) pointer
	Abort trap

Fix: 

Workaround: build jpilot port with GTK1 (WITH_GTK1=1).
	
	WIP fix: use jpilot from the CVS (jpilot.org) I succeeded in
	having it run with GTK2, but GNUish stuff (autoconf/aclocal/
	autogen) needs to be cleaned up, NLS support seems broken (I
	disabled it) and I have a two lines long CPPFLAGS to get the
	compilation properly (I'm not used with port building
	environment).
How-To-Repeat: 	portupgrade gtk2 and jpilot
Comment 1 Andrey Slusar freebsd_committer freebsd_triage 2006-06-15 19:18:56 UTC
State Changed
From-To: open->feedback

Try new port version(0.99.8_3) and report results.
Comment 2 Oleksii Samorukov freebsd_committer freebsd_triage 2006-06-15 22:29:26 UTC
I back ported fix for this problem from CVS.

Now i`ll make another PR to submit changes to CVS tree but you can check 
this patch now and report result.

===================================================================
RCS file: /cvs/jpilot/jpilot_src/jpilot-sync.c,v
retrieving revision 1.23
diff -u -r1.23 jpilot-sync.c
--- jpilot-sync.c    28 Jan 2005 16:54:13 -0000    1.23
+++ jpilot-sync.c    5 Nov 2005 15:07:57 -0000
@@ -44,6 +44,7 @@
 pid_t glob_child_pid;
 GtkWidget *glob_dialog;
 pid_t glob_child_pid;
+GtkTooltips *glob_tooltips;
 
 unsigned char skip_plugins;
Comment 3 Oleksii Samorukov freebsd_committer freebsd_triage 2006-06-15 22:40:44 UTC
Sorry, previous followup contain a wrong patch. Here is a correct patch:

diff -u -r1.127 -r1.128
--- jpilot.c    28 Nov 2005 07:22:22 -0000    1.127
+++ jpilot.c    16 Dec 2005 13:33:27 -0000    1.128
@@ -1,4 +1,4 @@
-/* $Id: jpilot.c,v 1.127 2005/11/28 07:22:22 rikster5 Exp $ */
+/* $Id: jpilot.c,v 1.128 2005/12/16 13:33:27 rousseau Exp $ */
 
 /*******************************************************************************
  * jpilot.c
@@ -1367,7 +1367,7 @@
    gdk_pixdata_from_pixbuf(pixdata, pixbuf, FALSE);
    data = gdk_pixdata_serialize(pixdata, &len);
 
-   g_free(pixbuf);
+   g_object_unref(pixbuf);
    g_free(pixdata);
 
    return data;

-- 
Best regards,
Alex Samorukov, SAMM1-RIPE
Zend Certified PHP Engineer
Comment 4 Guy Brand 2006-06-16 21:23:53 UTC
On 16 June at 00:29, Alex Samorukov wrote:

> Now i`ll make another PR to submit changes to CVS tree but you can check 
> this patch now and report result.

  Your patch fixes the issue. jpilot works again when built with GTK2.
  
  ~$ ldd /usr/X11R6/bin/jpilot | grep gtk
     libgtk-x11-2.0.so.0 => /usr/X11R6/lib/libgtk-x11-2.0.so.0 (0x280e1000)
  
  
  BTW, old installation patch for jpilot binary was /usr/local/bin. It
  has changed to /usr/X11R6/bin. Shouldn't the upgrade process remove
  the old binary?

  -r-xr-xr-x  1 root  wheel  460952 16 jui 22:16 /usr/X11R6/bin/jpilot
  -rwxr-xr-x  1 root  wheel  961166 11 jui 20:30 /usr/local/bin/jpilot
  
  ~$ pkg_info -W /usr/local/bin/jpilot
  [nothing]
  
  Thank you Alex

-- 
  bug
Comment 5 Andrey Slusar freebsd_committer freebsd_triage 2006-06-17 16:50:03 UTC
State Changed
From-To: feedback->open

Feedback received.
Comment 6 Andrey Slusar freebsd_committer freebsd_triage 2006-06-17 16:51:49 UTC
State Changed
From-To: open->closed

This is fixed in 0.99.8_4 port version.