Bug 26903 - Simple-scan no save documents in pdf format
Summary: Simple-scan no save documents in pdf format
Status: REOPENED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: David GEIGER
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-06 08:49 CEST by Jose Manuel López
Modified: 2020-09-01 10:40 CEST (History)
5 users (show)

See Also:
Source RPM: simple-scan-3.32.2.1-2.mga7.src.rpm
CVE:
Status comment:


Attachments
List of libs used by simple-scan (7.69 KB, text/plain)
2020-07-07 21:26 CEST, Martin Whitaker
Details
PDF file can be saved with accented characters (410.77 KB, image/png)
2020-07-08 23:34 CEST, Aurelien Oudelet
Details
Saved PDF file with accented characters (802.19 KB, image/png)
2020-07-08 23:36 CEST, Aurelien Oudelet
Details
Debug output in console of simple-scan (67.55 KB, text/plain)
2020-07-08 23:42 CEST, Aurelien Oudelet
Details
Fixed patch for using FileChooserDialog (1.22 KB, patch)
2020-07-09 10:03 CEST, Martin Whitaker
Details | Diff
Simple-scan version in Cauldron mga8 refuses accented characters (62.00 KB, image/png)
2020-07-09 10:38 CEST, Aurelien Oudelet
Details
simple-scan --debug in Console (80.15 KB, text/plain)
2020-07-09 10:45 CEST, Aurelien Oudelet
Details

Description Jose Manuel López 2020-07-06 08:49:10 CEST
Description of problem: Simple-scan no save documents in pdf format. In konsole appears: 

[jose@localhost ~]$ simple-scan
Gtk-Message: 08:33:34.784: Failed to load module "appmenu-gtk-module"


Version-Release number of selected component (if applicable): Simple-scan-3.32.2.1-2 in Mageia 7 x64


How reproducible: Open Simple-scan, scan document, save in pc. No save document.


Steps to Reproduce:
1. Open Simple-scan in konsole, and will appears the gtk-message.
2. Scan a document
3. I can't save document scanned in pdf.
Comment 1 Dave Hodgins 2020-07-06 09:41:57 CEST
Confirmed. It seems to be completely ignoring the save button.

Workaround is to right click on the image after scanning, copy it to the
clipboard. Run gimp, and use "edit/paste" to create a copy of the scanned
image, then use "file/export as" to save the scanned image as a pdf file.

CC: (none) => davidwhodgins

Comment 2 Jose Manuel López 2020-07-06 10:24:05 CEST
The problem is when there are several sheets that, the temporary solution becomes a lot of extra work...
Comment 3 Dave Hodgins 2020-07-06 21:11:40 CEST
Agreed. It does need to be fixed. Just pointed out the workaround for people
to use in the meantime, if they need it now.
Assigning to David Geiger who did the most recent changes.

Assignee: bugsquad => geiger.david68210

Comment 4 Aurelien Oudelet 2020-07-06 23:15:15 CEST
It is resolved in Mageia 8a1, as with simple-scan-3.37.2-1.mga8,
Bug not reproduced in Mageia 8.
In meantime, it should be fixed in Mageia 7.
Regards,

CC: (none) => ouaurelien

Comment 5 Morgan Leijström 2020-07-06 23:38:13 CEST
In the mean time, another workaround: use xsane, which can save a project(one or a series of scans) as pdf.

CC: (none) => fri

Comment 6 Martin Whitaker 2020-07-07 17:53:25 CEST
It works for me in Mageia 7 using the Cinnamon DE. So it's most likely a missing dependency.

When you click on the Save button, do you get the file chooser, or does the button do nothing at all?

CC: (none) => mageia

Comment 7 Dave Hodgins 2020-07-07 20:34:42 CEST
It's the save button in the file chooser dialog that is not working, not
the save icon in simple-scan itself.

When the save button is selected in the file chooser dialog, the chooser dialog
closes, returning to the simple-scan dialog, but nothing is saved. Doesn't
matter if an existing pdf file is chosen to be replaced, or a new file name
typed in.

I do have task-cinnamon-4.0-4.mga7 and task-cinnamon-minimal-4.0-4.mga7
installed, but am running plasma.
Comment 8 Martin Whitaker 2020-07-07 21:26:53 CEST
Created attachment 11737 [details]
List of libs used by simple-scan

Here's a list of the libs opened when I run simple-scan, do a scan, and save the output to a PDF file. Obtained by

strace -e trace=openat simple-scan |& tee scan.log
grep lib64 scan.log | grep -v ENOENT | sort > libs.txt
Comment 9 Lewis Smith 2020-07-07 22:05:04 CEST
This is a follow-on of bug 11167. See:
 https://bugs.mageia.org/show_bug.cgi?id=11167#c34
and around that.
No mention here of whether it applies just to PDF, or to any output format.
Martin's note about it being OK under Cinnamon is interesting; to try!

CC: (none) => lewyssmith

Comment 10 Dave Hodgins 2020-07-08 01:07:13 CEST
I switched from plasma to cinnamon for my test to minimize differences.

Somewhat unexpected results from strace. Compared to attachment 11737 [details], there
are no libs in Martin's test that are missing from mine. However there are
libs being loaded in my test that are not present in Martin's ...
/lib64/libdbus-glib-1.so.2
/lib64/libgconf-2.so.4
/lib64/libibus-1.0.so.5
/usr/lib64/gio/modules/libgsettingsgconfbackend.so
/usr/lib64/gtk-3.0/3.0.0/immodules/im-ibus.so

These are from the packages
lib64dbus-glib1_2-0.110-2.mga7
lib64GConf2_4-3.2.6-17.mga7
lib64ibus1.0_5-1.5.20-1.1.mga7
ibus-gtk3-1.5.20-1.1.mga7

Uninstalling those 4 packages would remove 230 packages, including ...
  task-cinnamon-4.0-4.mga7.noarch
  task-cinnamon-minimal-4.0-4.mga7.noarch
  task-gnome-3.32.0-2.mga7.noarch
  task-gnome-minimal-3.32.0-2.mga7.noarch
  task-lxde-7-1.mga7.noarch
  task-lxde-minimal-7-1.mga7.noarch
  task-lxqt-0.14.1-1.mga7.noarch
  task-lxqt-minimal-0.14.1-1.mga7.noarch
  task-mate-1.22.0-1.mga7.noarch
  task-mate-minimal-1.22.0-1.mga7.noarch
  task-plasma5-5.15.4-1.mga7.noarch
  task-plasma5-minimal-5.15.4-1.mga7.noarch
  task-sugar-0.112-3.mga7.noarch
  task-xfce-4.14-1.mga7.noarch
  task-xfce-minimal-4.14-1.mga7.noarch
  task-xfce-plugins-4.14-1.mga7.noarch

I chose not to uninstall them. :-)
Comment 11 Lewis Smith 2020-07-08 09:44:36 CEST
My system has all 6 desktops; whether that matters I know not. I have just tried
 simple-scan-3.32.2.1-2.mga7 (what is out in the field)
under Cinnamon re comment 6:
- it refuses accented characters in the O/P filename, bug 11167
- it saves, correctly, *.pdf, *.jpg, *.png

I had previously tried the version in updates_testing
 simple-scan-3.32.2.1-2.1.mga7, which
- accepts accented characters in the O/P filename
- saves nothing at all, whatever format; the O/P filename does not exist

Dave's idea comment 7 that the 'Save' button is inactive looks good.

I will try Plasma since it looks as if this is what Jose is using.
Comment 12 Martin Whitaker 2020-07-08 10:05:38 CEST
I can confirm Lewis's findings - installing simple-scan-3.32.2.1-2.1.mga7 from updates_testing breaks the save functionality. downgrading to simple-scan-3.32.2.1-2.mga7 fixes it.

But Jose reported he is using simple-scan-3.32.2.1-2.
Comment 13 David GEIGER 2020-07-08 12:56:10 CEST
simple-scan is a very pain for years with this accented characters issue :(

The only change between 3.32.2.1-2 and 3.32.2.1-2.1 is:

- var save_dialog = new Gtk.FileChooserNative (/* Save dialog: Dialog title */
+ var save_dialog = new Gtk.FileChooserDialog (/* Save dialog: Dialog title */
Comment 14 Lewis Smith 2020-07-08 21:30:51 CEST
(In reply to Lewis Smith from comment #11)
> My system has all 6 desktops; whether that matters I know not.
> I will try Plasma since it looks as if this is what Jose is using.
 simple-scan-3.32.2.1-2.mga7 under Plasma
It saved .pdf, .jpg, .png files correctly.

 From a terminal, scanner switched on:
$ simple-scan
(simple-scan:21611): Gtk-WARNING **: 21:16:51.017: Creating a portal monitor failed: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Inhibit” on object at path /org/freedesktop/portal/desktop

Not the same as comment 0.
@Jose : "I can't save document scanned in pdf"
- Can you can save scans as .jpg or .png ? Or not at all?
- Please confirm what desktop you are using, and how you installed Mageia 7, from which ISO. If it was the Classic ISO, is Plasma the only desktop you have? I am wondering whether this problem exists for Plasma-only systems. And if so, for both Plasma Live and Classic?
------------------------------------------------------
As for 'appmenu-gtk-module', I cannot find it anywhere.
------------------------------------------------------
(In reply to David GEIGER from comment #13)
> simple-scan is a very pain for years with this accented characters issue :(
But this *is* resolved in 3.32.2.1-2.1.
 
> The only change between 3.32.2.1-2 and 3.32.2.1-2.1 is:
> - var save_dialog = new Gtk.FileChooserNative (/* Save dialog: Dialog title
> */
> + var save_dialog = new Gtk.FileChooserDialog (/* Save dialog: Dialog title
> */
But the change in behaviour is undeniable.

Source RPM: Simple-scan => simple-scan-3.32.2.1-2.mga7.src.rpm

Comment 15 Jose Manuel López 2020-07-08 22:07:59 CEST
Hi,

I use Plasma desktop in Mageia 7 installed from netinstall iso.

I can confirm that Simple-scan application don't save nothing. The save button open a dialog for select the path for save the document.

Greetings!
Comment 16 Jose Manuel López 2020-07-08 22:11:06 CEST
But, I have others computers with Mageia 7 Plasma in the office, and they can save the pdf documents.... and ejecuting simple-scan from konsole don't appears the warning of appmenu-gtk-module.

It's strange..
Comment 17 Aurelien Oudelet 2020-07-08 23:33:16 CEST
Hi there,

I finished install Mageia 7.1 Classic ISO with Plasma 5:

KDE Plasma Version: 5.15.4-1.1.mga7
KDE Frameworks Version: 5.57.0-1.mga7
Qt Version: 5.12.6-3.mga7
GTK2 Version: 2.24.32-5.mga7
GTK3 Version: 3.24.8-1.mga7
Kernel Version: 5.6.14-desktop-2.mga7
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-6600K CPU @ 3.50GHz
Memory: 15,6 Gio

Steps trying reproduce bug here:

1. Open MCC and Select "Hardware"

2. Select "Configure scanner"
This install task-scanning-2011.0-10.mga7.noarch metapackage.
It installs several sane backend and simple-scan.

3. (For me I must open 8612/udp port in Shorewall in order to have my computer see my network scanner. See bug https://bugs.mageia.org/show_bug.cgi?id=26912)

4. My scanner Canon MG7700 is displayed after a moment.

5. Open simple-scan in Menu.

6. Scan a document.

7. I CAN save both accented and PDF documents !

See attachement screenshot.
Regards,
Comment 18 Aurelien Oudelet 2020-07-08 23:34:27 CEST
Created attachment 11738 [details]
PDF file can be saved with accented characters

I can save a pdf file with accented characters.
Comment 19 Aurelien Oudelet 2020-07-08 23:36:00 CEST
Created attachment 11739 [details]
Saved PDF file with accented characters

As you can see, PDF file saved from simple-scan with accented character
"numérisation.pdf".
Comment 20 Aurelien Oudelet 2020-07-08 23:42:13 CEST
Created attachment 11740 [details]
Debug output in console of simple-scan

Here is 
$ simple-scan --debug
output in file attached.
It can saved PDF with accented characters.
Comment 21 Jose Manuel López 2020-07-09 07:56:10 CEST
Hi!

I uninstalled simple-scan and I have aplicated  urpme --auto-orphans.

After, from Mcc > Configure scanner, I have installed task-scanning package.

Now, simple-scan works fine. Save documents in pdf format.

After, I have uninstalled the xsane package and I have aplicated again urpme --auto-orphans, and I reboot the computer. 

Simple-scan works fine again. We can close this bug if nobody have a new issue with this

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 22 Jose Manuel López 2020-07-09 07:58:49 CEST
It can be that some library or dependency hasn't been installed during Mageia instalation.

Greetings and very thanks!!
Comment 23 Aurelien Oudelet 2020-07-09 09:44:32 CEST
Sound very good!
Have a lot of fun!
Comment 24 David GEIGER 2020-07-09 09:51:23 CEST
So to clarify the situation:

- Which version work on mga7? 3.32.2.1-2.mga7 or 3.32.2.1-2.1.mga7?
- Does it work also on Cauldron?
Comment 25 Martin Whitaker 2020-07-09 10:03:52 CEST
Created attachment 11741 [details]
Fixed patch for using FileChooserDialog
Comment 26 Martin Whitaker 2020-07-09 10:08:55 CEST
(In reply to David GEIGER from comment #13)
> simple-scan is a very pain for years with this accented characters issue :(
> 
> The only change between 3.32.2.1-2 and 3.32.2.1-2.1 is:
> 
> - var save_dialog = new Gtk.FileChooserNative (/* Save dialog: Dialog title
> */
> + var save_dialog = new Gtk.FileChooserDialog (/* Save dialog: Dialog title
> */

That patch is wrong, because gtk_file_chooser_dialog_new has a different function prototype to gtk_file_chooser_native_new. The attached patch fixes it (on a very quick test). Note that I have corrected the version number in the patch file name.

Unfortunately we can no longer check which version Jose was using when he had the bug.

Dave, can you check which version you are using.

Resolution: FIXED => (none)
Status: RESOLVED => REOPENED

Comment 27 Dave Hodgins 2020-07-09 10:26:36 CEST
simple-scan-3.32.2.1-2.1.mga7.x86_64 has the bug. After downgrading to
simple-scan-3.32.2.1-2.mga7.x86_64 the bug is not present.
Comment 28 Aurelien Oudelet 2020-07-09 10:38:54 CEST
Created attachment 11742 [details]
Simple-scan version in Cauldron mga8 refuses accented characters

Hi,
In mga7: I have simple-scan-3.32.2.1-2.mga7 which does not present bug.

But: Cauldron has simple-scan-3.37.2-1.mga8 and I have bug of accented characters refused.
See screen shot.
Comment 29 David GEIGER 2020-07-09 10:43:52 CEST
So can someone reopen this upstream bug https://gitlab.gnome.org/GNOME/simple-scan/-/issues/147 , please?

And see with upstream what is going wrong here for us.
Comment 30 Aurelien Oudelet 2020-07-09 10:45:48 CEST
Created attachment 11743 [details]
simple-scan --debug in Console

Here is output of simple-scan --debug in console.
In mga8, you must workaround saving without accented characters and rename it later in a file manager.
Martin Whitaker 2020-07-09 10:55:15 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=11167

Comment 31 Jose Manuel López 2020-07-09 11:04:17 CEST
Well,

I have installed the simple-scan-3.32.2.1-2.mga7.x86_64 version on Mageia Plasma 7.1 x86_64.

Version 3.32.2.1-2.1.mga7 is still in the test repository.

It works fine now. After installing task-scanning from MCC, I can save documents in pdf and with the name with special characters.

There must be some dependency missing, which has been installed after this process.

Greetings!
Frédéric "LpSolit" Buclin 2020-07-09 13:09:38 CEST

Attachment 11741 is patch: 0 => 1

Comment 32 David GEIGER 2020-07-09 17:40:50 CEST
(In reply to Jose Manuel López from comment #31)
> It works fine now. After installing task-scanning from MCC, I can save
> documents in pdf and with the name with special characters.
> 
> There must be some dependency missing, which has been installed after this
> process.


So I think that sane-backends should be a dependency for simple-scan, I'll add it!
Comment 33 Martin Whitaker 2020-07-09 17:46:33 CEST
(In reply to David GEIGER from comment #32)
> So I think that sane-backends should be a dependency for simple-scan, I'll
> add it!

That would affect the ability to scan, not the ability to save a file.

I suspect Jose actually had 3.32.2.1-2.1.mga7 from updates_testing installed, but as he has reinstalled the system, we will never know for sure.
Comment 34 David GEIGER 2020-07-09 17:51:53 CEST
So a new simple-scan-3.32.2.1-2.2.mga7 update in progress with Martin fixed patch and with sane-backends dependency added, please test it.



to fix definitively this bug it would be great to check with upstream what is going wrong here https://gitlab.gnome.org/GNOME/simple-scan/-/issues/147
Comment 35 Jose Manuel López 2020-08-04 08:41:27 CEST
I tried the new version on one of my equipment and it works well, it scans, saves both pdf and image.

On Mageia 7.1 Plasma.
Comment 36 Lewis Smith 2020-08-05 21:45:33 CEST
(In reply to David GEIGER from comment #34)
> So a new simple-scan-3.32.2.1-2.2.mga7 update in progress with Martin fixed
> patch and with sane-backends dependency added, please test it.
Mageia 7 6-desktop install, under LXDE : simple-scan-3.32.2.1-2.2.mga7
It *does* save a scanned document as .pdf .jpg .png
BUT does *not* accept accented characters in the filename (bug 11167).

CC'ing Papoteur because he opened that upstream bug (comment 34), and says the problem has gone:
 https://gitlab.gnome.org/GNOME/simple-scan/-/issues/147#note_773203

CC: (none) => yves.brungard_mageia

Comment 37 David Walser 2020-08-31 01:19:05 CEST
If this update is OK, please assign it to QA.
Comment 38 Lewis Smith 2020-08-31 21:18:14 CEST
This is a nightmare, + the version numbers, unfortunately not always reported in test results. What is out in the field is:
 3.32.2.1-2
for which Jose raised the bug, confirmed by Dave comment 1.

But contradicted by Martin comment 6:
> It works for me in Mageia 7 using the Cinnamon DE
then comment 12:
> simple-scan-3.32.2.1-2.1.mga7 from updates_testing breaks the save
> functionality.
> downgrading to simple-scan-3.32.2.1-2.mga7 fixes it.
and  myself comment 11:
> simple-scan-3.32.2.1-2.mga7 (what is out in the field)
> under Cinnamon re comment 6:
> - it refuses accented characters in the O/P filename, bug 11167
> - it saves, correctly, *.pdf, *.jpg, *.png
and comment 14:
> simple-scan-3.32.2.1-2.mga7 under Plasma
> It saved .pdf, .jpg, .png files correctly.
Version -2.1 solved one thing (accented characters), introduced another (no saving) - which the latest version -2.2 fixed. Results differed for different people.
I think -2.2 is the same as -2 for some of us, an improvement for others, so OK to let out. What do others think?
Aurelien Oudelet 2020-08-31 22:49:52 CEST

CC: ouaurelien => (none)

Comment 39 Jose Manuel López 2020-09-01 10:40:31 CEST
I tried again in version 3.32.2.1 of Mageia 7 with kernel 5.17.9 and the document is saved in pdf, but does not allow saving with accent or special characters.

As I tried the new version 3.37.3 of Mageia 8 Beta 1 with kernel 5.8.5.2 and the same error occurs, I can save in pdf but not with special characters like accent.

Best regards!!

Note You need to log in before you can comment on or make changes to this bug.