openpaperwork / paperwork

Personal document manager (Linux/Windows) -- Moved to Gnome's Gitlab
https://gitlab.gnome.org/World/OpenPaperwork/paperwork
2.43k stars 148 forks source link

New scanned paged not displayed when window is not visible #515

Open tiramiseb opened 8 years ago

tiramiseb commented 8 years ago

I'm experiencing a weird problem...

As long as the Paperwork window is visible (or as long as I am displaying the GNOME virtual desktop where Paperwork is placed), everything works perfectly.

But if I switch to a different workspace/virtual desktop when scanning, the Paperwork window doesn't change (however, the scanned page is correctly stored in the filesystem).

Afterwards :

By the way, for a new document, after having the aforementioned behaviour, if I :

tiramiseb commented 8 years ago

When the Paperwork window is hidden behind a maximized window on the same workspace, the problem does not occur.

jflesch commented 8 years ago

Looks like a Cairo rendering bug. Can you remind me which GNU/Linux distribution do you use ? And which Gnome version do you have ?

tiramiseb commented 8 years ago

I'm using Ubuntu GNOME 16.04, with GNOME Shell 3.18.

jflesch commented 8 years ago

Actually, I reproduced on Debian sid too.

I'm unsure what is happening here. No obvious bug / trace in Paperwork output.

However, from what I can see, this is not a big issue. There is pretty much no point where the user is stuck. So for now, I'm going to delay this ticket.

tiramiseb commented 8 years ago

I have switched to KDE this weekend.

On KDE, this bug does not appear when switching to another activity while scanning.

jflesch commented 7 years ago

Maybe related to #522

tiramiseb commented 7 years ago

I don't think so because #522 has no problem when adding pages to an existing documents.

jflesch commented 7 years ago

Yep, but in both cases, I suspect a Gtk/Cairo rendering issue (or worst, a main loop issue) :)

jflesch commented 7 years ago

Anyway, we will have to check if 1.1.0 (unstable) doesn't already fix the issue.

Prior to 1.1.0, I didn't call Gdk.threads_init() because it caused issues with Gtk dialogs in Paperwork. However I am clearly using threads (and a lot). Since I've solved the issues with the dialogs, I am now able to call Gdk.threads_init(). Hopefully, this is what caused these main loop issues and/or rendering problems.

If not, I'll have to do some nasty debugging sessions to find the root causes :(

jflesch commented 7 years ago

Update: Gdk.threads_init() is actually deprecated (--> wasn't included in Paperwork 1.1).

I've also installed Ubuntu Gnome 16.04 16.10 on my desktop because it's currently the only distribution that supports correctly my graphic card with Steam ^^. Anyway, I've ended up with a bunch of weird rendering bugs in Paperwork I didn't have with Debian (stable or sid). I'm more and more suspecting bug(s) in the Glib/Cairo/Gdk/Gtk/Gnome-shell versions of Ubuntu Gnome 16.04 16.10. And I am unable to spot where they come from yet ... :/