In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Print problem

Xailer professional forum in English
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

Print problem

Mensaje 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)Â
Responder