On at least OSX/Cocoa, if graft* throws an uncaught exception, the factor image will die when the window containing the gadget is closed. To reproduce, load the attached gadget-of-death.factor file from the listener, then run:

	USE: gadget-of-death
death-gadget-window

You'll receive an error in the listener, and the "Death" window will appear. Close the window, and you'll drop to the lowlevel debugger. Also attached are the results of .s, .r, and .c from the debugger.
At a glance, I'd guess the death in graft* is preventing the gadget from making it into the ui:windows assoc, so when the windowShouldClose: method gets called on the FactorWindowDelegate, it can't match the window to its gadget. I'll investigate this further, unless it's a known problem and someone already has a fix.

Attachment: gadget-of-death.factor
Description: Binary data

READY
.c
[ continuations.private:init-error-handler kernel:dup 2 kernel.private:setenv 
kernel:slip alien.compiler:wait-to-return ]
4
19c40fb
61c13b0
[ kernel:>r kernel:call kernel:r> ]
1
19c4203
6146890
[ kernel:2nip "contentView" cocoa.messages:send ui:window ui.gadgets:ungraft 
syntax:t ]
4
220ac0b
664c610
ui.gadgets:ungraft
f
1a9dd63
62beb30
math:(each-integer)
f
19c85d3
62c86d0
ui.gadgets:unqueue-graft
f
1acf5bb
62c97f0
kernel:throw
f
19c721b
628ac50
continuations:rethrow
f
19c5ebb
63a0cb0
READY
.s
T{ ui.gadgets.worlds:world T{ ui.gadgets.tracks:track T{ ui.gadgets.packs:pack 
T{ ui.gadgets:gadget T{  ...   ...   ...   ...  } f f #<type 11 @ 49a1cab> {  
...   ...  } T{  ...   ...  } syntax:t syntax:t f f {  ...   ...  } f f f } 0 1 
{ 0 0 } } #<type 11 @ 49a1733> } syntax:t f f "Death" f #<type 10 @ 49a12b3> { 
#<type 16 @ 49a143b> #<type 16 @ 49a176b> } { #<type 5 @ 49a177d> #<type 5 @ 
49a178d> } }
T{ gadget-of-death:death-gadget T{ ui.gadgets:gadget T{ ui.gadgets:rect f { 0 0 
} { 100 100 } } { 100 100 } T{ ui.gadgets.worlds:world T{ 
ui.gadgets.tracks:track T{  ...   ...   ...   ...   ...  } #<type 11 @ 49a1733> 
} syntax:t f f "Death" f #<type 10 @ 49a12b3> { #<type 16 @ 49a143b> #<type 16 
@ 49a176b> } { #<type 5 @ 49a177d> #<type 5 @ 49a178d> } } f { 0 1 } f syntax:t 
f f f { f syntax:t } f f f } }
"Not queued"
READY
.r
T{ alien.compiler:callback-context f }
1
#<type 11 @ 49a1cab>
0

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to