>Thank you very much.
>Maybe when GTOS2 is used then screen is not refreshed before crach.
>Do you have the same results when you redirect application output
>to file? f.e.:
> pba.exe > out.log
Results included in message were redirected to saleos2.txt, salecgi.txt,
salestd.txt
In screen or redirected are same
>It looks that the problem is caused by reading keyboard input from
>second threads. You can make test to confirm it by replacing
>hb_gt_os2_ReadKey() body with code from hb_gt_cgi_ReadKey().
>If final application linked with such GTOS2 will work correctly
>then we will have to look closer on hb_gt_os2_ReadKey() internals.
>In such case we should also check other GT functions. Probably
>testing mttest*.prg files will be enough.
Entire results are below
It work correctly using hb_gt_cgi_ReadKey() as hb_gt_os2_ReadKey()
I insist, it seem to fail trying to execute hb_gt_os2_ReadKey(), or
maybe is executed but screen is not refreshed with tracing labels on it
I was catching and error DISAPPEAR applying in hb_gt_os2_ReadKey():
/* KbdCharIn( s_key, IO_NOWAIT, ( HKBD ) * s_hk ); */
As you said, fail reading keyboard input except thread 1 :-)
... and screen/output is not updated ?
But in hb_gt_std_ReadKey() does not exist KbdCharIn() and fail
May be due platform/compilers cases ?
#elif defined( __WATCOMC__ )
if( pGTSTD->fStdinConsole )
{
if( kbhit() )
{
ch = getch();
if( ( ch == 0 || ch == 224 ) && kbhit() )
{
/* It was a function key lead-in code, so read the actual
function key and then offset it by 256 */
ch = getch() + 256;
}
ch = hb_gt_dos_keyCodeTranslate( ch );
if( ch > 0 && ch <= 255 )
ch = pGTSTD->keyTransTbl[ ch ];
}
}
else if( !eof( pGTSTD->hStdin ) )
{
BYTE bChar;
if( read( pGTSTD->hStdin, &bChar, 1 ) == 1 )
ch = pGTSTD->keyTransTbl[ bChar ];
}
#else
{
int TODO; /* TODO: */
}
#endif
David Macias
_hb_gettid()
TID=1
1. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=1
_hb_gettid()
TID=1
2. hb_threadMutexLock()
2. hb_inkeyPoll()
3. hb_inkeyPoll()
1. hb_gt_def_InkeyPoll()
2. hb_gt_def_InkeyPoll()
1. hb_gt_def_InkeyPollDo()
0. hb_gt_cgi_ReadKey() <-------
2. hb_gt_def_InkeyPollDo()
3. hb_gt_def_InkeyPollDo()
4. hb_gt_def_InkeyPollDo()
3. hb_gt_def_InkeyPoll()
4. hb_inkeyPoll()
_hb_gettid()
TID=1
5. hb_inkeyPoll()
6. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=1
_hb_gettid()
TID=1
2. hb_threadMutexLock()
_hb_gettid()
TID=1
1. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=2
_hb_gettid()
TID=2
2. hb_threadMutexLock()
2. hb_inkeyPoll()
3. hb_inkeyPoll()
1. hb_gt_def_InkeyPoll()
2. hb_gt_def_InkeyPoll()
1. hb_gt_def_InkeyPollDo()
0. hb_gt_cgi_ReadKey() <-------
2. hb_gt_def_InkeyPollDo()
3. hb_gt_def_InkeyPollDo()
4. hb_gt_def_InkeyPollDo()
3. hb_gt_def_InkeyPoll()
4. hb_inkeyPoll()
_hb_gettid()
TID=2
5. hb_inkeyPoll()
6. hb_inkeyPoll()
1. hb_threadMutexLock()
_hb_gettid()
TID=2
_hb_gettid()
TID=2
2. hb_threadMutexLock()
_hb_gettid()
TID=2
_hb_gettid()
TID=2
_hb_gettid()
TID=2
_hb_gettid()
TID=2
1. hb_threadMutexLock()
_hb_gettid()
TID=1
_hb_gettid()
TID=1
2. hb_threadMutexLock()
_hb_gettid()
TID=1
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour