FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour 'N' appears when spacebar is pressed
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
'N' appears when spacebar is pressed
Posted: Mon Jul 18, 2011 05:56 AM
Guys, any of you had this happen to you? When you press spacebar, instead of a blank space your get displays 'N' instead. Running fwh\samples\testget.prg and testget6.prg doesn't give me that problem though.




Any idea on how to go about troubleshooting this is also appreciated.

Using FWH11.6+Harbour+BCC5.82
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: 'N' appears when spacebar is pressed
Posted: Mon Jul 18, 2011 09:12 AM

The next step I did to try to determine the source of the problem:
i. Linked-in tget.prg from fwh\source and insert OutputDebugString() at line 1135.
ii. Compile with harbour binary downloaded from http://code.google.com/p/harbour-and-xh ... p&can=2&q=

Turns out the nKey value here (::KeyChar()) is already 78 not 32. What's next to check?

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: 'N' appears when spacebar is pressed
Posted: Tue Jul 19, 2011 06:52 AM

Hua,

Could you provide a small example to reproduce it here ? thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: 'N' appears when spacebar is pressed
Posted: Thu Jul 21, 2011 03:37 AM

Strange, compiling using xHarbour makes this specific problem goes away. Unfortunately it also means the comeback of some bugs that have been resolved so can't stick to it.

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: 'N' appears when spacebar is pressed
Posted: Fri Jul 22, 2011 01:10 AM

Hua,

have you checked that you are not linking a modified Class TGet ?

Could you provide a small example ? thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: 'N' appears when spacebar is pressed
Posted: Fri Jul 22, 2011 02:03 AM

Attempts to create a reduced-self contain example so far failed Antonio. The tget.prg was taken directly from fwh\source. I'll give a try again.

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 284
Joined: Mon Oct 24, 2005 08:04 PM
Re: 'N' appears when spacebar is pressed
Posted: Fri Jul 22, 2011 05:22 PM
Hua:

hua wrote:Strange, compiling using xHarbour makes this specific problem goes away. Unfortunately it also means the comeback of some bugs that have been resolved so can't stick to it.


What bugs are you referring to?

Randal
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: 'N' appears when spacebar is pressed
Posted: Mon Oct 03, 2011 10:16 AM
Randal wrote:What bugs are you referring to?


The xHarbour bug is some commands that are supposed to observe SET DEFAULT TO didn't. There was also another bug I reported regarding a zip-related function. All were submitted to the bug reporter. After monitoring them for a while and seeing that they weren't resolved I just forgotten about them
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 116
Joined: Thu Oct 13, 2005 05:14 PM
Re: 'N' appears when spacebar is pressed
Posted: Tue Oct 04, 2011 12:08 PM

I had the same problem occasionally (not only N but also other chars). It seems a memory problem because I solved it calling some hb_gcall() in the code.
In xHarbour I never had this behavior.

Regards,
Roberto Parisi

Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: 'N' appears when spacebar is pressed
Posted: Tue Oct 04, 2011 12:36 PM
I also don't have this problem in xHarbour but compiling my module in Harbour solved some other problems for me. To be fair, my xHarbour version is fairly outdated.

So far I manage to recreate the problem when dynamically loading keylib32.dll (a dll from SoftwareKey). Still chopping my test code further so could get a reduced self-contained sample.

Thanks for the tip about hb_gcall().

Anyone has a snippet on how to use the native hb_libload() in Harbour? Seems it's expecting 2 parameters instead of 1
Code (fw): Select all Collapse
hb_libLoad( PHB_ITEM pLibName, PHB_ITEM pArgs )
. I was wondering whether it would help due to this note in Harbour's changelog
Code (fw): Select all Collapse
2008-10-13 20:21 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
  * harbour/source/rdd/wacore.c
    ; updated comments about Xbase++ behavior in dbRelease()

  * harbour/include/hbvm.h
  * harbour/source/vm/hvm.c
  * harbour/source/vm/dynlibhb.c
  * harbour/source/vm/runner.c
    ! added MT protection for HB_LIBLOAD()/HB_LIBFREE() and
      HB_HRBLOAD()/HB_HRBUNLOAD(). Please remember that you should
      not use any external LoadLibrary() functions because they are
      not protected for clean PCODE modules loading/unloading even
      in ST mode. Using them can cause HVM internal structure corruption.
      If we have such functions in contrib then they should be redirected
      to our HVM ones.
      There is still one problem in MT mode which has to be resolved yet.
      When dynamic library containing PCODE using static variables
      is loaded 1-st time then it will force resizing of internal array
      with static variables. If in exactly the same moment some other
      thread operates on static variable then it may cause corruption.
      To resolve this problem we will have to divide continuous memory
      block common for all modules where we store all static variables
      into separated blocks bound with each PCODE module (symbol table).
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion