PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → [WD5.5] iCreateFont(...)   problems
[WD5.5] iCreateFont(...) problems
Started by Peter van Vuuren, Feb., 09 2004 3:27 PM - 4 replies
Posted on February, 09 2004 - 3:27 PM
Hi,
On some PC's (W2K, XP) i've got a problem with the iCreateFont() function
The OS gives the next message:
The instruction at "0x........" referenced memory at "0x0000....".
The memory could not be "written"
Or the program halts without giving any error message.
Tested, it seems to be only the case when printing to a not-default printer
(any kind of printer; local, network...). It is not the case on every W2K/XP PC.
Any ideas ?
Peter
Posted on February, 09 2004 - 4:17 PM
Hi Peter,
Suspicious!
I'd been using iCreateFont() very heavy in windev5.5 on W2K and XP with
different printers (including color laser printer) on LAN with no problem.
I could guess this might be the cause of the printer driver or font driver
problem or the bad RAM chips.
I personally don't think that iCreateFont() has any bugs regarding this case.
Of course, anything could happen, who knows.
That's it for now and seems not much help to you, sorry!
King

Hi,
On some PC's (W2K, XP) i've got a problem with the iCreateFont() function
The OS gives the next message:
The instruction at "0x........" referenced memory at "0x0000....".
The memory could not be "written"
Or the program halts without giving any error message.
Tested, it seems to be only the case when printing to a not-default printer
(any kind of printer; local, network...). It is not the case on every W2K/XP PC.
Any ideas ?
Peter
Posted on February, 09 2004 - 4:40 PM
Hi Peter,
fontnr is int = icreateFont(-1,-10,inormal,"Arial",Inoir) to be sure you don't use a fontnr that is allready in use
also check if the font is available on those machines
just my 2 cents
Hi,
On some PC's (W2K, XP) i've got a problem with the iCreateFont() function
The OS gives the next message:
The instruction at "0x........" referenced memory at "0x0000....".
The memory could not be "written"
Or the program halts without giving any error message.
Tested, it seems to be only the case when printing to a not-default printer
(any kind of printer; local, network...). It is not the case on every W2K/XP PC.
Any ideas ?
Peter
Posted on February, 09 2004 - 9:22 PM
G'day Peter
As a workaround could you check if the chosen printer is the Windows default printer and if not, set it as the default with iconfigure() before printing and then restore the correct default printer when printing has finished.
Regards
Al
Posted on February, 10 2004 - 11:35 AM
Hi,
The error happens in a statistics program full of things like dynamic
compilation , memoryzones, redimensioning of dynamic arrays etc so the origin
could be anywhere but it was always the "iCreateFont()" function who started the
error.
Anyway , i cleaned a little bit the code, used the tip from Al (thnx) and it
does seem to help. Can't recreate the error for the moment.
Peter