Bug 234814 - x11/libfm: fix x11-fm/pcmanfm segfault on start.
Summary: x11/libfm: fix x11-fm/pcmanfm segfault on start.
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Alexandre C. Guimarães
URL: https://reviews.freebsd.org/D18840
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-10 09:01 UTC by w.schwarzenfeld
Modified: 2019-01-28 20:57 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (portmaster)
rigoletto: maintainer-feedback? (jsm)


Attachments
pcmanfm.gdb (17.39 KB, text/plain)
2019-01-10 09:01 UTC, w.schwarzenfeld
no flags Details
Enhance flavors x11/libfm (25.86 KB, patch)
2019-01-12 21:17 UTC, Olivier Duchateau
no flags Details | Diff
Patch to split x11/libfm (29.47 KB, patch)
2019-01-14 19:09 UTC, Olivier Duchateau
no flags Details | Diff
Patch to split x11/libfm (30.20 KB, patch)
2019-01-14 19:23 UTC, Olivier Duchateau
no flags Details | Diff
Bump qt portrevisions since it changed meanwhile (15.66 KB, patch)
2019-01-20 20:04 UTC, Jesper Schmitz Mouridsen
no flags Details | Diff
added missing libfm-gtk part (28.77 KB, patch)
2019-01-20 22:39 UTC, Jesper Schmitz Mouridsen
no flags Details | Diff
Everything is building now. (35.45 KB, patch)
2019-01-22 19:59 UTC, Alexandre C. Guimarães
no flags Details | Diff
This should apply. (29.80 KB, patch)
2019-01-23 16:50 UTC, Alexandre C. Guimarães
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description w.schwarzenfeld freebsd_triage 2019-01-10 09:01:00 UTC
Created attachment 200978 [details]
pcmanfm.gdb

x11-fm/pcmanfm and x11-fm/pcmanfm-gtk3 segfaults on start without any error message.
(11.2amd64).
Comment 1 w.schwarzenfeld freebsd_triage 2019-01-12 08:18:47 UTC
Now I got:
(pcmanfm:47422): GLib-GObject-WARNING **: 09:12:58.548: invalid (NULL) pointer instance

(pcmanfm:47422): GLib-GObject-CRITICAL **: 09:12:58.549: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(pcmanfm:47422): GLib-GObject-WARNING **: 09:12:58.549: invalid (NULL) pointer instance

(pcmanfm:47422): GLib-GObject-CRITICAL **: 09:12:58.549: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(pcmanfm:47422): GLib-GObject-CRITICAL **: 09:12:58.549: g_object_set_qdata_full: assertion 'G_IS_OBJECT (object)' failed

(pcmanfm:47422): GLib-GObject-WARNING **: 09:12:58.549: invalid (NULL) pointer instance

(pcmanfm:47422): GLib-GObject-CRITICAL **: 09:12:58.549: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(pcmanfm:47422): GLib-GObject-WARNING **: 09:12:58.549: invalid (NULL) pointer instance

(pcmanfm:47422): GLib-GObject-CRITICAL **: 09:12:58.549: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(pcmanfm:47422): Gtk-CRITICAL **: 09:12:58.549: IA__gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed

(pcmanfm:47422): Gtk-CRITICAL **: 09:12:58.549: IA__gtk_container_add: assertion 'GTK_IS_WIDGET (widget)' failed

(pcmanfm:47422): Gtk-WARNING **: 09:12:58.568: Radio group does not contain an action with value '-1'

(pcmanfm:47422): Gtk-WARNING **: 09:12:58.568: Radio group does not contain an action with value '-1'

(pcmanfm:47422): Gtk-WARNING **: 09:12:58.571: Radio group does not contain an action with value '-1'

(pcmanfm:47422): GLib-GObject-CRITICAL **: 09:12:58.868: g_object_set: assertion 'G_IS_OBJECT (object)' failed
Segmentation fault (core dumped)
Comment 2 w.schwarzenfeld freebsd_triage 2019-01-12 08:33:21 UTC
(Seems no bug). But something is weird there. I can open pcmanfm with root, but not as user.
Comment 3 Olivier Duchateau 2019-01-12 21:17:51 UTC
Created attachment 201081 [details]
Enhance flavors x11/libfm

I made a patch which enhances flavors (now there are core, gtk2 and gtk3). It was tested with PCManFM (with Gtk2 flavor) without coredump (but still GLib warnings).

Be careful, some ports needs to be updated.
Comment 4 w.schwarzenfeld freebsd_triage 2019-01-12 23:14:12 UTC
Thanks, seems to work.
Comment 5 Alexandre C. Guimarães freebsd_committer 2019-01-13 15:15:25 UTC
Hi.

What is the purpose of the Core flavor? I mean, what will benefit of it, -qt versions?

