DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2101
Version: 1.3-current


I have come across an intermittent problem in FLTK 1.3 (from the latest
svn) for Win32. I recently upgraded from 1.2.x (yes, the dead release)
where the problem didn't appear.

Sometimes (quite often) when redrawing an Fl_Output, the fl_set_spot
function, called from Fl_Input_::drawtext or Fl_Input_::handletext fails
to find the Fl_Window. That is, the fl_find function can't find the window
with the specified fl_msg.hwnd and the result is an unhandled exception
when w becomes NULL. It usually happens when setting the text (a string of
arbitrary size or even a hard-coded empty string) of a newly created
Fl_Output, calling show on a new window containing the Fl_Output and
looping an Fl::wait. Or when updating the text (value) of an existing
Fl_Output and redrawing.

The message in the fl_msg struct is 275 which translates to WM_TIMER. I
have tried to comment out using this timer message from FLTK but it
doesn't make a difference. Unfortunately I haven't been able to produce a
small example showing the problem, it only appears in our application. I
have however tried to simplify the application by disabling the use of
threads and timers.

I don't know if this helps, but the following is a callstack from my
colleague's Visual Studio 2008 Express, when the result (w) from fl_find
is NULL in fl_set_spot. The same happens with my own Visual C++ .NET 2003:

remo3d_debug.exe!Fl_Widget::parent()  Line 205 + 0x26 bytes    C++
remo3d_debug.exe!fl_set_spot(int font=0, int size=11, int x=15, int y=20,
Fl_Window * w=0x00000000, int h=71)  Line 235 + 0x8 bytes    C++
remo3d_debug.exe!Fl_Input_::handletext(int event=6, int X=15, int Y=20,
int W=610, int H=71)  Line 797 + 0x3b bytes    C++
remo3d_debug.exe!Fl_Input::handle(int event=6)  Line 466    C++
remo3d_debug.exe!Fl_Widget::take_focus()  Line 128 + 0xf bytes    C++
remo3d_debug.exe!Fl_Group::handle(int event=6)  Line 156 + 0x34 bytes   
C++
remo3d_debug.exe!Fl_Widget::take_focus()  Line 128 + 0xf bytes    C++
remo3d_debug.exe!Fl_Group::handle(int event=6)  Line 156 + 0x34 bytes   
C++
remo3d_debug.exe!Fl_Window::handle(int ev=6)  Line 1286    C++
remo3d_debug.exe!EventHandler::handle(int event=6)  Line 107 + 0x19 bytes 
  C++
remo3d_debug.exe!Fl_Widget::take_focus()  Line 128 + 0xf bytes    C++
remo3d_debug.exe!EventHandler::focusUpdate(void * arg=0x031a0d80)  Line 96
   C++
remo3d_debug.exe!s_TimerProc(HWND__ * hwnd=0x00120766, unsigned int
msg=275, unsigned int wParam=1, long lParam=0)  Line 1535 + 0x7 bytes   
C++
    user32.dll!7e368734()         [Frames below may be incorrect and/or
missing, no symbols loaded for user32.dll]        user32.dll!7e368816()   
     user32.dll!7e3689cd()         user32.dll!7e369402()        
user32.dll!7e368a10()     remo3d_debug.exe!fl_wait(double
time_to_wait=0.00000000000000000)  Line 391    C++
remo3d_debug.exe!Fl::wait(double time_to_wait=1.0000000000000000e+020) 
Line 369 + 0xe bytes    C++
remo3d_debug.exe!Fl::wait()  Line 497 + 0x11 bytes    C++
remo3d_debug.exe!GuiCallbacks::showMessage(const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
msg="test", const GuiCallbacks::MessageType &
messageType=MESSAGE_TYPE_NONE)  Line 3708 + 0x5 bytes    C++
remo3d_debug.exe!GuiCallbacks::info(const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
msg="test", const bool & force=false, const GuiCallbacks::MessageType &
messageType=MESSAGE_TYPE_NONE)  Line 3439    C++
remo3d_debug.exe!MessageProxy::info(const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
msg="test", const bool & force=false, const GuiCallbacks::MessageType &
messageType=MESSAGE_TYPE_NONE)  Line 23    C++
remo3d_debug.exe!main(int argc=1, char * * argv=0x0318b3b0)  Line 241 +
0x53 bytes    C++
remo3d_debug.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ *
hPrevInstance=0x00000000, char * lpCmdLine=0x00151f1c, int nCmdShow=1) 
Line 128 + 0x12 bytes    C
remo3d_debug.exe!__tmainCRTStartup()  Line 578 + 0x35 bytes    C
remo3d_debug.exe!WinMainCRTStartup()  Line 403    C
    kernel32.dll!7c817067()

I'm sorry I can't show the problem any clearer, as I can't reproduce it in
a separate application.

/Andreas Ekstrand


Link: http://www.fltk.org/str.php?L2101
Version: 1.3-current

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to