sane-project-website/old-archive/1998-04/0278.html

113 wiersze
5.6 KiB
HTML

<!-- received="Sun Apr 26 09:00:26 1998 PDT" -->
<!-- sent="Sun, 26 Apr 1998 11:59:42 -0400 (EDT)" -->
<!-- name="Matto Marjanovic" -->
<!-- email="maddog@mir.com" -->
<!-- subject="Two *other* problems with xscanimage" -->
<!-- id="m0yTTqA-000J3NC@yoo-hoo.ai.mit.edu" -->
<!-- inreplyto="" -->
<title>sane-devel: Two *other* problems with xscanimage</title>
<h1>Two *other* problems with xscanimage</h1>
<b>Matto Marjanovic</b> (<a href="mailto:maddog@mir.com"><i>maddog@mir.com</i></a>)<br>
<i>Sun, 26 Apr 1998 11:59:42 -0400 (EDT)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#278">[ date ]</a><a href="index.html#278">[ thread ]</a><a href="subject.html#278">[ subject ]</a><a href="author.html#278">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0279.html">Oliver.Rauch@Wolfsburg.DE: "Re: gtk_tooltips"</a>
<li> <b>Previous message:</b> <a href="0277.html">hopp@darkstar.fact.rhein-ruhr.de: "Re[2]: gtk_tooltips"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0281.html">Oliver.Rauch@Wolfsburg.DE: "Re: Two *other* problems with xscanimage"</a>
<li> <b>Reply:</b> <a href="0281.html">Oliver.Rauch@Wolfsburg.DE: "Re: Two *other* problems with xscanimage"</a>
<li> <b>Reply:</b> <a href="0304.html">Matto Marjanovic: "Re: Two *other* problems with xscanimage"</a>
<li> <b>Reply:</b> <a href="0306.html">Matto Marjanovic: "Re: Two *other* problems with xscanimage"</a>
<li> <b>Reply:</b> <a href="0308.html">Matto Marjanovic: "Re: Two *other* problems with xscanimage"</a>
<!-- reply="end" -->
</ul>
<!-- body="start" -->
Here are two bugs that have cropped up with xscanimage, something new to<br>
chew on. Someone else with more (i.e. any) experience with GTK+ may see<br>
the solutions quicker than me, otherwise I'll keep plugging away.<br>
<p>
(Environment: SANE-0.72, GTK 1.0.0 from Debian(2.0) package, glibc, and<br>
last-but-not-least, GNU make)<br>
<p>
<p>
a) ___Closing the Preview Window (by any means) causes a segfault.___<br>
The segfault is correlated with the call to "gtk_widget_destroy (p-&gt;top)"<br>
in preview_destroy() in frontend/preview.c.<br>
<p>
b) ___Gamma Curve data is corrupted.___<br>
When turning on table-based gamma correction (and thus instantiating the<br>
gamma curve widget), the following happen:<br>
o correct values are read from the (microtek) backend, so far so good.<br>
o immediately after the call to gtk_curve_set_gamma in curve_new(),<br>
a call to gtk_curve_get_gamma reveals the correct values were <br>
written to the widget.<br>
o sometime later (when the event loop updates/displays the widget, I<br>
imagine), xscanimage declares<br>
<p>
** WARNING **: file gdkdraw.c: line 375 (gdk_draw_points): "(points != NULL) &amp;&amp; (npoints &gt; 0)"<br>
<p>
and the curve is drawn (very) incorrectly.<br>
o the values read out from the widget when it is time to send to the<br>
backend are very *wrong* -- always a couple of continuous sequences<br>
of the same number (i.e. many 8501's, followed by many 85's, etc --<br>
note that some are simply out of range).<br>
<p>
o AND, this problem only appears for the grayscale or red plane gamma<br>
curves, not the green or blue (when unbound gamma is selected).<br>
<p>
It looks like some kind of memory allocation problem to me; perhaps a bug<br>
crept into the 1.0.0 release of the gamma curve widget?<br>
<p>
c) Bonus Bug: The preview selection box doesn't move around any more in <br>
reponse to moving the geometry sliders. I believe it used to, and there<br>
is also a ChangeLog entry (1998-04-02) saying this behavior was fixed.<br>
<p>
d) Bonus Bug Fix: The error message for the "-g" option when there is no<br>
GIMP support does not get printed. Here is a small patch to fix this:<br>
<p>
<p>
--- xscanimage.c-dist Sun Apr 26 11:46:31 1998<br>
+++ xscanimage.c Sun Apr 26 11:50:29 1998<br>
@@ -1623,12 +1623,12 @@<br>
static const SANE_Device *device_list[] = { &amp;dev, 0 };<br>
int ch;<br>
<br>
- while ((ch = getopt_long (argc, argv, "hV", long_options, 0)) != EOF)<br>
+ while ((ch = getopt_long (argc, argv, "ghV", long_options, 0)) != EOF)<br>
{<br>
switch (ch)<br>
{<br>
case 'g':<br>
- printf ("%s: GIMP support missing.", argv[0]);<br>
+ printf ("%s: GIMP support missing.\n", argv[0]);<br>
exit (0);<br>
<br>
case 'V':<br>
<p>
<p>
<p>
That's it for now; time to get some sun!<br>
-matt m.<br>
<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="0279.html">Oliver.Rauch@Wolfsburg.DE: "Re: gtk_tooltips"</a>
<li> <b>Previous message:</b> <a href="0277.html">hopp@darkstar.fact.rhein-ruhr.de: "Re[2]: gtk_tooltips"</a>
<!-- nextthread="start" -->
<li> <b>Next in thread:</b> <a href="0281.html">Oliver.Rauch@Wolfsburg.DE: "Re: Two *other* problems with xscanimage"</a>
<li> <b>Reply:</b> <a href="0281.html">Oliver.Rauch@Wolfsburg.DE: "Re: Two *other* problems with xscanimage"</a>
<li> <b>Reply:</b> <a href="0304.html">Matto Marjanovic: "Re: Two *other* problems with xscanimage"</a>
<li> <b>Reply:</b> <a href="0306.html">Matto Marjanovic: "Re: Two *other* problems with xscanimage"</a>
<li> <b>Reply:</b> <a href="0308.html">Matto Marjanovic: "Re: Two *other* problems with xscanimage"</a>
<!-- reply="end" -->
</ul>