Jeroen van der Zijp wrote:
...
Well,
I would need to investigate Hal Brand's particular case.
It appears to me that people are conflating several types of lock-ups:
1) mouse grabs which aren't released when they're supposed to.
2) getting stuck in select().
The former (1) is due to a failure of calling ungrab() along some path through the code;
note that this needs to be investigated on a case-by-case basis since there are MANY widgets
and thus many paths through the code whereby a call to ungrab() may be missed.
Number (2) is more fundamental O.S. related. It'll need to be looked at carefully since
its possible there's some sort of race in the code leading up to select().
I have reason to believe that #1 is the problem based on another very
similar FOX server grab lockup that is 100% reproducable. This lockup
is based on ambushing FOX's keyboard accelerator code. (Yes, I know, it
is an ambush. But its also mistake a programmer might make, it
demonstrates a lack of robustness in the keyboard accelerator code, and
it may provide clues to just what is going on in the "chore" case.)
Start with imageviewer.cpp and add a new message handler for
SEL_KEYPRESS,0 and in that message handler, simply return. (Use the
context diffs below for V1.6.36; I'm pretty sure patch will apply them
to V1.7.19 also.) Start imageviewer and press ALT-f; you will see the
File menu pop up, the cursor switch, but be unable to select any
options in the File menu - worse, the server is grabbed, so you can't
do anything with the mouse. Now, to show that FOX is still receiving
mouse events, place the cursor below the Edit menu (near the "e" in the
File menu's "Save..." will do) and press ALT-e. You will note that the
Edit pop up appears (while the File pop up is also up) AND that the
item under the cursor is highlighted. Mouse clicks are still ignored,
BUT mouse movement is not - move the mouse vertically between the Edit
menu selections and watch the highlight follow the cursor - clearly FOX
is getting at least mouse movement events. Now, move the cursor out of
the Edit pop up and then back in. Notice that now, FOX is no longer
highlighting the Edit menu selections. You can recover from this issue
by pressing ALT-f and ALT-e again (either order).
>From this I conclude that FOX is getting the events, but not processing
them correctly such that the code path to ungrab never happens.
Running the "chore" hang version with -tracelevel 500 confirms that FOX
is getting mouse events:
On each left button press:
FXMenuBar::onButtonPress 0x10fd0640
FXMenuBar::onCmdUnpost 0x10fd0640
FXToolTip::hide 0x10fdd680
FXMenuBar::onButtonRelease 0x10fd0640
FXToolTip::hide 0x10fdd680
Remember that in this case, the hang occurs without a menu popup on the
screen.
Thanks for your interest in this bug.
--
Hal Brand
JCATS Chief Architect
Lawrence Livermore National Laboratory
7000 East Ave, Livermore, CA 94550-9234
Phone: 925-422-6312
Email: brand1@...
*** imageviewer.cpp.~1~ 2009-03-12 22:45:10.000000000 -0700
--- imageviewer.cpp 2009-06-04 15:33:15.000000000 -0700
***************
*** 74,79 ****
--- 74,80 ----
long onCmdScale(FXObject*,FXSelector,void*);
long onCmdCrop(FXObject*,FXSelector,void*);
long onUpdImage(FXObject*,FXSelector,void*);
+ long onKey(FXObject*,FXSelector,void*);
public:
enum{
ID_ABOUT=FXMainWindow::ID_LAST,
***************
*** 238,245 ****
--- 239,252 ----
FXMAPFUNC(SEL_UPDATE, ImageWindow::ID_MIRROR_BOTH,ImageWindow::onUpdImage),
FXMAPFUNC(SEL_UPDATE, ImageWindow::ID_SCALE, ImageWindow::onUpdImage),
FXMAPFUNC(SEL_UPDATE, ImageWindow::ID_CROP, ImageWindow::onUpdImage),
+ FXMAPFUNC(SEL_KEYPRESS, 0, ImageWindow::onKey)
};
+ long ImageWindow::onKey(FXObject*,FXSelector,void*)
+ {
+ return 0;
+ }
+
// Object implementation
FXIMPLEMENT(ImageWindow,FXMainWindow,ImageWindowMap,ARRAYNUMBER(ImageWindowMap))
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users