lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] "'SetFocus' failed" in automated GUI test


From: Vadim Zeitlin
Subject: Re: [lmi] "'SetFocus' failed" in automated GUI test
Date: Thu, 20 Oct 2016 01:04:48 +0200

On Wed, 19 Oct 2016 21:50:00 +0000 Greg Chicares <address@hidden> wrote:

GC> To reproduce:
GC>   cd /opt/lmi/bin
GC>   ./wx_test.exe --data_path=/opt/lmi/data --distribution >eraseme 2>&1
GC> Symptom: output file begins:
GC> 
GC> In file ../src/msw/window.cpp at line 558: 'SetFocus' failed with error 
0x00000057 (the parameter is incorrect.).
GC> In file ../src/msw/window.cpp at line 558: 'SetFocus' failed with error 
0x00000057 (the parameter is incorrect.).
GC> NOTE: starting the test suite
GC> about_dialog_version: started
GC> About dialog version string is "20160809T1255Z".
GC> 
GC> where the first two lines are unexpected.

 They're indeed unexpected, but I do know that these messages happen from
time to time. Unfortunately I could never really find time to debug where
do they come from, exactly, nor even whether they are always due to the
same underlying bug or different ones. All I can say is that these errors
shouldn't be catastrophic, but they do indicate that the focus couldn't be
set as intended, which is potentially worrisome.

GC> I cannot reproduce this either with msw-xp in a VM or with 'wine' in
GC> my cross-building chroot. However, Kim observes it, reproducibly, in
GC> native msw-7. She's certain that she is not touching the keyboard or
GC> mouse during the test. She does NOT observe the anomaly if she adds
GC> '--ash_nazg' to the command line.

 I'm almost always testing with this option, so I guess this explains why I
hadn't noticed them before.

GC> I'm trying to imagine how this can occur. It looks like it must be
GC> happening here:
GC> 
GC> void SkeletonTest::RunTheTests()
GC> {
GC>     wxWindow* const mainWin = GetTopWindow();
GC> [Exit if that is NULL...]
GC> 
GC>     // Close any initially opened dialogs (e.g. "About" dialog shown unless 
a
GC>     // special command line option is specified).
GC> [The anomaly is not seen with '--ash_nazg', which suppresses that
GC> "About" dialog...]
GC> 
GC>     mainWin->SetFocus();
GC>     wxPuts("NOTE: starting the test suite");
GC> [It's plausible to guess that this is the failing SetFocus() call.

 One thing we could do easily would be to show the window class/name in the
error message, which could be used to confirm this guess.

GC> But 'mainWin' was already tested for validity. Might the "About"
GC> dialog be what GetTopWindow() chooses? only with msw7, not xp?]

 I don't think so, Skeleton::OnInit() explicitly with the main frame
pointer and so this is what wxApp::GetTopWindow() should return.

 But while this means I don't believe the explanation above is correct, I'm
afraid I can't provide another one without spending time to debug this.
Please let me know if I should do it.

 Thanks,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]