CLONE -Tk crashes after invoking watir in a thread --------------------------------------------------
Key: WTR-501 URL: http://jira.openqa.org/browse/WTR-501 Project: Watir Issue Type: Bug Components: Other Affects Versions: 1.9.1 Environment: Windows 7, IE, PC Reporter: Jason Fisher Priority: Major I use Tk to create GUI to invoke watir. When I click a button, IE window should be opened. To avoid the freezing UI, I put it into a new thread. This worked until everything finished and I closed Tk window. There will be segmentation fault. I am not familar with Thread in Ruby. Should I clean something after a thread is done? Here is the simplified code. If you run this code, you will get a segmentation erro when closing the Tk window. require 'tk' require 'watir' root = TkRoot.new() { title "test watir" } Thread.new{ browser = Watir::IE.new sleep(2) browser.close } Tk.mainloop() Here is the error msg: segerr.rb: [BUG] Segmentation fault ruby 1.9.3p0 (2011-10-30) [i386-mingw32] -- Control frame information ----------------------------------------------- c:0001 p:0000 s:0002 b:0002 l:001bd4 d:001bd4 TOP -- C level backtrace information ------------------------------------------- C:\Windows\SysWOW64\ntdll.dll(NtWaitForSingleObject+0x15) [0x77a5f8c1] C:\Windows\syswow64\kernel32.dll(WaitForSingleObjectEx+0x43) [0x75571194] C:\Windows\syswow64\kernel32.dll(WaitForSingleObject+0x12) [0x75571148] C:\Users\mememe\Ruby193tk\bin\msvcrt-ruby191.dll(rb_vm_bugreport+0xf9) [0x62e5acc9 ] C:\Users\mememe\Ruby193tk\bin\msvcrt-ruby191.dll(rb_name_err_mesg_new +0x17a) [0x62 d3a68e] C:\Users\mememe\Ruby193tk\bin\msvcrt-ruby191.dll(rb_bug+0x2f) [0x62d3b3ef] C:\Users\mememe\Ruby193tk\bin\msvcrt-ruby191.dll(rb_check_safe_str +0x1a4) [0x62ded 27c] [0x004011e6] C:\Users\mememe\Ruby193tk\lib\ruby\gems\1.9.1\gems\watir-2.0.4\lib \watir\IEDialog\ Release\IEDialog.dll(DoButtonClick+0x5215) [0x10006985] C:\Windows\SysWOW64\ntdll.dll(RtlKnownExceptionFilter+0xb7) [0x77ab21d7] -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.openqa.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira _______________________________________________ Wtr-development mailing list Wtr-development@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development