astro/foxtrotgps (1.1.1_1 from ports SVN r315646) crashes on start

Pierre Pronchery khorben at defora.org
Mon Apr 29 20:57:39 UTC 2013


			Hey,

On Mon, Apr 29, 2013 at 05:40:32PM +0200, Matthias Apitz wrote:
> El día Sunday, April 28, 2013 a las 08:01:35PM +0200, Matthias Apitz escribió:
> 
> > Foxtrotgps crashes on start on 10-CURRENT r235646 during 'pthread_mutex_unlock',
> > details follow below;
> 
> The attached patch (to be placed in astro/foxtrotgps/files/patch-src-main
> before 'make install') fixes the bug;

thank you for the patch, it fixes the reproducible crash upon startup,
and I have committed it to pkgsrc-wip.

However, I am afraid that it may break functionality, and allow only the
main Gtk+ thread to start. Map download in particular was performed in a
separate thread in TangoGPS IIRC, and here foxtrot doesn't download
anything... I'm afraid this issue results from the patch. It may be more
work than just this to get it to run properly :/

Please let me know if it works better for you.

Cheers,
-- khorben

> --- src/main.c.orig	2012-06-14 06:41:11.000000000 +0200
> +++ src/main.c	2013-04-29 17:19:50.000000000 +0200
> @@ -200,9 +200,17 @@
>  	
>  	init();
>  	
> -	gtk_main ();
> -
> -
> -	
> +        /* Properly call gdk_threads_enter() and gdk_threads_leave() to prevent 
> +           abort() on startup due to gtk trying to unlock a uninitialized 
> +           mutex
> +           see also: http://openbsd.7691.n7.nabble.com/geo-tangogps-abort-trap-td147777.html
> +         */
> +  
> +        gdk_threads_enter();
> +  
> +        gtk_main ();
> +  
> +        gdk_threads_leave();
> +  
>  	return 0;
>  }

-- 
khorben


More information about the freebsd-ports mailing list