Página 1 de 1

Print problem

Publicado: Mar Mar 07, 2006 10:08 am
por Ingo Junge-Herrmann

Hi,
after selecting the printer I'm converting the array with the print positions
from cm to pixels with the following code
WITH OBJECT Printer:oCanvas
:oFont:=oFont
:nMapMode:=mmHIMETRICS
ProcessMessages()
For nX:=1 TO LEN(aPos)
aPix[nX]:=:PointToPixels((aPos[nX,2]*100)+nLeft,(aPos[nX,1]* 100)+nTop)
ProcessMessages()
next
:nMapMode:=mmPIXELS
END WITH
aPos is STATIC
aPix is LOCAL
Sometimes - not always - I got the GPF as shown in the picture and the following
LogDebug lines
#1: HEAP[mwin.exe]:
#2: Heap block at 0019F0B0 modified at 0019F194 past requested size of dc
#3: HEAP[mwin.exe]:
#4: Invalid Address specified to RtlFreeHeap( 00150000, 0019F0B8 )
#5: Heap corruption detected at 0019F1B0
#6: Heap corruption detected at 0019F1B0
#7: Heap corruption detected at 0019F1B0
#8: HEAP[mwin.exe]:
#9: HEAP: Free Heap block 19f1a8 modified at 19f1b8 after it was freed
#10: Heap corruption detected at 0019F1B0
#11: HEAP[mwin.exe]:
#12: HEAP: Free Heap block 19f1a8 modified at 19f1b8 after it was freed
#13: Heap corruption detected at 0019F1B0
#14: HEAP[mwin.exe]:
#15: HEAP: Free Heap block 19f1a8 modified at 19f1b8 after it was freed
#16: Heap corruption detected at 0019F1B0
#17: HEAP[mwin.exe]:
#18: HEAP: Free Heap block 19f1a8 modified at 19f1b8 after it was freed
#19: Heap corruption detected at 0019F1B0
#20: HEAP[mwin.exe]:
#21: HEAP: Free Heap block 19f1a8 modified at 19f1b8 after it was freed
#22: Heap corruption detected at 0019F1B0
#23: HEAP[mwin.exe]:
#24: HEAP: Free Heap block 19f1a8 modified at 19f1b8 after it was freed
#25: Heap corruption detected at 0019F1B0
#26: Heap corruption detected at 0019F1B0
#27: Heap corruption detected at 0019F1B0
#28: Heap corruption detected at 0019F1B0
#29: Heap corruption detected at 0019F1B0
#30: HEAP[mwin.exe]:
#31: HEAP: Free Heap block 19f1a8 modified at 19f1b8 after it was freed
#32: Heap corruption detected at 0019F1B0
#33: HEAP[mwin.exe]:
#34: HEAP: Free Heap block 19f1a8 modified at 19f1b8 after it was freed
#35: Heap corruption detected at 0019F1B0
#36: HEAP[mwin.exe]:
#37: HEAP: Free Heap block 19f1a8 modified at 19f1b8 after it was freed
Any idea what's wrong with my code?
Thanks in advance
Ingo
--

Attached files error.zip (5.9 KB)Â