#867667 xsane: Preview window empty/unusable

Package:
xsane
Source:
xsane
Description:
featureful graphical frontend for SANE (Scanner Access Now Easy)
Submitter:
Jeroen Nijhof
Date:
2022-06-09 19:27:03 UTC
Severity:
normal
#867667#5
Date:
2017-07-08 11:38:19 UTC
From:
To:
After upgrading to stretch the preview window is empty/unusable:
i.e. it seems bug 712281 should be reopened.

How to reproduce:

(no .sane/xsane yet)
start xsane
close the preview window
(at this point the preview window can still be reopened ok)
stop xsane
start xsane
open the preview

Result: an empty window, no buttons, and moving the mouse
generates strips of mostly black blobs on the top and left of
the window.

But -- quitting xsane now, and restarting it does result
in a working preview window again! So the problem seems to be
some missing initialization of the preview window when
starting without one.

As described in bug 712281,  rm -r ~/.sane/xsane also resolves
the problem, temporarily at least, but that is because
without .sane/xsane the default is to start _with_ the
preview window.

#867667#10
Date:
2018-11-18 00:36:20 UTC
From:
To:
The work around as described in the Ubuntu version works ok for me.

https://bugs.launchpad.net/ubuntu/+source/xsane/+bug/1410756

Opening the preview page with the Ctrl-1 and then shutting down and
restarting it starts with the preview pane with all the buttons
displayed
and working properly. - Thank God for this work around - really
annoying otherwise.

Andrew

#867667#15
Date:
2019-07-01 19:10:17 UTC
From:
To:
I can confirm the bug still exists in debian buster.
(the workaround deleting .sane/xsane works too.)

#867667#20
Date:
2020-09-23 10:23:30 UTC
From:
To:
I am on Arch Linux but affected by the very same issue. There is another
workaround that worked for me:
running with --sync (i. e. xsane --sync)

Looks like the preview window gets created on each startup and then later -
corresponding to settings -
either it's left as is or hidden. Maybe if it's happening too fast (w/o
sync) this leads to corruption.

Quick and dirty semi-solution (certainly not ideal but al least working
100%) is to discard the hiding part (that is:
ignore the setting at startup):
--- xsane.c.orig 2020-09-23 12:14:13.366814683 +0200 +++ xsane.c 2020-09-23 12:14:17.106792054 +0200 @@ -5347,10 +5347,10 @@ { gtk_widget_show(xsane.preview->top); } - else - { - gtk_widget_hide(xsane.preview->top); - } + //else + //{ + //gtk_widget_hide(xsane.preview->top); + //} gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(xsane.show_preview_widget), xsane.show_preview); xsane_define_maximum_output_size(); /* draw maximum output frame in preview window if necessary */ I do hope someone knowledgeable steps in and prepare a proper fix. BR, jose
#867667#25
Date:
2022-06-09 15:45:53 UTC
From:
To:
I do not see what I am scanning. Hence I cannot adjust brightness,
contrast, dimensions. And as my last working xsane scan was not a full
page, I now stuck with those dimension. Don't tell me I could change
the dimensions in a submenue, I know.

Scanning blindly makes xsane unusuable!

BTW, as maybe it's related: I have enabled "preview" in the window (de:
Ansicht) pull-down menue. And then stored the settings. Nonetheless the
(empty) preview window does not get opened on start of xsane.

#867667#30
Date:
2022-06-09 19:24:05 UTC
From:
To:
Hi

After some more research it seams this bug could be somehow DE related:

I normaly work in a fluxbox environment. And so I did today when I hit
this bug (not for the first time!). As I was in a hurry with some
documents I had to scan, I installed an other scanning application
(simple scan) which did the job.

On the same HW and same installation I later switched to a different
WM/DE: lxqt

When I started xsane while running lxqt, the preview window opened for a
fraction of a second, but closed instantly. I could reopen it and it
worked as it should. Even after closing and reopening xsane, the
preview window opened and stayed open from now on. It even worked after
a reboot. And, to my surprise, it now works in fluxbox, too. As if
there never was a bug.

Bug closed? NO!

This malfunction occurred over the last two years again and again 9 out
of 10 times I wanted to use xsane. And it is not clear why it happens
and when it will happen again.