FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Abnormal program termination
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM

Abnormal program termination

Posted: Mon Jan 11, 2016 09:20 PM
Antonio?
The error is present only when using Msgrun(...) in the bAction from the timer!
This test can you show the problem! Please type in get any character and wait for reaction.
Antonio, in some rare cases the program terminates not but in the get suddenly comes chinese letters!
(Unicode?)
Code (fw): Select all Collapse
function abnormal(oWnd)
local oDlg, oTimer , oSay , cSay := " " , oGet , cGet := space(10) , cBuffer
    DEFINE TIMER oTimer INTERVAL 1000 OF oWnd
    DEFINE DIALOG oDlg OF oWnd FONT oFont_normal
    @ 1, 2 GET oGet VAR cGet
        oGet:bPostKey := {|x,buffer|if(empty(buffer),NIL,;
        (oTimer:bAction:={||NIL},;
        cBuffer := buffer,;
        oTimer:bAction:={||msgrun("Test","Test",{||(cSay := cBuffer, oSay:refresh(),oTimer:deactivate())})},; 
        oTimer:activate()))}
        @ 2, 2 SAY oSay PROMPT cSay SIZE 50,15
    @ 3,2 SBUTTON PROMPT "&End" OF oDlg SIZE 50,15 ACTION oDlg:End()
    ACTIVATE DIALOG oDlg CENTERED
return nil
I have tested on WIN 10 and XP!
Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM

Re: Abnormal program termination

Posted: Tue Jan 12, 2016 03:07 PM

Antonio, i found the following:
If at begin of the app FW_SetUnicode( .T. ), then the error goes away! In the source of msgrun() you are switch to FW_SetUnicode( .T. ) and return to the old status. This could be the reason!???

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Abnormal program termination

Posted: Wed Jan 13, 2016 11:41 AM

Günther,

Yes, it could be related.

In FWH we have done a tremendous work to support unicode and non unicode at the same time. Tipically an app is unicode or it is not.

A FWH app can be unicode and non unicode at the same time, thats why I think it may be related.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM

Re: Abnormal program termination

Posted: Wed Jan 13, 2016 12:26 PM

Antonio, for now i link a msgrun.prg in with commented calls to FW_setunicode().

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: Abnormal program termination

Posted: Sun Jan 17, 2016 08:56 PM

Thanks.
We commented out too from the next release.
Switching of Unicode setting during runtime is not yet supported though we originally wanted to.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion