FS#56919 - [gweled] segfaults

Attached to Project: Arch Linux
Opened by Konstantinos Tampouris (ktamp) - Monday, 01 January 2018, 21:05 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 29 September 2018, 09:11 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Antonio Rojas (arojas)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
'gweled' does not start.
When starting 'gweled' from the terminal, the following message is displayed:

(gweled:1861): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Operation not supported
Segmentation fault

Additional info:
* package version:
gweled 0.9.1-4

Steps to reproduce:
Just run 'gweled'.
This task depends upon

Closed by  Antonio Rojas (arojas)
Saturday, 29 September 2018, 09:11 GMT
Reason for closing:  Fixed
Additional comments about closing:  gweled 0.9.1-5
Comment by Eli Schwartz (eschwartz) - Tuesday, 02 January 2018, 00:17 GMT
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Architecture (x86_64 → All)
  • Field changed: Severity (Low → High)
  • Task assigned to Eric Belanger (Snowman)
```
[eschwartz@didactylos ~]$ gweled

(gweled:21645): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Operation not supported
Segmentation fault
[eschwartz@didactylos ~]$ gweled
double free or corruption (out)
Aborted
```

It seems to sporadically switch between the two errors.

Unfortunately, Eric has had very little time to do anything recently, and the package was anyways not really touched since 2012 or so (except to rebuild for hooks and .MTREE). It's also seen no upstream development since around then, either. So I don't know what the odds are that this will get fixed.
Comment by Eli Schwartz (eschwartz) - Monday, 05 February 2018, 15:24 GMT
In a now-dustbinned forum thread, someone linked a patch that is supposed to fix this.

BBS: https://bbs.archlinux.org/viewtopic.php?id=234202
Patch: https://launchpadlibrarian.net/355791454/gweled-fix-librsvg-segfault.patch

Unfortunately, the patch leads to a 404 not found error, and since it was linked directly instead of linking to the actual bugreport that contained it, and the forum poster does not seem to have an interest in reporting this here...

Well, I assume it is probably this launchpad bug: https://bugs.launchpad.net/gweled/+bug/1741664

Which would explain why the patch itself is gone, because a v1 patch was removed from that bug and replaced with a v2. Lesson learned: linking the patch file is *stupid*, linking the bug itself and allowing the bug wranglers and developers *who have a capable and working brain* to select the attachment from the bug report, is sane.
This also allows us to know where the patch came from, so we know why we should trust it.

...

Sorry for the rant. :)
Comment by Johannes Sasongko (sjohannes) - Friday, 23 March 2018, 16:10 GMT
As of librsvg 2.42.3 this issue doesn't occur anymore, and Gweled runs fine now.

(Technically there's still a bug with Gweled's error handling, but without the librsvg bug it doesn't get triggered.)
Comment by peterklarc (peterklarc) - Wednesday, 26 September 2018, 19:40 GMT
  • Field changed: Percent Complete (100% → 0%)
Error:
librsvg-CRITICAL **: 13:52:36.617: rsvg_handle_write: assertion 'error == NULL || *error == NULL' failed
Segmentation fault
-------
gweled 0.9.1-4
librsvg 2:2.44.4-1
-------
Works if downgrade librsvg 2:2.44.2-1
Comment by Eli Schwartz (eschwartz) - Wednesday, 26 September 2018, 19:42 GMT
There's probably an underlying librsvg bug to this, but presumably https://bazaar.launchpad.net/~dnax88/gweled/trunk/revision/92 would prevent gweled from simply crashing.
Comment by Johannes Sasongko (sjohannes) - Thursday, 27 September 2018, 03:24 GMT
I can confirm that the linked rev 92 fixes this (it's the same as my "v2" patch). The relevant part is the `GError *error = NULL;` change.

I don't know whether librsvg would consider this something to be fixed on their side. On one hand it does break client code. On the other hand, standard error handling in GLib requires[1] that:

> A GError* must be initialized to NULL before passing its address to a function that can report errors.

so Gweled wasn't using the API correctly.


[1] https://developer.gnome.org/glib/stable/glib-Error-Reporting.html

Loading...