From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27083 invoked by alias); 13 Dec 2013 19:02:40 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Received: (qmail 27070 invoked by uid 89); 13 Dec 2013 19:02:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: beta.phas.ubc.ca Received: from beta.phas.ubc.ca (HELO beta.phas.ubc.ca) (142.103.236.75) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 13 Dec 2013 19:02:37 +0000 Received: from spider.phas.ubc.ca (spider.phas.ubc.ca [142.103.235.177]) (authenticated bits=0) by beta.phas.ubc.ca (8.13.1/8.13.1) with ESMTP id rBDJ2YF3018159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 13 Dec 2013 11:02:35 -0800 Date: Fri, 13 Dec 2013 19:02:00 -0000 From: Carl Michal To: cygwin-xfree@cygwin.com Subject: Re: gtk+ applications crash when filechooser opened In-Reply-To: <20131213144744.GG9487@calimero.vinschen.de> Message-ID: References: <52AB1A51.9050906@cornell.edu> <20131213144744.GG9487@calimero.vinschen.de> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00009.txt.bz2 On Fri, 13 Dec 2013, Corinna Vinschen wrote: > On Dec 13 09:31, Ken Brown wrote: >> [This is a followup to >> http://cygwin.com/ml/cygwin/2013-12/msg00255.html; see also >> http://cygwin.com/ml/cygwin/2013-12/msg00146.html] >> >> On 12/13/2013 2:12 AM, Carl Michal wrote: >>> I recently started trying to port a gtk program to cygwin, and have >>> found that my program crashes everytime it tries to open a file chooser >>> widget. >>> >>> This doesn't happen with just my own programs, but also with gvim and >>> emacs-x11. Either will start up ok, but both crash as soon as File->Open >>> is selected. >> >> FWIW, here's one more data point. I can confirm this behavior of >> gvim and emacs-X11, but on x86 only. The File->Open dialog works >> fine in both gvim and emacs-X11 on x86_64. > > A crash at this point would indicate a broken value returned from > *g_private_get_impl (key). It should be a valid pthread_key_t > value but appears not to be one, for some reason. > What's interesting is that the call to open the filechooser hits this routine (g_private_get) a few times (through g_slice_alloc). If you don't try to step into pthread_getspecific, it crashes on the third time it is called. The same key is returned by g_private_get_impl every time. Trying to follow into pthread_getspecific gets really weird though. The debugger can't see the argument at all - says it doesn't exist in the current context. It appears that if I step into pthread_getspecific it crashes every time. I'm a little boggled here - there are 40 odd calls to pthread_getspecific that occur while my program starts up, and they appear to complete successfully, unless I try to follow with the debugger. This is from an early call to pthread_getspecific, that wouldn't crash if I wasn't running in the debugger: 0x6c62fe70 in pthread_getspecific () at /usr/src/debug/cygwin-1.7.27-2/winsup/cygwin/thread.cc:2617 2617 { gdb) list 2612 return 0; 2613 } 2614 2615 extern "C" void * 2616 pthread_getspecific (pthread_key_t key) 2617 { 2618 if (!pthread_key::is_good_object (&key)) 2619 return NULL; 2620 2621 return (key)->get (); (gdb) print key No symbol "key" in current context. (gdb) s /netrel/src/gdb-7.6.50-4/gdb/infrun.c:1942: internal-error: resume: Assertion `pc_in_thread_step_range (pc, tp)' failed. A problem internal to GDB has been detected, It crashes at line 2617 - before even getting to any of the code in the function! I haven't tried this on the 64 bit install, but will try to. Carl -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/