FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem in errsysw.prg in FWH 10.9
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Problem in errsysw.prg in FWH 10.9
Posted: Mon Oct 17, 2011 08:16 PM
Hello,

Since I updated to FWH 10.9, a GPF occurs when an error occurs.

After analysing the problem, I found out that the GPF occurs in this sentence in ERRSYSW.PRG :
Code (fw): Select all Collapse
   cErrorLog += "   Hardware memory: " + ;
               cValToChar( Int( nExtMem() / ( 1024 * 1024 ) ) + 1 ) + ;
               " megs" + CRLF
In FWH 10.8, this GPF does not occur.

Anyone any idea what is wrong ?

Thank you very much in advance for any help.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem in errsysw.prg in FWH 10.9
Posted: Mon Oct 17, 2011 08:40 PM
Michel,

It seems as there are some random problems with function nExtMem().

The current code for it is:
Code (fw): Select all Collapse
HB_FUNC( NEXTMEM ) // --> nHardwareMemory
{
   MEMORYSTATUSEX mst;

   mst.dwLength = sizeof( MEMORYSTATUSEX );

   GlobalMemoryStatusEx( &mst );

   hb_retnll( mst.ullAvailPhys );
}


If the GPF persists, then please create a dummy function nExtMem():

function nExtMem()

return 0
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Problem in errsysw.prg in FWH 10.9
Posted: Tue Oct 18, 2011 08:41 AM

Antonio,

Thank you for answer.

Will the problem be solved in FWH 10.10?

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem in errsysw.prg in FWH 10.9
Posted: Tue Oct 18, 2011 09:31 AM
Michel,

Could you please modify function nExtMem() this way (it is located in FWH\source\winapi.mem.c) and check if the errors remain ? thanks

Code (fw): Select all Collapse
HB_FUNC( NEXTMEM ) // --> nHardwareMemory
{
   MEMORYSTATUSEX mst;

   memset( &mst, 0, sizeof( MEMORYSTATUSEX ) );
   mst.dwLength = sizeof( MEMORYSTATUSEX );

   GlobalMemoryStatusEx( &mst );

   hb_retnll( mst.ullAvailPhys );
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Problem in errsysw.prg in FWH 10.9
Posted: Tue Oct 18, 2011 09:14 PM

Antonio,

I changed mem.c, like you told me to.

I rebuild my application, but the GPF is still occuring.

But I think that the FWH-libraries have to be rebuild too, or am I wrong?

Unfortunately, I don't know how I have to do that.

But thanks anyway.

Meanwhile I put an asterisk in front of the lines which cause the problem and it's working right now.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem in errsysw.prg in FWH 10.9
Posted: Wed Oct 19, 2011 07:34 AM
Michel,

You could implement that modified function inside a #pragma BEGINDUMP #pragma ENDDUMP of one of your PRGs, so you don't have to rebuild FWH libs. To check that yours is being used simply place a trace into it:

Code (fw): Select all Collapse
HB_FUNC( NEXTMEM ) // --> nHardwareMemory
{
   MEMORYSTATUSEX mst;

   memset( &mst, 0, sizeof( MEMORYSTATUSEX ) );
   mst.dwLength = sizeof( MEMORYSTATUSEX );

   MessageBox( 0, "mine", "ok", 0 );  / Here !!!

   GlobalMemoryStatusEx( &mst );

   hb_retnll( mst.ullAvailPhys );
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Problem in errsysw.prg in FWH 10.9
Posted: Wed Oct 19, 2011 07:50 AM
Antonio,

I tried to do what you told me to do.

I added this source at the end of my first PRG :
Code (fw): Select all Collapse
#pragma BEGINDUMP

HB_FUNC( NEXTMEM ) // --> nHardwareMemory
{
   MEMORYSTATUSEX mst;

   memset( &mst, 0, sizeof( MEMORYSTATUSEX ) );
   mst.dwLength = sizeof( MEMORYSTATUSEX );

   MessageBox( 0, "mine", "ok", 0 );  / Here !!!

   GlobalMemoryStatusEx( &mst );

   hb_retnll( mst.ullAvailPhys );
}

#pragma ENDDUMP
but I got a list of errors while rebuilding :

Undeclared identifier 'MEMORYSTATUSEX"
Syntax error; found 'mst' expecting ';'
Undeclared identifier 'mst'
....

What now?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem in errsysw.prg in FWH 10.9
Posted: Wed Oct 19, 2011 12:33 PM
Michel,

Please add these lines:

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>

...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Problem in errsysw.prg in FWH 10.9
Posted: Thu Oct 20, 2011 07:16 AM

Antonio,

Problem solved. Thank you very much.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem in errsysw.prg in FWH 10.9
Posted: Thu Oct 20, 2011 09:16 AM

Michel,

No more GPFs ? :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: Problem in errsysw.prg in FWH 10.9
Posted: Thu Oct 20, 2011 06:31 PM

Antonio,

Indeed, no more GPF's. Will the problem be solved in FWH 11.10?

Thanks for your help

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem in errsysw.prg in FWH 10.9
Posted: Thu Oct 20, 2011 06:34 PM

Michel,

Yes, we will include this fix in FWH 11.10 :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion