[Insight-users] runtime error in InsightSnap
William A. Hoffman
billlist at nycap.rr.com
Fri Jul 21 15:33:18 EDT 2006
Better late than never, but I just ran into this bug. I have a fix.
Change fltk screen_xywh.cxx to have this:
typedef BOOL (WINAPI *fl_edm_func)(HDC, LPCRECT, MONITORENUMPROC, LPARAM);
// BOOL GetMonitorInfo(HMONITOR, LPMONITORINFO)
typedef BOOL (WINAPI *fl_gmi_func)(HMONITOR, LPMONITORINFO);
Added WINAPI. That fixes the problem.
-Bill
At 02:24 AM 5/22/2006, Niloofar Gheissari wrote:
>Hi,
>
>I am on Windows XP and I have ITK Applications version 2.6.0, ITK Toolkit version 2.0.1, VTK version 5.0.0 and FLTK version 1.1.7 . I compile InsightSnap without any problem but when I try to run the exe file I receive a runtime error which says
>"Debug Error:
>In file fltk-1.1.7\src\screen_xywh.cxx line 59 Runtime Check Failure #0 The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention."
>
>I tried to debug it with no success. But if we look at screen_xywh.cxx
>then the problematic function is here:
>
>static BOOL CALLBACK screen_cb(HMONITOR mon, HDC, LPRECT, LPARAM) {
>if (num_screens >= 16) return TRUE;
>
>MONITORINFO mi;
>mi.cbSize = sizeof(mi);
>
>// GetMonitorInfo(mon, &mi);
>fl_gmi(mon, &mi);
>
>screens[num_screens] = mi.rcWork;
>num_screens ++;
>return TRUE;
>}
>
>I have no difficulty with compiling ITK and VTK or using VTK/ITK in my code but I found SNAP very nasty. Does any one knows how to solve this problem? Many thanks.
>
>regards,
>
>Niloofar
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list