GNOME Bugzilla – Bug 774971
Display errors outputted by GEGL
Last modified: 2017-06-07 14:15:52 UTC
Created attachment 340656 [details] Broken GIMP! So I was testing this weird huge resolution that Ankh proposed: 20321x19451 And it was so big that I swapped, then later ran out of disk space. The problem is that GIMP didn't output any graphical error. The canvas went simply completely broken giving me no clue that I just ran out of space. Only the terminal gave me a hint of the problem: GEGL-/home/jehan/dev/src/gegl/gegl/buffer/gegl-tile-backend-swap.c-Message: unable to write tile data to self: No space left on device (-1/65536 bytes written) An error should also pop-up on screen.
Well should it be a GEGL bug first actually? Quickly checkout out the swap tile backend in GEGL, it doesn't look like GEGL actually even return any kind of error, even less an GError or other message to the calling software.
So results of discussion on IRC is that GEGL won't have any GError propagation. But it should be possible to hook to g_warning outputs to be able to reuse the message in the GUI. g_log_set_handler() is probably the candidate to operate such log redirection.
Ok so no GEGL's log domain is simply "GEGL". Cf. bug 774976.
Adding 2.10 milestone since I'd like to handle this issue before release. :-)
Ok. Now GEGL errors would be displayed same as GIMP errors. I had to strengthen a bit the log handling to make it more robust. commit 6c2658ea4d37b325e14715acbfd62e466cac94fc Author: Jehan <jehan@girinstud.io> Date: Wed Jun 7 15:09:43 2017 +0200 app: keep track of all messages displayed by GimpErrorDialog. This way, you can increment repeated messages even when not the last one and you don't overflow the error dialog needelessly when 2 errors repeat one after another. app/widgets/gimperrordialog.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------- app/widgets/gimperrordialog.h | 6 ++---- 2 files changed, 58 insertions(+), 49 deletions(-) commit b7dd2622d1ba206ba086e8cf08f6f1808fe5c32b Author: Jehan <jehan@girinstud.io> Date: Wed Jun 7 15:27:33 2017 +0200 Bug 774971 - Display errors outputted by GEGL. Add a log handler so that GIMP can display errors outputted by GEGL. Since third party code may run in threads and we have no control on these, we have to be sure GTK+ code is run in a thread-safe way, hence the usage of gdk_threads_add_idle_full(). This was the case here for GEGL, and handling GEGL logs the same way as other GIMP logs would result in crashes. app/errors.c | 46 ++++++++++++++++++++++++++++++++++++++-------- app/gui/gui-message.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 92 insertions(+), 9 deletions(-)