|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
jalih
Joined: 30 Jul 2012 Posts: 196
|
Posted: Wed Feb 26, 2014 9:29 am Post subject: Re: |
|
|
PaulLaidler wrote: |
Does your test program use the original sample but with a corrected interface for MessageBox? |
Hi Paul,
I haven't actually run any test program, as I don't have Windows 8.1 and hardware supporting touch or stylus input.
I am just guessing, that this is a Windows touchscreen drivers issue based on the callstack info provided. My guess is that floating point state is not cleaned properly in the touchscreen drivers and FTN95 program sees the error flag and thinks that it has done something wrong.
I know this is a bad practice but as a temporary hack, could the programs exception handler just ignore the error and continue program execution? |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2816 Location: South Pole, Antarctica
|
Posted: Wed Feb 26, 2014 12:55 pm Post subject: |
|
|
By the way (this may not be directly related to this subj post), Jalih, do you think that this is same cause which crashed your parallelization method when usually unnoticeable underflow took place? |
|
Back to top |
|
|
FLEXPLAN3D
Joined: 25 Feb 2011 Posts: 27
|
|
Back to top |
|
|
FLEXPLAN3D
Joined: 25 Feb 2011 Posts: 27
|
Posted: Mon Mar 10, 2014 10:05 am Post subject: surfae pro tablet |
|
|
I have found that if I add a 'getmessage' loop to the simple menu program which dispatches the message to the window procedure then the menu works fine with touch and stylus.
Have you any thoughts on why this should be so.
Code: |
include <windows.ins>
external t
integer t,msg(20)
common msg
I=WINIO@('%ca[A TEST WINDOW FOR TOUCH MENU]&')
I=WINIO@('%sz&',1000,500)
I=WINIO@('%sp&',200,200)
i=winio@('%mn[Alpha,Beta[beta1,|,beta2,beta3],Gamma]&',t,t,t,t,t)
i=winio@('%lw',ictrl)
1 if(getmessage(msg,0,0,0))then
if(msg(2).eq.WM_COMMAND)call messagebox
* (0,'send message to window proc','wm_command',0)
call dispatchmessage(msg)
if(ictrl.ne.0)goto 1
endif
STOP
END
integer function t()
include <windows.ins>
integer hwnd,wparam,lparam,msg(20)
character str*512
common msg
write(str,*)'hwnd=',msg(1),
* ' wparam=',msg(3),' lparam=',msg(4)
call messagebox(0,str,'menu',0)
t=1
return
end |
|
|
Back to top |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Mon Mar 10, 2014 1:21 pm Post subject: |
|
|
Try this before the first executable statement
Code: | external ifloat_callback
I=TRAP_EXCEPTION@(FLT_OVERFLOW, ifloat_callback)
] |
and
Create a dummy callback
Code: | integer*4 function ifloat_callback()
ifloat_callback = 1
print *,'Floating overflow'
end
|
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Mon Mar 10, 2014 1:46 pm Post subject: |
|
|
Flexpland3d...
Although this is probably a Microsoft bug, it may be possible to provide a fix within ClearWin+.
Also I may be able to locate the point of failure within ClearWin+ provided you have a trace back that takes you back to a call from a salflibc.dll function. I would need the source code of your program together with details of the trace back with the offset into the final ClearWin+ function call.
At the moment it looks like the failure occurs within the ClearWin+ version of the message loop but this involves a vast amount of code. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Apr 02, 2014 2:34 pm Post subject: |
|
|
Your program works OK for me under Windows 8. |
|
Back to top |
|
|
FLEXPLAN3D
Joined: 25 Feb 2011 Posts: 27
|
Posted: Wed Apr 02, 2014 7:32 pm Post subject: |
|
|
Paul the problem is not to do with FTN95 or Clearwin as the simple C program below crashes when I try to move the window with pen or touch. So perhaps it is as you say a Microsoft problem, or a problem with the pen driver or a problem with SLINK
I have been unsuccessful in getting a trace back other than the one that showed ninput.dll.
I have reloaded windows 8.1 to no avail.
I have tried tracking the windows messages as they appear in the Windows Procedure - so for example when moving the window I would expect to see a WM_MOVE message. At the point I would expect to see the message the program crashes.
Here is the simple c program that crashes when trying to move the window.
It has no menu but the crash still occurs when the pen is in the Non-Client area of the window.
Code: |
#include <windows.h>
MSG Msg;
WNDCLASS wc;
DWORD WindowStyle;
HWND whandle;
LRESULT WINAPI MainWndProc( HWND, UINT, WPARAM, LPARAM );
int CALLBACK WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow);
int CALLBACK WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
{
WindowStyle = WS_OVERLAPPEDWINDOW |WS_VSCROLL |WS_HSCROLL
| WS_VISIBLE |WS_MAXIMIZE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;
wc.style = CS_VREDRAW| CS_HREDRAW ;
wc.lpfnWndProc = MainWndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = NULL; /* set by mouse movement */
wc.hbrBackground = (HBRUSH) (COLOR_WINDOW+1);;
wc.lpszMenuName = NULL ;
wc.lpszClassName = "TouchClass";
if (!RegisterClass(&wc))
MessageBox(NULL,"Unable to Register Class","touchclass",MB_OK) ;
whandle = CreateWindow(
"touchclass",
"Move window with pen test",
WindowStyle,
50,100,900,500,
NULL,
NULL,
hInstance,
NULL
);
ShowWindow(whandle, SW_SHOW);
while(GetMessage(&Msg, NULL,0,0))
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
return 0;
}
LRESULT CALLBACK MainWndProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam)
{
if(message == WM_DESTROY)
{
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hWnd,message,wParam,lParam) ;
}
|
|
|
Back to top |
|
|
FLEXPLAN3D
Joined: 25 Feb 2011 Posts: 27
|
Posted: Wed Apr 09, 2014 6:55 pm Post subject: |
|
|
Paul
Today I downloaded Update 1 for Windows 8.1 (released on 8th April 2014 -KB2919355).
All the problems I had with the pen and touch are now fixed. All is working very well.
So, Paul you were correct in suggesting the fault was a Microsoft fault.
I guess it must have been something to with the driver .
Thanks for you help |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|