Thanks! :-)
Comment 6 Olivier Duchateau 2019-01-13 17:35:22 UTC
(In reply to Alexandre C. Guimarães from comment #5)

Yes, core flavor is for Qt applications. But I think my patch needs more refinement, because poudriere complains about Gtk flavors.

We must add this line:

FLAVOR?=       ${FLAVORS:[1]}

And change this one:

LIB_DEPENDS=   libfm.so:x11/libfm@core

by

LIB_DEPENDS=   libfm.so:x11/libfm

Currently I can't test my changes, because I'm building (on my poudriere box) something else.
Comment 7 Alexandre C. Guimarães freebsd_committer 2019-01-13 18:00:14 UTC
Btw, new FLAVOR needs portsmgr approvement. I wasn't had time to test this patch yet but I will do later today. :)
Comment 8 Olivier Duchateau 2019-01-14 19:09:39 UTC
Created attachment 201136 [details]
Patch to split x11/libfm

I made new patch, because poudriere complains about malformed port. So I created slave port (x11/libfm-gtk), I think it is better.

The new port contains Gtk flavors, and x11/libfm its core library (linking to GLib, Gio).

The patch contains ports affected by these changes and I updated x11/Makefile too.
Comment 9 Olivier Duchateau 2019-01-14 19:23:32 UTC
Created attachment 201138 [details]
Patch to split x11/libfm

Fix build issue.
Comment 10 Alexandre C. Guimarães freebsd_committer 2019-01-14 20:14:30 UTC
Olivier,

Could test libfm with sysutils/bsdisks instead of disabling udisks support?

Pcmanfm run well for me without segfaulting.

Thanks!
Comment 11 Olivier Duchateau 2019-01-14 20:59:33 UTC
(In reply to Alexandre C. Guimarães from comment #10)
 
You can remove udisks configure option.
Comment 12 w.schwarzenfeld freebsd_triage 2019-01-15 01:00:24 UTC
I don't understand which sense this make. On the one side flavor for pcmanfm and on the other side  
split of libfm (??).
Comment 13 Alexandre C. Guimarães freebsd_committer 2019-01-15 02:26:47 UTC
(In reply to w.schwarzenfeld from comment #12)

FLAVORs are usually just accepted for versions gtk2-gtk3 and similar situations. The `core` is supposedly to be a SLAVEPORT like it was a sub-package; however I am still waiting to hear from portsmgr.

The difference is conceptual.
Comment 14 Olivier Duchateau 2019-01-15 05:36:16 UTC
(In reply to w.schwarzenfeld from comment #12)

Split of libfm is for Qt related ports. As poudriere can't create subpackage (or I don't know how to fix this error), I decided to create slave port for GTK flavors.

When flavors were committed, I asked mat@ why Qt ports are linked to Gtk2 (and why not Gtk3). He says me, it was for historical reason. I understand, but now flavors are present, we can split libfm, and let end users decided which flavor they want to use.
Comment 15 Olivier Duchateau 2019-01-15 05:41:31 UTC
To rigoletto@, in review the patch is buggy. Use rather the last one, with new port x11/libfm-gtk.
Comment 16 Jesper Schmitz Mouridsen freebsd_committer 2019-01-20 20:04:13 UTC
Created attachment 201296 [details]
Bump qt portrevisions since it changed meanwhile

no functional changes from 201138
Comment 17 Jesper Schmitz Mouridsen freebsd_committer 2019-01-20 22:39:36 UTC
Created attachment 201299 [details]
added missing libfm-gtk part

I forgot to svn add libfm-gtk before svn diff. So another attachment was required.

I am building the dependencies of libfm in poudriere now.
I'll give feedback as maintainer when it is done.
Comment 18 Alexandre C. Guimarães freebsd_committer 2019-01-20 22:55:11 UTC
(In reply to Jesper Schmitz Mouridsen from comment #17)
There are a few pkg-plist issues on libfm/libfm-gtk to be fixed. I will do them today.

Also, did you got the patch from the phab? In there libfm-gtk comes from a `svn cp` from libfm. If not, no problem, since I will be working on it today.

Thanks!
Comment 19 Jesper Schmitz Mouridsen freebsd_committer 2019-01-21 16:17:38 UTC
  (In reply to Alexandre C. Guimarães from comment #18)
Yeah I noted the pkg-plist problems. I did not use the phab diff, I took attachment #201138 [details], and changed the portrevisions for qt ports.
Comment 20 Alexandre C. Guimarães freebsd_committer 2019-01-22 19:59:58 UTC
Created attachment 201341 [details]
Everything is building now.
Comment 21 Jesper Schmitz Mouridsen freebsd_committer 2019-01-23 16:11:28 UTC
(In reply to Alexandre C. Guimarães from comment #20)
I cannot apply the patch against a clean ports r491044
libmfm-gtk is not in the tree.
I used svn cp x11/libfm x11/libfm-gtk first and then applied the patch succesfully.

I that the correct procedure?
Comment 22 Alexandre C. Guimarães freebsd_committer 2019-01-23 16:50:11 UTC
Created attachment 201364 [details]
This should apply.

Hi.

I've just attached another patch. Identical to the previous one but created with `svn diff --show-copies-as-adds`. This should apply correctly. ^^

Thanks!
Comment 23 Alexandre C. Guimarães freebsd_committer 2019-01-24 14:40:25 UTC
So, we can use `core` as a FLAVOR. I will revert to it and stuff.

Thanks! :-)
Comment 24 Jesper Schmitz Mouridsen freebsd_committer 2019-01-27 19:29:18 UTC
(In reply to Alexandre C. Guimarães from comment #23)
Perhaps libfm core is perhaps very soon to be obsolete since 
https://github.com/lxqt/libfm-qt/blob/781bbe3da673b3e9d5a141163b64959234e211b1/CHANGELOG#L4 (Released as 0.14 2019-01-25) 
I could not find any qt ports dependent on libfm not through libfm-qt..
https://www.freshports.org/search.php?stype=depends_all&method=match&query=libfm 
lxqt-panel builds without menu-cache, 
since https://github.com/lxqt/lxqt-panel/commit/d7a441cc7150b73adae1cf69114f5d8e3ac87a15#diff-af3b638bc2a3e6c650974192a53c7291R7

I'm planning to start upgrading the LXQt ports to 0.14 in the comming days.

BTW the pcmanfm@gtk2 and pcmanfm@gtk3 runs fine build from  
attachment #201341 [details] (I have not tested attachment #201364 [details])
Comment 25 Alexandre C. Guimarães freebsd_committer 2019-01-28 20:57:39 UTC
Might be better to wait the LXQt updates to know better what to do then.

Thanks.