[gs-devel] returning -1 from xxx_open_device causes crash
gsview at ghostgum.com.au
Fri Apr 18 14:28:57 PDT 2003
Does it do the same if you return a gs_error_limitecheck,
gs_error_rangecheck or gs_error_VMerror?
I have code which returns these from the open procedure without
crashing. Check if some of your other procedures are being
called when the device is closed. For example, put_params and
get_params are called before the device is open.
From: "Zoltan BIRO" <zoltan at softhome.net>
To: gs-devel at ghostscript.com
Subject: [gs-devel] returning -1 from xxx_open_device causes crash
Date sent: Fri, 18 Apr 2003 14:49:29 +0300
> I perform some initialisation tasks in my device driver's open_device
> procedure. Since these initializations may fail, I return "-1" from
> in some cases, expecting gs to close the device and quit.
> Instead of that, the following happens:
> AFPL Ghostscript 8.00 (2002-11-21)
> Copyright (C) 2002 artofcode LLC, Benicia, CA. All rights reserved.
> This software comes with NO WARRANTY: see the file PUBLIC for details.
> **** Unable to open the initial device, quitting.
> START 0 2009592 681790 1417280 120798 true 1051 5 <0>
> END PROCS 50 2029688 695417 1417280 122182 true 1050 5 <0>
> ... followed by a general protection fault (at least on windows XP, but I
> think it isn't important).
> I've tried to force some existing drivers (I mean drivers developed by
> experts, e.g. bbox) to also return "-1", but the result was the same. I
> don't really know whether I've forgotten something or it's really a bug. Any
> Note that I prefer a solution to quit safely even from the "earliest"
> xxx_finish_copydevice, but quitting from xxx_open_device is OK too.
> gs-devel mailing list
> gs-devel at ghostscript.com
Russell Lang gsview at ghostgum.com.au
Ghostgum Software Pty Ltd http://www.ghostgum.com.au/
More information about the gs-devel