« Return to Thread: Re: [Foxgui-users] Bug Report: Locking X11 with FOX

Re: [Foxgui-users] Bug Report: Locking X11 with FOX

by Melton, Ryan :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.

Here is a super simple FXRuby application that recreates the X11 Lockup.  Run the program and then start clicking and mousing around the File Menu.  It will usually grab the mouse and not let go within a few seconds.   If you know where to look for this problem, please fix!  It definitely seems to be something to do with the FOX event loop falling far behind.

Thanks,

Ryan

 

require 'rubygems'

require 'fox16'

include Fox

 

def long_method (sender, sel, data)

  sum = 0

  1000000.times {|| sum += 1}

  FXApp.instance.addTimeout(10, method(:long_method))

end

 

application     = FXApp.new("NA", "NA")

window          = FXMainWindow.new(application, 'Title', nil, nil, DECOR_ALL, 0, 0, 500, 500)

frame           = FXVerticalFrame.new(window, LAYOUT_FILL_X|LAYOUT_FILL_Y)

menu_bar        = FXMenuBar.new(frame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)

file_menu       = FXMenuPane.new(frame)

file_menu_title = FXMenuTitle.new(menu_bar, "File", nil, file_menu)

menu_cmd        = FXMenuCommand.new(file_menu, "Process")

 

application.create

window.show

 

application.addTimeout(100, method(:long_method))

application.run


This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users

 « Return to Thread: Re: [Foxgui-users] Bug Report: Locking X11 with FOX