shoes / shoes3

a tiny graphical app kit for ruby
http://walkabout.mvmanila.com
Other
180 stars 19 forks source link

Shoes.quit causes Shoes to segfault #326

Open IanTrudel opened 7 years ago

IanTrudel commented 7 years ago
Shoes.app do
   Shoes.quit
end
shoes_quit.rb:2: [BUG] Segmentation fault
ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32]

-- Control frame information -----------------------------------------------
c:0006 p:---- s:0016 e:000015 CFUNC  :quit
c:0005 p:0013 s:0013 e:000012 BLOCK  shoes_quit.rb:2 [FINISH]
c:0004 p:---- s:0011 e:000010 CFUNC  :instance_eval
c:0003 p:0010 s:0008 e:000007 LAMBDA eval:1 [FINISH]
c:0002 p:---- s:0004 e:000003 CFUNC  :call
c:0001 p:0000 s:0002 E:001cac TOP    [FINISH]

-- Ruby level backtrace information ----------------------------------------
-e:0:in `call'
eval:1:in `block in <main>'
eval:1:in `instance_eval'
shoes_quit.rb:2:in `block in <main>'
shoes_quit.rb:2:in `quit'

-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(ZwWaitForSingleObject+0xc) [0x77DDE5FC]
C:\WINDOWS\System32\KERNELBASE.dll(WaitForSingleObject+0x12) [0x7633AD52]
C:\Program Files (x86)\Shoes\msvcrt-ruby220.dll(rb_print_backtrace+0x4b) [0x640AF005]
C:\Program Files (x86)\Shoes\msvcrt-ruby220.dll(rb_vm_bugreport+0x78) [0x640AF082]
C:\Program Files (x86)\Shoes\msvcrt-ruby220.dll(rb_bug_context+0x72) [0x63F7AAD6]
C:\Program Files (x86)\Shoes\msvcrt-ruby220.dll(rb_get_next_signal+0xdb) [0x640356B9]
C:\Program Files (x86)\Shoes\cshoes.exe(WinMain+0x4f6) [0x00401A56]
C:\WINDOWS\System32\KERNELBASE.dll(UnhandledExceptionFilter+0x172) [0x763CD412]
C:\WINDOWS\SYSTEM32\ntdll.dll(LdrSetAppCompatDllRedirectionCallback+0x1ae9d) [0x77E0E0BD]
ccoupe commented 7 years ago

Too easy.

Shoes.app do
   start {Shoes.quit}
end

Add it to the long list things you can't do until the GUI is active.

IanTrudel commented 7 years ago

The problem here is how Shoes deals with this. It should not segfault for any reason whatsoever. The worst case scenario should be raising a RuntimeError or such in a way that Shoes programmers can handle in Shoes (and understand what's going on). Other current segfault issues #318, #316 and #306.

Add it to the long list things you can't do until the GUI is active.

The list seems to be growing. Adding to the fact that the GUI startup is longer than previous releases. On Windows, it's kinda black until the user focus on the windows (which is also a problem for other issues such as #315 and #299).

dredknight commented 5 years ago

In 3.3.7 build 3301, @BackOrder code does not report any error but it also does not quit.

ccoupe commented 5 years ago

Hmm. On Linux it quits w/o error. On shoes 3.3.7, Win 7, started from cshoes.exe it quits w/o crashing. It does display a gtk-assertion failure but that's OK for something designed to quit before the GUI is up and running. No problem here.