[GEM-dev] crash when destroying fullscreen, menubarless, borderless gemwin, and difficulty creating borderless, menubarless, fullscreen gemwin.

james tittle tigital at mac.com
Mon May 8 17:03:42 CEST 2006

On May 8, 2006, at 10:48 AM, B. Bogart wrote:
> Oh and before I forget can someone please change the gem splash  
> screen to
> say the CVS revision, branch name, or even just "CVS" since I'm  
> tired of
> seeing "gem 0.90" when its CVS.

...good idea:  I think we should put something like "2006-05-08-cvs",  
which would be easy enough to do by have a compile time check for  

> The first issue is that pd will crash after I destroy a fullscreen,
> borderless,menubarless gemwin. The window goes away, there is a pause,
> then Pd crashes. This is currently happening with pd-extended (stable
> 0.38-4).
> Here is the trace:
> $ gdb
> GNU gdb 5.3-20030128 (Apple version gdb-330.1) (Fri Jul 16 21:42:28  
> GMT 2004)
> Copyright 2003 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License,  
> and you are
> welcome to change it and/or distribute copies of it under certain  
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for  
> details.
> This GDB was configured as "powerpc-apple-darwin".
> (gdb) attach 602
> Attaching to process 602.
> Reading symbols for shared libraries . done
> Reading symbols for shared libraries
> ...................................................................... 
> ...........................................
> done
> 0x9000b468 in select ()
> (gdb) continue
> Continuing.
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> clock_unset (x=0x79708) at m_sched.c:57
> 57      m_sched.c: No such file or directory.
>         in m_sched.c
> (gdb) bt
> #0  clock_unset (x=0x79708) at m_sched.c:57
> #1  0x00039680 in clock_set (x=0x0, setticks=2294439040) at  
> m_sched.c:74
> #2  0x02012e74 in dispatchGemWindowMessages() ()
> #3  0x0003a024 in sched_tick (next_sys_time=2294439040) at  
> m_sched.c:357
> #4  0x0003a2f0 in m_scheduler () at m_sched.c:453
> #5  0x00002240 in _start (argc=530048, argv=0x2d13ad0, envp=0x1388) at
> /SourceCache/Csu/Csu-47/crt.c:267
> #6  0x8fe1a278 in __dyld__dyld_start ()
> Looks like a PD problem, but its happening when I'm going a gem  
> operation.

...actually it looks like something to do with the message handler  
callback...when a window is created, a message handler function is  
installed in an event loop (which for pd is the scheduler), and it  
looks like it's still being called after the window is destroyed,  
when of course it should've been removed...I'll look into this:  it  
may be an easy fix, but I've always been a bit uncomfortable with the  
gem input handling, yet haven't found a better solution :-\

> Also I noticed using the test patch (attached), that If I try and  
> create
> the fullscreen, borderless, menubarless window after opening PD I  
> still
> get a titlebar on the gemwin. But If I first send "create, 1" and then
> destroy it, and then create the fullscreen window with the very same
> message then it works... Seems like the create,1 sets something in the
> gemwin that is not in the initial load state.
> This is not a bug, but its strange, so I'm mentioning it. For some  
> reason
> each time I attach to the PD process on OSX, gdb stops immediatly  
> with:

...this is normal behavior:  just hit "(c)ontinue" and the app will  
continue executing...


More information about the GEM-dev mailing list