From nobody@FreeBSD.org  Mon Mar 25 04:56:45 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id CC2A2F96
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 25 Mar 2013 04:56:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id BEB1C9A4
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 25 Mar 2013 04:56:45 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r2P4ujFE000200
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 25 Mar 2013 04:56:45 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r2P4uj07000199;
	Mon, 25 Mar 2013 04:56:45 GMT
	(envelope-from nobody)
Message-Id: <201303250456.r2P4uj07000199@red.freebsd.org>
Date: Mon, 25 Mar 2013 04:56:45 GMT
From: Carter Parker <carterbparker@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: graphics/pqiv aborts when opening an image
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         177363
>Category:       ports
>Synopsis:       graphics/pqiv aborts when opening an image
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    danilo
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 25 05:00:00 UTC 2013
>Closed-Date:    Fri Dec 20 14:20:22 UTC 2013
>Last-Modified:  Fri Dec 20 14:20:22 UTC 2013
>Originator:     Carter Parker
>Release:        9.1
>Organization:
>Environment:
FreeBSD perception 9.1-RELEASE FreeBSD 9.1-RELEASE #0: Fri Jan 18 20:41:06 UTC 2013     root@perception:/usr/src/sys/amd64/compile/PERCEPTION  amd64
>Description:
Various functions are deprecated in the latest glib update, and since pqiv uses those functions, the following error results when trying to view an image:

GLib (gthread-posix.c): Unexpected error from C library during 'pthread_mutex_unlock': Operation not permitted.  Aborting.
Abort trap: 6

I've attached trimmed output of pkg_info showing the versions of both:

pqiv-0.12
glib-2.34.3
>How-To-Repeat:
Open an image with pqiv.
>Fix:
I've attached a patch that removes calls to the deprecated functions, which fixes it for me.

Patch attached with submission follows:

--- pqiv.c.orig	2013-03-24 22:34:51.793698424 -0500
+++ pqiv.c	2013-03-24 22:36:06.815695477 -0500
@@ -2251,9 +2251,9 @@
 /* }}} */
 /* glib & threads initialization {{{ */
 	DEBUG1("Debug mode enabled");
-	g_type_init();
-	g_thread_init(NULL);
-	gdk_threads_init();
+//	g_type_init();
+//	g_thread_init(NULL);
+//	gdk_threads_init();
 	if(gtk_init_check(&argc, &argv) == FALSE) {
 		die("Failed to open X11 display.");
 	}


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->danilo 
Responsible-Changed-By: danilo 
Responsible-Changed-When: Fri Dec 20 13:50:57 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177363 
State-Changed-From-To: open->closed 
State-Changed-By: danilo 
State-Changed-When: Fri Dec 20 14:20:21 UTC 2013 
State-Changed-Why:  
Port updated to version 2.1. This problem was, apparently, solved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=177363 
>Unformatted:
