Bug#968918: Threshold function is extremely slow - Unusable - possible regression

2020-10-20 Thread debian-testing
Yes, the mageMagick issue #1819 
(https://github.com/ImageMagick/ImageMagick/issues/1819) discusses performance 
also.  See the following quotes:  "...the dithering step takes so long that I 
haven't had the patience to let it finish yet...", "...Not sure why it is doing 
very slow dithering...", "...The IM developers will have to look into the slow 
dithering..."

What version of gscan2pdf and imagemagick are you using to reproduce the 
problem?  It has to be recent versions on Debian 11 and the scan or image also 
needs to be 600dpi (300 dpi is fast).

I can still reproduce it on a fresh install done today:

apt search gscan2pdf
gscan2pdf/testing,now 2.9.1-1 all ...

apt search imagemagick
imagemagick/testing,now 8:6.9.11.24+dfsg-1+b1 amd64 ...


Steps to reproduce, even without a scanner:
GIMP > File > New
Change "px" to "in"
Set Width: 8.5" Height: 11"
Advanced > Set X & Y resolution to 600 "pixels/in"
Click OK
File > Export As: "Untitled.jpg"
Leave all other settings on their defaults

gscan2pdf > File > Open: "Untitled.jpg"
Tools > Threshold > 50%
Takes very long, eg 2 minutes.

Tools > User-defined > "mogrify -threshold 50% %i"  (manually configured 
previously)
Take about 3 seconds.

Threshold was working normally before.




Sent with ProtonMail Secure Email.

‐‐‐ Original Message ‐‐‐
On Friday, September 4, 2020 5:14 PM, Jeff  wrote:

> Thanks for the report.
>
> https://github.com/ImageMagick/ImageMagick/issues/1819
>
> doesn't mention performance problems, just corruption in the image.
>
> I can't reproduce your problem. The threshold tool works fine for me
> with or without conversion to PNG first.
>
> Please start gscan2pdf from the command line with the --log=log option,
> reproduce the problem, quit, and post the log file, which gscan2pdf
> should have compressed to log.xz.



Bug#975836: Stuck at "Add a printer" screen

2020-11-25 Thread debian-testing
Package: cura
Version: 4.7.1-2

The first run of Cura get stuck at the "Add a printer" screen of the welcome 
screen sequence. There are no printers to select and it is not possible to 
escape or get into Cura.

Fresh Debian 11 Bullseye install, LXDE minimal, offline.

This needs to work because workstations used for preparing prints do not need 
to be online and they may not be connected to any printer. Cura can be used to 
export gcode to an SD card which is then placed in the 3D printer.

apt search cura
cura/testing,now 4.7.1-2 all [installed]

uname -a
Linux *** 5.9.0-3-amd64 #1 SMP Debian 5.9.9-1 (2020-11-19) x86_64 GNU/Linux

Sent with [ProtonMail](https://protonmail.com) Secure Email.

Bug#974884: GLib-GObject-CRITICAL g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

2020-11-15 Thread debian-testing
Package: repsnapper
Version: 2.5a5-2+b1

Fresh install of Debian 11 Bullseye with minimal LXDE. repsnapper gives the 
following error:

(repsnapper:): GLib-GObject-WARNING **: : specified class size for type 
'PangoXFace' is smaller than the parent type's 'PangoFontFace' class size

(repsnapper:): GLib-GObject-CRITICAL **: : 
g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
Segmentation fault

apt search repsnapper
repsnapper/testing,now 2.5a5-2+b1 amd64 [installed]

uname -a
Linux  5.9.0-1-amd64 #1 SMP Debian 5.9.1-1 (2020-10-17) x86_64 GNU/Linux

Bug#974885: Unhandled Exception: System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]

2020-11-15 Thread debian-testing
Package: repetier-host
Version: 0.85+dfsg-2

Fresh install of Debian 11 Bullseye with minimal LXDE. repetier-host crashes 
immediately on start, see error below.

apt search repetier-host
repetier-host/testing,now 0.85+dfsg-2

uname -a
Linux  5.9.0-1-amd64 #1 SMP Debian 5.9.1-1 (2020-10-17) x86_64 GNU/Linux

Unhandled Exception:
System.ArgumentException: A null reference or invalid value was found [GDI+ 
status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status status) [0x0009b] 
in <728fbd68fe594062895e1f819791e76a>:0
at System.Drawing.Bitmap..ctor (System.Int32 width, System.Int32 height, 
System.Drawing.Imaging.PixelFormat format) [0x00017] in 
<728fbd68fe594062895e1f819791e76a>:0
at System.Drawing.Bitmap..ctor (System.Drawing.Image original, System.Int32 
width, System.Int32 height) [0x0] in <728fbd68fe594062895e1f819791e76a>:0
at System.Drawing.Bitmap..ctor (System.Drawing.Image original, 
System.Drawing.Size newSize) [0x00010] in <728fbd68fe594062895e1f819791e76a>:0
at (wrapper remoting-invoke-with-check) 
System.Drawing.Bitmap..ctor(System.Drawing.Image,System.Drawing.Size)
at System.Windows.Forms.XplatUIX11.DefineCursor (System.Drawing.Bitmap bitmap, 
System.Drawing.Bitmap mask, System.Drawing.Color cursor_pixel, 
System.Drawing.Color mask_pixel, System.Int32 xHotSpot, System.Int32 yHotSpot) 
[0x0004e] in :0
at System.Windows.Forms.XplatUI.DefineCursor (System.Drawing.Bitmap bitmap, 
System.Drawing.Bitmap mask, System.Drawing.Color cursor_pixel, 
System.Drawing.Color mask_pixel, System.Int32 xHotSpot, System.Int32 yHotSpot) 
[0x0] in :0
at System.Windows.Forms.Cursor.CreateCursor (System.IO.Stream stream) [0x00058] 
in :0
at System.Windows.Forms.Cursor..ctor (System.Type type, System.String resource) 
[0x00021] in :0
at System.Windows.Forms.Cursors.get_SizeNWSE () [0x0001a] in 
:0
at System.Windows.Forms.SizeGrip..ctor (System.Windows.Forms.Control 
CapturedControl) [0x6] in :0
at (wrapper remoting-invoke-with-check) 
System.Windows.Forms.SizeGrip..ctor(System.Windows.Forms.Control)
at System.Windows.Forms.ScrollableControl.CreateScrollbars () [0x000c2] in 
:0
at System.Windows.Forms.ScrollableControl..ctor () [0x000b0] in 
:0
at System.Windows.Forms.ContainerControl..ctor () [0xe] in 
:0
at System.Windows.Forms.Form..ctor () [0x00012] in 
:0
at RepetierHost.Main..ctor () [0x0015b] in :0
at (wrapper remoting-invoke-with-check) RepetierHost.Main..ctor()
at RepetierHost.Program.Main () [0x00011] in 
:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: A null reference 
or invalid value was found [GDI+ status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (System.Drawing.Status status) [0x0009b] 
in <728fbd68fe594062895e1f819791e76a>:0
at System.Drawing.Bitmap..ctor (System.Int32 width, System.Int32 height, 
System.Drawing.Imaging.PixelFormat format) [0x00017] in 
<728fbd68fe594062895e1f819791e76a>:0
at System.Drawing.Bitmap..ctor (System.Drawing.Image original, System.Int32 
width, System.Int32 height) [0x0] in <728fbd68fe594062895e1f819791e76a>:0
at System.Drawing.Bitmap..ctor (System.Drawing.Image original, 
System.Drawing.Size newSize) [0x00010] in <728fbd68fe594062895e1f819791e76a>:0
at (wrapper remoting-invoke-with-check) 
System.Drawing.Bitmap..ctor(System.Drawing.Image,System.Drawing.Size)
at System.Windows.Forms.XplatUIX11.DefineCursor (System.Drawing.Bitmap bitmap, 
System.Drawing.Bitmap mask, System.Drawing.Color cursor_pixel, 
System.Drawing.Color mask_pixel, System.Int32 xHotSpot, System.Int32 yHotSpot) 
[0x0004e] in :0
at System.Windows.Forms.XplatUI.DefineCursor (System.Drawing.Bitmap bitmap, 
System.Drawing.Bitmap mask, System.Drawing.Color cursor_pixel, 
System.Drawing.Color mask_pixel, System.Int32 xHotSpot, System.Int32 yHotSpot) 
[0x0] in :0
at System.Windows.Forms.Cursor.CreateCursor (System.IO.Stream stream) [0x00058] 
in :0
at System.Windows.Forms.Cursor..ctor (System.Type type, System.String resource) 
[0x00021] in :0
at System.Windows.Forms.Cursors.get_SizeNWSE () [0x0001a] in 
:0
at System.Windows.Forms.SizeGrip..ctor (System.Windows.Forms.Control 
CapturedControl) [0x6] in :0
at (wrapper remoting-invoke-with-check) 
System.Windows.Forms.SizeGrip..ctor(System.Windows.Forms.Control)
at System.Windows.Forms.ScrollableControl.CreateScrollbars () [0x000c2] in 
:0
at System.Windows.Forms.ScrollableControl..ctor () [0x000b0] in 
:0
at System.Windows.Forms.ContainerControl..ctor () [0xe] in 
:0
at System.Windows.Forms.Form..ctor () [0x00012] in 
:0
at RepetierHost.Main..ctor () [0x0015b] in :0
at (wrapper remoting-invoke-with-check) RepetierHost.Main..ctor()
at RepetierHost.Program.Main () [0x00011] in 
:0

Bug#996662: qtox fails to load and save profiles when configuration directories are symlinks

2021-10-16 Thread debian-testing
Package: qtox
Version: 1.17.3-1

qtox fails to load and save profiles when configuration directories are 
symlinks. The errors are as follows:

Loading an existing profile gives the following error:
Dialog box: "Couldn't load this profile" "This profile is already in use."
Log: "... persistence/profile.cpp:696 : Warning: Couldn't open tox save ..."

Creating a new profile gives the following error:
Dialog box: "Couldn't load this profile" "Wrong password."
Log: "...persistence/profile.cpp:231 : Warning: Failed to lock profile ..."

Additional Information:
Everything works ok when the configuration directory is just standard directory 
(not a symlink)
All permission where double checked and forced to 777 (eg "chmod -R 777 *")
Configuration directory being ~/.config/tox/ (eg /home/user/.config/tox/)

Version info:

apt search qtox
qtox/stable,now 1.17.3-1 amd64 [installed]

uname -rv
5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30)

Bug#996664: Mangled PDF loading and failures when multi-image per page or non-image pdfs

2021-10-16 Thread debian-testing
Package: gscan2pdf
Version: 2.11.0-1

When opening pdf files with multiple images per page or no images, gscan2pdf 
loads the pages as multiple mangle fragments or gives an error that the file 
cannot be opened because it contains more than one image per page. This occurs 
with both a drag & drop to the left panel and also the open file from the menu.

This is generally understandable because as a scanning software, there should 
only be one image per page. However, pdf scans from other software do not 
always follow this, nor do most other pdf files.

Although I really prefer using gscan2pdf, I am often stuck using other software 
to make them compatible with gscan2pdf.
Okular > Print to File > Force rasterization
GIMP > import > export as pdf

Since both of these alternatives are open source, hopefully this functionality 
could be eventually included in gscan2pdf.

To reproduce:
1) Download a pdf file from Wikipedia 
https://en.wikipedia.org/api/rest_v1/page/pdf/Main_Page
2) Open with (or drag & drop to) gscan2pdf
3) File opens as a bunch of mangled fragments. The it gives this error: Open 
File Error "Warning: gscan2pdf expects one image per page, but this was not 
satisfied. It is probable that the PDF has not been correctly imported. If you 
wish to add scans to an existing PDF, use the prepend/append to PDF options in 
the Save dialogue."
4) Open the file pdf file with GIMP, export as pdf, check "Layers as pages...", 
uncheck "Convert bitmaps to vector...".
5) Open new file with gscan2pdf, works perfectly
6) Open the original file pdf file with Okular, print to file, Force 
rasterization
7) Open new file with gscan2pdf, works perfectly

Version info:
apt search gscan2pdf
gscan2pdf/stable,now 2.11.0-1 all [installed]

apt search gimp
gimp/stable,now 2.10.22-4 amd64 [installed]

apt search okular
okular/stable,now 4:20.12.3-2 amd64 [installed]

uname -vr
5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30)

Bug#996662: Additional information

2021-10-21 Thread debian-testing
It seems like apparmor is blocking access to the symlink target. Qtox works 
with symlinks after deactivating apparmor. I guess the qtox apparmor profile 
needs to be corrected.

apparmor="DENIED" operation="open" profile="qtox" 
name="/test/.config/tox/qtox.ini" pid=1082 comm="qtox" requested_mask="r" 
denied_mask="r" fsuid=1000 ouid=1000
apparmor="DENIED" operation="open" profile="qtox" 
name="/test/.config/tox/test.tox" pid=1082 comm="qtox" requested_mask="r" 
denied_mask="r" fsuid=1000 ouid=1000
apparmor="DENIED" operation="mknod" profile="qtox" 
name="/test/.config/tox/test.lock" pid=1082 comm="qtox" requested_mask="c" 
denied_mask="c" fsuid=1000 ouid=1000

Bug#996662: Additional information

2021-10-21 Thread debian-testing
Yangfl: Symlink outside of home, for example, if on a symlinked network drive 
or usb, etc.

Directory has appropriate permissions. Seems to be apparmor (see my more recent 
post), since works when apparmor is deactivate.

Sent with [ProtonMail](https://protonmail.com) Secure Email.

Bug#996662: Additional information

2021-10-21 Thread debian-testing
Understood, but I am testing on vanilla debian installs which always includes 
apparmor.  I haven't had this issue with any other vanilla debian packages with 
apparmor.   A specific example is evolution email client.

I am not sure if it is the way tox is reading the config or if it is specific 
to the qtox apparmor profile.  I will have to dig further.



‐‐‐ Original Message ‐‐‐
On Thursday, October 21, 2021 3:08 PM, Yangfl  wrote:

> debian-testing debian-test...@protonmail.com 于2021年10月21日周四 下午9:48写道:
>
> > Yangfl: Symlink outside of home, for example, if on a symlinked network 
> > drive or usb, etc.
> > Directory has appropriate permissions. Seems to be apparmor (see my more 
> > recent post), since works when apparmor is deactivate.
> > Sent with ProtonMail Secure Email.
>
> Then I'd rather mark this issue as wontfix since apparmor really did
> thr right thing to stop program from accessing files outside of /home.



Bug#996662: Additional information

2021-10-21 Thread debian-testing
I checked a few other packages quickly. It seems like evolution email client 
has no apparmor profile. Thunderbird mail client has an apparmor profile and 
the symlink works, but the apparmor profile seems to be including 
/etc/apparmor.d/abstractions/ubuntu-helpers which seems to provide symlink 
support, but also has security warnings.

I also tried following as described in the qtox documentation in 
/etc/apparmor.d/tunables/usr.bin.qtox.
"Create /etc/apparmor.d/tunables/usr.bin.qtox.d/local file to append values 
as..."

However, apparmor failed to load the new profile saying that variable 
"qtox_additional_rw_dirs" was already created. Changing 
/etc/apparmor.d/tunables/usr.bin.qtox partially worked, the profile was loaded, 
but all history was gone from qtox. I also was able to create a new profile, 
but all history was lost between sessions.

As a last resort, I tried a bind mount, and that works. The steps are below. I 
make the original directory chmod 000 when it is not yet bound to ensure that 
qtox doesn't write to it if ever the bind fails. However, a symlink would be 
better. There should be a way in the qtox code to open the symlink without 
de-referencing it, but I would have to look later. There is also probably a way 
to make the apparmor profile work for symlinks.

See "man realpath". realpath will resolve the symlink, but option -s will 
preserve the symlink in the path.

Bind mount alternative (user called user, thus ~/ is /home/user):
mkdir /test/
mv ~/.config/tox /test/
mkdir ~/.config/tox
chmod 000 ~/.config/tox
mount --bind /test/tox ~/.config/tox
umount ~/.config/tox

Make it automatic on startup (add the following to fstab)
nano /etc/fstab
/test/tox /home/user/.config/tox none defaults,bind 0 0

Bug#928692: #928692 - lxde: Wicd no longer maintained upstream - should not be default any longer

2020-07-13 Thread debian-testing
I struggled with the same problem and tried all the various options for Debian 
11 Bullseye lxde-core.

I now use package cmst and connman with lxde-core on Debian 11 Bullseye and it 
has been working great, even more stable with certain wifi chipsets than using 
wicd on Debian 10 Buster.

The following brings everything required for Debian 11 Bullseye lxde-core:
apt install cmst -y

Bug#966363: Failed to execute child process “xterm” (No such file or directory)

2020-07-27 Thread debian-testing
Package: pcmanfm
Version: 1.3.1-1+b1

When double-clicking (executing) an executable script (.sh) from PCManFM, the 
following error occurs: "Failed to execute child process “xterm” (No such file 
or directory)". Executing from a double-click previously worked correctly.

The source of the error is that the following entry is missing:
File: ~/.config/libfm/libfm.conf

Missing Entry: terminal=x-terminal-emulator %s

Re-adding the above entry to the above file solved the problem (eliminates the 
error) after a reboot.

I have had this error several times on different systems running Debian 11 
Bullseye with lxde-core. The error seems to always happen after an attempted 
"apt update" which fails while in progress because the disk become full and 
then a reboot.

I have not be able to isolate if the source cause is the update or the reboot 
with a full disk. My best guess would be that it occurs after a reboot with a 
full disk and that lxde is replacing the libfm.conf with a default minimal 
version.

uname -a:
Linux hostname 5.7.0-1-amd64 #1 SMP Debian 5.7.6-1 (2020-06-24) x86_64 GNU/Linux

Bug#968918: Threshold function is extremely slow - Unusable - possible regression

2020-08-23 Thread debian-testing
Package: gscan2pdf
Version: 2.8.2-1

Threshold function is extremely slow - Unusable - Possible regression

Applying threshold on a scanned image is extremely slow. Doing the same 
transformation using mogrify/convert is many times faster. This seems to be a 
regression during the last few months since this did not seem to be a problem 
before.

Example test to reproduce:
Scan one page, letter size, greyscale, 600pdi
Tools > Threshold > Selected > 50%
gscan2pdf process uses one cpu core at 100% for 2 minutes

The same processing using "mogrify -threshold 50% %i" takes 2 seconds.

Possibly gscan2pdf has a problem that is related to mogrify on the original 
format. If I remove the gscan2pdf option to automatically convert to png, 
restart gscan2pdf, scan and use "mogrify -threshold 50% %i", the processing 
time very long, just like gscan2pdf. Thus, it might be an issue with underlying 
mogrify libraries (if gscan2pdf uses them). ImageMagick issue #1819 seems might 
be related.
https://github.com/ImageMagick/ImageMagick/issues/1819

Temporary workaround:
Tools > Preferences > General Options > User Defined : "mogrify -threshold 50% 
%i"
Tools > User Defined > "mogrify -threshold 50% %i"

Version info:

apt search gscan2pdf
gscan2pdf/testing,now 2.8.2-1 all [installed]

uname -rv
5.7.0-2-amd64 #1 SMP Debian 5.7.10-1 (2020-07-26)

Bug#968954: Parallel processing - Becoming more urgent with rapidly increasing multi-core CPUs

2020-08-24 Thread debian-testing
Package: gscan2pdf
Version: 2.8.2-1

Parallel processing - Becoming more urgent with rapidly increasing multi-core 
CPUs

As computers have more and more cores, it is becoming more urgent that 
gscan2pdf supports parallel processing, especially considering that many image 
operations are CPU intensive.  Currently, it is relatively common to have 10+ 
cores available and 100+ cores do exist at the high-end.  In these situations, 
gscan2pdf is only using 10% or even 1% of available processing power.

I saw some mention in an issue that most of the underlying libraries were 
already multi-threaded.  This is not entirely true, as unfortunately, many of 
the underlying algorithms are still and will probably remain single threaded by 
the nature of the algorithms.

I also saw some mention that this was more complicated than expected.
The simplest and safest approach is to have a separate processing queue for 
each incoming image (scanned or imported).  Each image would receive a unique 
ID for the session and all operations on it would be sequenced for the image, 
but all images being processed in parallel.

Eg: Scan Image 1, Convert to PNG, Apply clean-up filters, rotate. all processed 
in strict sequential order.

However, Image 1 queue is processed in parallel with Image 2 queue, Image 3 
queue, etc...

All of the features in gscan2pdf seem to be per image, I did not see any 
multi-image options, such as combining two images, the only exception being the 
save file.  If there are any others, the simplest would be to force these as 
sequential in a global queue.  The global queue would only process multi-image 
operations once all previously queued parallel operations have completed.  
Subsequent parallel operations should come only after the multi-image operation 
completed.