Hi Przemek,
I'm sorry but I'm not able to replicate it. The only one problem
I finally created was after compiling hbdebug library with -b
parameter. Otherwise it works as expected.
Just a few questions. Maybe I'll guess what's wrong.
Is it necessary to declare TESTCALL() inside #pragma BEGINDUMP
to reproduce the problem?
No. I can just replace it with a simple "FUNC TESTCALL" line.
Just tried it now, sorry for not reducing further.
Do you have to compile test.prg with -b switch or problem can be
also replicated if you add to this code:
REQUEST __DBGENTRY
and compile it without -b?
Without -b + above command, it does work okay.
To me the culprit seems to be the "INITLINES" logic.
If I disable line numbers with -l, it will start to
work with MSVS. But not with BCC.
Is -gc3 necessary to compile test.prg or it GPFs in both modes?
Sorry I didn't write this, but tested both and
-gc mode didn't affect results.
Can you recreate this problem with other C compiler?
With BCC582 compiled with -DHB_NO_DEBUG -DHB_FM_STATISTICS_OFF -gc3,
clean build from local sandbox with no pending updates.
Same test.prg, compiled with 'harbour -n' base command:
- OK : ST
- OK : ST + -b
- OK : ST + -b -l
- OK : ST + REQUEST
- OK : ST + REQUEST + -b
- OK : ST + REQUEST + -b -l
- OK : MT
- ERR: MT + -b
- ERR: MT + -b -l
- ERR: MT + REQUEST
- ERR: MT + REQUEST + -b
- ERR: MT + REQUEST + -b -l
ERR means GPF, plus when Harbour rebuilt with FM STATS ON,
it has shown this line too:
'Called from (_INITSTATICS00013)(0) in src\getsys.prg'
MSVC2008 with similar switches except FM STATS is now ON:
- OK : ST
- OK : ST + -b
- OK : ST + -b -l
- OK : ST + REQUEST
- OK : ST + REQUEST + -b
- OK : ST + REQUEST + -b -l
- OK : MT
- ERR: MT + -b
- OK : MT + -b -l
- OK : MT + REQUEST
- ERR: MT + REQUEST + -b
- OK : MT + REQUEST + -b -l
ERR means this (but my real app also GPFed after this point):
---
Error BASE/1301 Memory object destructor failure: Reference to freed
block
----------------------------------------
Total memory allocated: 194097 bytes (1593 block(s))
Warning, memory allocated but not released: 32 bytes (1 block(s))
source\vm\fm.c:811: HB_TR_ERROR Block 1 (size 28) (_INITLINES)(0),
"........"
---
Brgds,
Viktor
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour