kopia lustrzana https://gitlab.com/sane-project/website
87 wiersze
3.3 KiB
HTML
87 wiersze
3.3 KiB
HTML
<!-- received="Sat Mar 21 06:26:39 1998 PST" -->
|
||
<!-- sent="Sat, 21 Mar 1998 15:25:29 +0100 (CET)" -->
|
||
<!-- name="=?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?=" -->
|
||
<!-- email="mikko@securitydynamics.com" -->
|
||
<!-- subject="xscanimage SIGSEGVs (patch included)" -->
|
||
<!-- id="" -->
|
||
<!-- inreplyto="" -->
|
||
<title>sane-devel: xscanimage SIGSEGVs (patch included)</title>
|
||
<h1>xscanimage SIGSEGVs (patch included)</h1>
|
||
<b>=?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?=</b> (<a href="mailto:mikko@securitydynamics.com"><i>mikko@securitydynamics.com</i></a>)<br>
|
||
<i>Sat, 21 Mar 1998 15:25:29 +0100 (CET)</i>
|
||
<p>
|
||
<ul>
|
||
<li> <b>Messages sorted by:</b> <a href="date.html#145">[ date ]</a><a href="index.html#145">[ thread ]</a><a href="subject.html#145">[ subject ]</a><a href="author.html#145">[ author ]</a>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0146.html">Oliver.Rauch@Wolfsburg.DE: "Re: Need some advice"</a>
|
||
<li> <b>Previous message:</b> <a href="0144.html">Kaz Sasayama: "Re: epson via parallel"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|
||
<!-- body="start" -->
|
||
Hi!<br>
|
||
<p>
|
||
A sure way to crash sane on my machine is to start with "Show advanced<br>
|
||
options" turned on, turn it off, open the preview window and click<br>
|
||
"Aquire preview". This requires the backend to define some options as<br>
|
||
"advanced," of course. The crash is deep down in GTK, when called<br>
|
||
from gsg_set_sensitivity().<br>
|
||
<p>
|
||
The following patch (at the end of panel_destroy()) stops this from<br>
|
||
happening:<br>
|
||
<p>
|
||
<p>
|
||
--- frontend/gtkglue.c.org Sat Mar 21 13:11:46 1998<br>
|
||
+++ frontend/gtkglue.c Sat Mar 21 13:08:42 1998<br>
|
||
@@ -829,6 +829,8 @@<br>
|
||
elem->menu = 0;<br>
|
||
}<br>
|
||
}<br>
|
||
+ memset (dialog->element, 0,<br>
|
||
+ dialog->num_elements * sizeof (dialog->element[0]));<br>
|
||
}<br>
|
||
<br>
|
||
static void<br>
|
||
<p>
|
||
<p>
|
||
Explanation: panel_rebuild() is called to rebuild the xscanimage<br>
|
||
window. It simply calls panel_destroy() and builds the panel from<br>
|
||
scratch with panel_build(), which skips entries that should not be<br>
|
||
shown. This is OKfor panel_build() when called initially, as<br>
|
||
gsg_create_dialog() clears the options array (element).<br>
|
||
Panel_destroy() however does not, leaving assorted garbage pointers<br>
|
||
for gsg_set_sensitivity() to crash on.<br>
|
||
<p>
|
||
Another fix would be to add a test for:<br>
|
||
<p>
|
||
((opt->cap & SANE_CAP_ADVANCED) && !dialog->advanced))<br>
|
||
<p>
|
||
in gsg_set_sensitivity(), to skip the bogus option entries (as<br>
|
||
panel_build() did), but then something else might crash for the same<br>
|
||
reason somewhere else.<br>
|
||
<p>
|
||
BTW: This is sane 0.71 with the snapscan backend, on FreeBSD 2.2.5 / 3.0.<br>
|
||
<p>
|
||
Regards,<br>
|
||
/Mikko<br>
|
||
<p>
|
||
<p>
|
||
Mikko Tyo"la"ja"rvi________________________________mikko@securitydynamics.com<br>
|
||
SecurityDynamics<br>
|
||
<p>
|
||
<p>
|
||
<pre>
|
||
--
|
||
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
|
||
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
|
||
</pre>
|
||
<!-- body="end" -->
|
||
<p>
|
||
<ul>
|
||
<!-- next="start" -->
|
||
<li> <b>Next message:</b> <a href="0146.html">Oliver.Rauch@Wolfsburg.DE: "Re: Need some advice"</a>
|
||
<li> <b>Previous message:</b> <a href="0144.html">Kaz Sasayama: "Re: epson via parallel"</a>
|
||
<!-- nextthread="start" -->
|
||
<!-- reply="end" -->
|
||
</ul>
|