Page 1 of 1

Error System Stopped Working

Posted: Thu Jan 12, 2012 6:18 pm
by TimStone
I've recently encountered this problem with my application, and it puzzles me.

Now, when a runtime error occurs, the Windows error tells me that a problem has occured and the program has stopped working.

These should be generating FW / xHarbour errors.

I'm using the same xHarbour ( .com ) / xBuilder that I have for the past year, and FW 11.09.

Can anyone suggest where I should look to see why my error system no longer works ?

Tim

Re: Error System Stopped Working

Posted: Thu Jan 12, 2012 8:24 pm
by reinaldocrespo
Hi Tim;

Could it be that what you are getting is a gpf?

A way to test is to manually introduce semantics error such as;

MsgInfo( nonexitant->field1 ) //where that work area is not in use.

or

local cText := "some text"
if cText
endif

That should compile fine yet it would cause the fw error handler to popup.


Reinaldo.

Re: Error System Stopped Working

Posted: Thu Jan 12, 2012 8:47 pm
by TimStone
The following:

cText := "Trash"
IF cText > 09
MsgInfo( "Dump" )
ENDIF

Posts a Win 7 error, not a FWH error.

This has been consistent for the past few weeks ...

Tim

Re: Error System Stopped Working

Posted: Fri Jan 13, 2012 11:41 am
by PeterHarmes
Tim,

Check errsysw.prg and remove the line that reports nExtMem()

Not sure if there is a work around for this yet.

Regards,

Pete

Re: Error System Stopped Working

Posted: Sat Jan 14, 2012 12:49 am
by TimStone
Thank you. That worked.

Tim

Re: Error System Stopped Working

Posted: Sat Feb 04, 2012 2:22 pm
by frose
Antonio,

not fixed in FWH 1201!

Re: Error System Stopped Working

Posted: Sat Feb 04, 2012 6:22 pm
by Antonio Linares
viewtopic.php?p=119572#p119572

was changed to:

viewtopic.php?p=119574#p119574

We are just calling a Windows API function. Strange that it fails... :-(

Re: Error System Stopped Working

Posted: Sat Feb 04, 2012 6:28 pm
by Antonio Linares
My mistake. This is the right code and we missed to include it in FWH 12.01:

Code: Select all | Expand

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

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

   GlobalMemoryStatusEx( &mst );

   hb_retnll( mst.ullTotalPhys );
}


Tim could you please check it this way in your code that was crashing ? thanks :-)

Re: Error System Stopped Working

Posted: Sun Feb 05, 2012 12:55 am
by frose
Antonio,

oh, complete new error handler :P:

Image

Re: Error System Stopped Working

Posted: Mon Feb 06, 2012 7:45 pm
by TimStone
Antonio,

I commented out that section based on the previous post. I do not see that function in the error prg file.

Tim

Re: Error System Stopped Working

Posted: Mon Feb 06, 2012 7:50 pm
by Antonio Linares
Tim,

That function source code is inside FWH\source\winapi\mem.c

Anyhow, it will be changed in FWH 12.02

Re: Error System Stopped Working

Posted: Mon Feb 06, 2012 7:59 pm
by TimStone
I see there is an alternative errorsw_.prg in the source code. How would I specify that one for my program to use instead of the default, using the library. I realize I could link it in before the libraries ....

Re: Error System Stopped Working

Posted: Mon Feb 06, 2012 10:26 pm
by Antonio Linares
Tim,

Yes, you could compile it and link it as another OBJ of your app

Re: Error System Stopped Working

Posted: Wed Jan 30, 2013 11:30 am
by Randal
I just upgraded to latest xHarbour and FWH 12.12 and I'm have this same problem.

<<Check errsysw.prg and remove the line that reports nExtMem()>>

I did this and it fixed the problem however, I'm wondering why I need to do this or if I should be doing something else.

Thanks,
Randal

Re: Error System Stopped Working

Posted: Wed Jan 30, 2013 3:12 pm
by Antonio Linares
Randal,

Please build this app and let me know if it keeps GPFing, thanks

randal.prg

Code: Select all | Expand

#include "FiveWin.ch"

function Main()

   nExtMem()
   MsgInfo( nExtMem() )

return nil

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

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

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

   GlobalMemoryStatusEx( &mst );

   hb_retnll( mst.ullTotalPhys );
}


#pragma ENDDUMP