Problem in errsysw.prg in FWH 10.9

Problem in errsysw.prg in FWH 10.9

Postby driessen » Mon Oct 17, 2011 8: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: Select all  Expand view
  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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in errsysw.prg in FWH 10.9

Postby Antonio Linares » Mon Oct 17, 2011 8:40 pm

Michel,

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

The current code for it is:
Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problem in errsysw.prg in FWH 10.9

Postby driessen » Tue Oct 18, 2011 8: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in errsysw.prg in FWH 10.9

Postby Antonio Linares » Tue Oct 18, 2011 9: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: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problem in errsysw.prg in FWH 10.9

Postby driessen » Tue Oct 18, 2011 9: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in errsysw.prg in FWH 10.9

Postby Antonio Linares » Wed Oct 19, 2011 7: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: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problem in errsysw.prg in FWH 10.9

Postby driessen » Wed Oct 19, 2011 7: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: Select all  Expand view
#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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in errsysw.prg in FWH 10.9

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problem in errsysw.prg in FWH 10.9

Postby driessen » Thu Oct 20, 2011 7:16 am

Antonio,

Problem solved. Thank you very much.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in errsysw.prg in FWH 10.9

Postby Antonio Linares » Thu Oct 20, 2011 9:16 am

Michel,

No more GPFs ? :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Problem in errsysw.prg in FWH 10.9

Postby driessen » Thu Oct 20, 2011 6:31 pm

Antonio,

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

Thanks for your help
Last edited by driessen on Thu Oct 20, 2011 6:33 pm, edited 1 time in total.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: Problem in errsysw.prg in FWH 10.9

Postby Antonio Linares » Thu Oct 20, 2011 6:34 pm

Michel,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 42 guests