Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to new API from mate-menus 1.21 #2

Merged
merged 2 commits into from Apr 3, 2019

Conversation

Projects
None yet
8 participants
@vkareh
Copy link

commented Mar 8, 2019

This may be considered work in progress. The mate-menus project has been updated and has breaking API changes. This pull request updates Brisk to support the new API, but until all necessary dependencies have been tagged appropriately (and 1.21 is a dev version), it might not make sense to merge this.

I will update this as necessary.

Fixes solus-project#115

@vkareh

This comment has been minimized.

Copy link
Author

commented Mar 8, 2019

@yetist - since the solus project has moved orgs since I opened this PR, I've moved it here

@kyrios123

This comment has been minimized.

Copy link

commented Mar 10, 2019

@vkareh - I just gave a quick try on mate 1.22.0 and indeed it's kinda unstable for now.

$ sudo journalctl -b | grep brisk
mars 10 12:16:03 mate122 brisk-menu[735]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 10 12:16:03 mate122 brisk-menu[735]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 10 12:16:03 mate122 brisk-menu[735]: Negative content width -7 (allocation 1, extents 4x4) while allocating gadget (node button, owner GtkToggleButton)
mars 10 12:16:03 mate122 brisk-menu[735]: Negative content width -7 (allocation 1, extents 4x4) while allocating gadget (node button, owner GtkToggleButton)
mars 10 12:16:03 mate122 dbus-daemon[640]: [session uid=1000 pid=640] Activating service name='org.mate.ScreenSaver' requested by ':1.21' (uid=1000 pid=735 comm="/usr/lib64/brisk-menu/brisk-menu " label="unconfined")
mars 10 12:16:05 mate122 brisk-menu[735]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 10 12:16:05 mate122 brisk-menu[735]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 10 12:16:05 mate122 brisk-menu[735]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 10 12:16:05 mate122 brisk-menu[735]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 10 12:16:05 mate122 brisk-menu[735]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 10 12:16:05 mate122 brisk-menu[735]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 10 12:16:05 mate122 brisk-menu[735]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 10 12:16:05 mate122 brisk-menu[735]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 10 12:16:05 mate122 brisk-menu[735]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 10 12:16:05 mate122 kernel: brisk-menu[735]: segfault at 1 ip 00007f52569c2cdd sp 00007ffc1364df28 error 4 in libgobject-2.0.so.0.5600.3[7f5256999000+31000]
mars 10 12:16:05 mate122 audit[735]: ANOM_ABEND auid=4294967295 uid=1000 gid=1000 ses=4294967295 subj==unconfined pid=735 comm="brisk-menu" exe="/usr/lib64/brisk-menu/brisk-menu" sig=11 res=1
mars 10 12:16:42 mate122 brisk-menu[941]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 10 12:16:42 mate122 brisk-menu[941]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 10 12:16:42 mate122 brisk-menu[941]: Negative content width -7 (allocation 1, extents 4x4) while allocating gadget (node button, owner GtkToggleButton)
mars 10 12:16:43 mate122 brisk-menu[941]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 10 12:16:43 mate122 brisk-menu[941]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

@FredBezies

This comment has been minimized.

Copy link

commented Mar 12, 2019

Tested this patch (applying it file by file) on an home built Mate Desktop 1.22 with Archlinux. Built and launched flawlessly. I hope this patch - or a better one - will be ready for Mate 1.22 release.

@Ste74

This comment has been minimized.

Copy link

commented Mar 19, 2019

@FredBezies if you confirm it work without any issue i can apply this patch 😉

@FredBezies

This comment has been minimized.

Copy link

commented Mar 19, 2019

@FredBezies if you confirm it work without any issue i can apply this patch wink

I build brisk-menu-git AUR package with it.

https://aur.archlinux.org/packages/brisk-menu-git/

For 0.5.0 version, there is a slight modification to apply, related to desktop-button.h file location.

Hello.

As Mate-Desktop 1.22.0 is officially released, you'll need a patch to get Brisk Menu build and working. https://mate-desktop.org/blog/2019-03-18-mate-1-22-released/

Here is the needed patch: 6883163

Related brisk-menu PR on project github: #2

Notice: you just need to modify in line 189 and 190 src/frontend/classic/desktop-button.h by src/frontend/desktop-button.h Sorry for the annoyance.

And of course, Mate 1.22 is mandatory here :)

@JoshStrobl

This comment has been minimized.

Copy link

commented Mar 20, 2019

Nobody has yet addressed @kyrios123 or worked with him on ensuring Brisk Menu is stable for me to merge this. This is considered a blocker.

@FredBezies

This comment has been minimized.

Copy link

commented Mar 20, 2019

Nobody has yet addressed @kyrios123 or worked with him on ensuring Brisk Menu is stable for me to merge this. This is considered a blocker.

Of course it is. I was just reporting my experience with it.

  1. I built Mate-Desktop 1.22 using tarballs and PKGBUILD from archlinux repositories, modify them to download the right source code.
  2. I'm the maintainer of this AUR package: https://aur.archlinux.org/packages/brisk-menu-git/
  3. I grabbed unified patch, applied it and make brisk-menu build on my Mate 1.22 homemade version.
  4. I reported it to work. That's all :)

That's all :)

@vkareh

This comment has been minimized.

Copy link
Author

commented Mar 20, 2019

I can see similar errors to @kyrios123 on first load after a fresh boot, but cannot reproduce during normal run. I don't know what the issue is yet, unfortunately... The menu seems to run smoothly for me, apart from the usual gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed, which are also on master, as far as I remember

@FredBezies

This comment has been minimized.

Copy link

commented Mar 30, 2019

And it crashes a lot, like Windows Millenium on steroïds. Got an error log with Manjaro Mate and a port of Mate 1.22:

Looks like something is wrong with libgobject-2.0.so.

On both Archlinux and Manjaro, last glib2 version is 2.6.0.

mars 30 09:21:16 fredo-manja-mate brisk-menu[3606]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 09:21:16 fredo-manja-mate brisk-menu[3606]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 09:21:16 fredo-manja-mate brisk-menu[3606]: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkToggleButton)
mars 30 09:21:16 fredo-manja-mate brisk-menu[3606]: Negative content height -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
mars 30 09:21:16 fredo-manja-mate dbus-daemon[2924]: [session uid=1000 pid=2924] Activating service name='org.mate.ScreenSaver' requested by ':1.68' (uid=1000 pid=3606 comm="/usr/libexec/brisk-menu ")
mars 30 09:21:19 fredo-manja-mate brisk-menu[3606]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 09:21:19 fredo-manja-mate brisk-menu[3606]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 09:21:19 fredo-manja-mate brisk-menu[3606]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 09:21:19 fredo-manja-mate brisk-menu[3606]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 09:21:19 fredo-manja-mate brisk-menu[3606]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 09:21:19 fredo-manja-mate brisk-menu[3606]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 09:21:19 fredo-manja-mate brisk-menu[3606]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 09:21:19 fredo-manja-mate brisk-menu[3606]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 09:21:19 fredo-manja-mate brisk-menu[3606]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 09:21:19 fredo-manja-mate audit[3606]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=6 pid=3606 comm="brisk-menu" exe="/usr/libexec/brisk-menu" sig=11 res=1
mars 30 09:21:19 fredo-manja-mate kernel: brisk-menu[3606]: segfault at 3 ip 00007f1ec75711fd sp 00007fff0b6c29a8 error 4 in libgobject-2.0.so.0.6000.0[7f1ec756b000+34000]
mars 30 09:21:19 fredo-manja-mate kernel: audit: type=1701 audit(1553934079.129:97): auid=1000 uid=1000 gid=1000 ses=6 pid=3606 comm="brisk-menu" exe="/usr/libexec/brisk-menu" sig=11 res=1
mars 30 09:21:20 fredo-manja-mate systemd-coredump[3864]: Process 3606 (brisk-menu) of user 1000 dumped core.
                                                          #3  0x000055fe0a057b6f n/a (brisk-menu)
                                                          #7  0x000055fe0a052858 n/a (brisk-menu)
                                                          #11 0x000055fe0a05dcc9 n/a (brisk-menu)
                                                          #12 0x000055fe0a05e067 n/a (brisk-menu)
                                                          #19 0x000055fe0a05016b n/a (brisk-menu)
                                                          #21 0x000055fe0a0501be n/a (brisk-menu)

@FredBezies

This comment has been minimized.

Copy link

commented Mar 30, 2019

Got a debug log:

mars 30 11:49:41 fredo-arch-mate brisk-menu[4616]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 11:49:41 fredo-arch-mate brisk-menu[4616]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 11:49:41 fredo-arch-mate brisk-menu[4616]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 11:49:41 fredo-arch-mate brisk-menu[4616]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 11:49:41 fredo-arch-mate brisk-menu[4616]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 11:49:41 fredo-arch-mate brisk-menu[4616]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 11:49:41 fredo-arch-mate brisk-menu[4616]: g_set_application_name() called multiple times
mars 30 11:49:41 fredo-arch-mate brisk-menu[4616]: g_set_application_name() called multiple times
mars 30 11:49:41 fredo-arch-mate brisk-menu[4616]: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkToggleButton)
mars 30 11:49:41 fredo-arch-mate brisk-menu[4616]: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkToggleButton)
mars 30 11:49:41 fredo-arch-mate brisk-menu[4616]: Negative content height -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
mars 30 11:49:41 fredo-arch-mate brisk-menu[4616]: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkToggleButton)
mars 30 11:50:11 fredo-arch-mate brisk-menu[4616]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 11:50:11 fredo-arch-mate brisk-menu[4616]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 11:50:11 fredo-arch-mate brisk-menu[4616]: gtk_icon_theme_lookup_by_gicon_for_scale: assertion 'G_IS_ICON (icon)' failed
mars 30 11:50:11 fredo-arch-mate brisk-menu[4616]: gtk_icon_theme_lookup_by_gicon_for_scale: assertion 'G_IS_ICON (icon)' failed
mars 30 11:50:11 fredo-arch-mate brisk-menu[4616]: gtk_icon_theme_lookup_by_gicon_for_scale: assertion 'G_IS_ICON (icon)' failed
mars 30 11:50:11 fredo-arch-mate brisk-menu[4616]: gtk_icon_theme_lookup_by_gicon_for_scale: assertion 'G_IS_ICON (icon)' failed
mars 30 11:50:11 fredo-arch-mate brisk-menu[4616]: gtk_icon_theme_lookup_by_gicon_for_scale: assertion 'G_IS_ICON (icon)' failed
mars 30 11:50:11 fredo-arch-mate brisk-menu[4616]: gtk_icon_theme_lookup_by_gicon_for_scale: assertion 'G_IS_ICON (icon)' failed
mars 30 11:50:11 fredo-arch-mate brisk-menu[4616]: gtk_icon_theme_lookup_by_gicon_for_scale: assertion 'G_IS_ICON (icon)' failed
mars 30 11:50:11 fredo-arch-mate brisk-menu[4616]: gtk_icon_theme_lookup_by_gicon_for_scale: assertion 'G_IS_ICON (icon)' failed
mars 30 11:50:11 fredo-arch-mate brisk-menu[4616]: gtk_icon_theme_lookup_by_gicon_for_scale: assertion 'G_IS_ICON (icon)' failed
mars 30 11:50:11 fredo-arch-mate brisk-menu[4616]: gtk_icon_theme_lookup_by_gicon_for_scale: assertion 'G_IS_ICON (icon)' failed
mars 30 11:50:49 fredo-arch-mate brisk-menu[5034]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 11:50:49 fredo-arch-mate brisk-menu[5034]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 11:50:49 fredo-arch-mate brisk-menu[5034]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 11:50:49 fredo-arch-mate brisk-menu[5034]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
mars 30 11:50:49 fredo-arch-mate brisk-menu[5034]: g_set_application_name() called multiple times
mars 30 11:50:49 fredo-arch-mate brisk-menu[5034]: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkToggleButton)
mars 30 11:50:49 fredo-arch-mate brisk-menu[5034]: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkToggleButton)
mars 30 11:50:49 fredo-arch-mate brisk-menu[5034]: Negative content height -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate kernel: brisk-menu[5034]: segfault at 3 ip 00007f83e8b2d1fd sp 00007ffc89b31b88 error 4 in libgobject-2.0.so.0.6000.0[7f83e8b27000+34000]
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate brisk-menu[5034]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
mars 30 11:50:54 fredo-arch-mate systemd-coredump[5085]: Process 5034 (brisk-menu) of user 1000 dumped core.
                                                         #3  0x0000558b5a02784f brisk_classic_category_button_constructed (brisk-menu)
                                                         #7  0x0000558b5a022778 brisk_classic_window_add_section (brisk-menu)
                                                         #11 0x0000558b5a02d9c9 brisk_apps_backend_init_menus (brisk-menu)
                                                         #12 0x0000558b5a02dd67 brisk_apps_backend_reload (brisk-menu)
                                                         #19 0x0000558b5a020147 main (brisk-menu)
                                                         #21 0x0000558b5a02019e _start (brisk-menu)
-- Subject: Le processus 5034 (brisk-menu) a généré un fichier « core »
-- Le processus 5034 (brisk-menu) a planté et généré un fichier « core ».

Hope it helps !

@vkareh

This comment has been minimized.

Copy link
Author

commented Mar 30, 2019

Yep, that seems like the correct location for the issue. Thanks for the logs, I've been working on changing the category buttons, since they're what's failing on first load, but haven't been super successful yet (apart from removing the category buttons from being displayed, which of course fixes the crash :P)

@FredBezies

This comment has been minimized.

Copy link

commented Mar 30, 2019

Some more infos: working on git version + mate 1.22 patch.

Looks like problem is located in src/backend/apps/apps-section.c in function brisk_apps_section_update_directory and this line:

self->icon = matemenu_tree_directory_get_icon(directory);

@FredBezies

This comment has been minimized.

Copy link

commented Mar 30, 2019

@vkareh

Here is a link for the quick fix that have to be applied after your patch.

https://aur.archlinux.org/cgit/aur.git/tree/fix-launch.patch?h=brisk-menu

Hope it helps!

@wascardev

This comment has been minimized.

Copy link

commented Mar 30, 2019

I think brisk-menu is launched by MATE too early and try to access resources not yet available (icons).

@kyrios123

This comment has been minimized.

Copy link

commented Mar 30, 2019

I think brisk-menu is launched by MATE too early and try to access resources not yet available (icons).

This makes sense to me because after the first error, if I reload the menu, it seems to be working fine

@FredBezies

This comment has been minimized.

Copy link

commented Mar 30, 2019

I think brisk-menu is launched by MATE too early and try to access resources not yet available (icons).

This makes sense to me because after the first error, if I reload the menu, it seems to be working fine

Having to click "reload" on session opening is kinda annoying :(

@wascardev

This comment has been minimized.

Copy link

commented Mar 30, 2019

I made a fix but I'm not sure it is thread safe and I didn't find an event/state variable to check the icons availability, i used a sleep instead. I know, this is ugly but it could be one way to fix the issue.

wascardev@fc64981

@FredBezies

This comment has been minimized.

Copy link

commented Mar 30, 2019

I tested it and it only works with git version. Stable version is not supported for the moment. Ouch :(

@vkareh

This comment has been minimized.

Copy link
Author

commented Mar 30, 2019

Yes, on another thread we were discussing how another way to reproduce the issue is to change categories rapidly as you un/install a program, thus triggering a change in the menu tree, and so crashing it. MATE supports delaying application start at the session level, but that's just a hack. However, if nothing else, it would be a quick fix in the meantime. I have yet to try @FredBezies's and @wascardev's patches, which I intend to do on Monday once I'm at the office.

I'm glad this thread is being resurrected! This API update has been sitting here untested since last summer, so I'm thrilled to have all of you taking a look :)

@FredBezies

This comment has been minimized.

Copy link

commented Mar 31, 2019

These patches are work in progress. There could some bugs but at least, having a loading brisk menu - without categories icon - is better than nothing.

@kyrios123

This comment has been minimized.

Copy link

commented Mar 31, 2019

It's great this see this moving forward, thank you all, really !
I understand that some that are already running MATE 1.22 would like to have brisk fixed asap, even if it's just a quick hack but please don't rush the objective should be to tag a new release !

@FredBezies

This comment has been minimized.

Copy link

commented Apr 1, 2019

It's great this see this moving forward, thank you all, really !

Well, it is a way to keep this menu alive.

I understand that some that are already running MATE 1.22 would like to have brisk fixed asap, even if it's just a quick hack but please don't rush the objective should be to tag a new release !

A new release is indeed needed. Brisk menu was left alone for too long. Let's hope category icons can be managed without crash really soon.

Archlinux is providing Mate 1.22, Manjaro has it on its unstable branch. Some less known and spread distributions like NuTyX provides it too. So...

@JoshStrobl

This comment has been minimized.

Copy link

commented Apr 1, 2019

I'm sorry but my priority is not Arch, Manjaro, etc. My priority is unblocking MATE 1.22 upgrade for Solus, which is blocked by the various API changes from mate-menus. Having to click "reload" on session opening is not an acceptable solution. I'm quite grateful that @vkareh has been willing to put all this hard work into fixing Brisk Menu, it is really appreciated and I'm confident we can all work together to find the most optimal solution (I am open to temporarily disabling category icons, although it would not be ideal).

@FredBezies

This comment has been minimized.

Copy link

commented Apr 1, 2019

@JoshStrobl Hello.

I really understand you only care about Solus, but these distributions are already providing Mate 1.22 so it can help - in a way or another - to fix this crash and reload problem. They could be seen some kind of test bed for Solus migration.

Two friends on mine worked a full afternoon on Brisk menu git code and provided some work in progress patches.

Disabling category icons is really annoying but it is the only way to have working menu for now.

Besides this temporary fix, I'm a long time satisfied user of Brisk menu on my manjaro laptop and - sometimes - on my Archlinux desktop. You can understand it is important for me to see it fixed for good.

Have a good day.

@DataDrake

This comment has been minimized.

Copy link

commented Apr 1, 2019

@FredBezies it's not so much that we don't care as we aren't willing to rush a release despite other distros having already moved to 1.22. The fix will come in due time, when it is ready, and not a moment before. We appreciate the time everyone is putting into this. Please be patient!

@vkareh

This comment has been minimized.

Copy link
Author

commented Apr 1, 2019

Yes, I don't want to merge a hack. I spent some time today working on a fix but haven't been able to solve it. I'm using Fedora 29 for this, which doesn't actually have Brisk, but I need this also for Ubuntu MATE (which still runs on 1.20 in part because of this issue).

So if you're a distro maintainer, and you really want to ship this, you can distro-patch it locally. I wouldn't recommend merging this, though.

@FredBezies

This comment has been minimized.

Copy link

commented Apr 2, 2019

@DataDrake Let's hope it won't take months. I've proposed to manjaro mate maintainer to use it as a temporary fix. Getting a "crash and reload" behaviour really... Well, you know what I mean :)

@vkareh I used your pull request as a working base to get a still building brisk menu. Too bad this menu was left alone for months.

By the way, I'll wait and give any time for testing code if you need it. I will be really pleased to help keeping brisk alive.

@vkareh vkareh force-pushed the vkareh:update-to-mate-menus-1.21 branch from d0733a4 to da32112 Apr 2, 2019

@FredBezies

This comment has been minimized.

Copy link

commented Apr 2, 2019

I just pushed a commit (da32112) with some preliminary work on defering the menu backend init. It's the same code used during a change in menu items (after a update-desktop-database, for example), but called not just on the change signal, but also during bootstrap. It was already set up by default to wait 2 seconds as a low priority event, so this just piggybacks on that without any change in logic.

Great. Besides I fought a lot to create a diff - I'm not a git guru - your patch looks very promising.

It might need some refactor for code cleanliness and better reuse, but it seems to work on my side. Please test!

Build again brisk-menu git code using both your patches and it ran on my daily archlinux. Will test asap on my manjaro laptop and report.

Will edit my comment after testing on my manjaro laptop, but on my archlinux + testing enabled desktop powered pc, closing and opening session : no more crashes and icons are back. Yes !

No luck on my manjaro testing enabled with mate 1.22... Still crashing :(

Ouch !

@vkareh

This comment has been minimized.

Copy link
Author

commented Apr 2, 2019

Hmmm... No idea what could be the issue with Manjaro, you might want to try with the other patch that I posted inline just in case that helps.

Happy to hear it worked with Arch :)

@FredBezies

This comment has been minimized.

Copy link

commented Apr 2, 2019

Looks like I get what break everything on my manjaro... There seems to be some bugs with linux 5.0.x on Manjaro testing. Downgrading to Linux 4.19.xx LTS.

Just a guess for now. Will test for two or three days to see if I'm right or not here.

After some tests, it looks like it crashes on start 10 to 20% on cold boot / first login. After restarting lightdm, menu is loading and working. Category icons code is kinda explosive.

Will try to report but I don't know when I can do this. I think you'll need more testers for the incoming week. Sorry to put my help on hold. The joys of real life....

PS: forgot to add that your "stashed patch" is more stable on first load than the "loading category icons one" even if icons are not drawn.

@vkareh

This comment has been minimized.

Copy link
Author

commented Apr 3, 2019

@FredBezies - yes, in my tests, the stashed patch was rock solid, but it's ugly and doesn't leave it an option to recover from missing category icons. Maybe we can add a signal connect that would re-trigger the icon fetch somewhere down the line? but where?

Just to note, I've tested this on Fedora 29 with 5.0.5 kernel and on Ubuntu MATE 18.10 with 4.18.0 kernel. No crashes on either. I don't think it has to do with the kernel, more with (maybe) configuration flags in libmate-menus? On both systems I'm running MATE 1.22 built entirely from scratch.

@FredBezies

This comment has been minimized.

Copy link

commented Apr 3, 2019

@FredBezies - yes, in my tests, the stashed patch was rock solid, but it's ugly and doesn't leave it an option to recover from missing category icons. Maybe we can add a signal connect that would re-trigger the icon fetch somewhere down the line? but where?

Just to note, I've tested this on Fedora 29 with 5.0.5 kernel and on Ubuntu MATE 18.10 with 4.18.0 kernel. No crashes on either. I don't think it has to do with the kernel, more with (maybe) configuration flags in libmate-menus? On both systems I'm running MATE 1.22 built entirely from scratch.

After some more tests, I noticed that Defer "loading menu backend" patch is more prone to crash than the stashed patch. Maybe linux kernel or mate-menus flags were not guilty here?

Archlinux - and Manjaro ? - flags are not very strange:

PYTHON=/usr/bin/python2 ./configure \
        	--prefix=/usr \
        	--sysconfdir=/etc \
        	--localstatedir=/var \
        	--enable-python

Source: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/mate-menus

By the way, I thought python2 was going the way of the dodo with Mate 1.22 ?

For the technical part, I can't say. I'm only a stuntman...tester here trying to help. If you have any patch, just tell me. I'll try do some tests, but my spare time will be very limited until next wednesday.

@vkareh

This comment has been minimized.

Copy link
Author

commented Apr 3, 2019

so back to the drawing board... :/

did you get any crashes with the stashed patch? are your crashes only happening on first boot? after logout-login? randomly?

@FredBezies

This comment has been minimized.

Copy link

commented Apr 3, 2019

Stashed is ok as far as I tested for now. So only a few hours.

The other one "Defer..." crashes on cold boot, sometimes after login / logout. I'll try to rebuild it with debug symbol and report a crash log as soon as possible.

@FredBezies

This comment has been minimized.

Copy link

commented Apr 3, 2019

I spoke a little too fast. Got a crash on my laptop. Here is debug log.

Used version: git code + stashed patch.

avril 03 14:01:30 fredo-manja-mate brisk-menu[1036]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
avril 03 14:01:30 fredo-manja-mate brisk-menu[1036]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
avril 03 14:01:30 fredo-manja-mate brisk-menu[1036]: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkToggleButton)
avril 03 14:01:30 fredo-manja-mate dbus-daemon[933]: [session uid=1000 pid=933] Activating service name='org.mate.ScreenSaver' requested by ':1.17' (uid=1000 pid=1036 comm="/usr/libexec/brisk-menu ")
avril 03 14:01:47 fredo-manja-mate brisk-menu[1036]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
avril 03 14:01:48 fredo-manja-mate brisk-menu[1036]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
avril 03 14:02:00 fredo-manja-mate brisk-menu[1373]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
avril 03 14:02:00 fredo-manja-mate brisk-menu[1373]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
avril 03 14:02:00 fredo-manja-mate brisk-menu[1373]: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkToggleButton)
avril 03 14:02:00 fredo-manja-mate brisk-menu[1373]: Negative content height -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
avril 03 14:02:00 fredo-manja-mate dbus-daemon[1224]: [session uid=1000 pid=1224] Activating service name='org.mate.ScreenSaver' requested by ':1.15' (uid=1000 pid=1373 comm="/usr/libexec/brisk-menu ")
avril 03 14:02:05 fredo-manja-mate kernel: brisk-menu[1373]: segfault at 1 ip 0000563968f66226 sp 00007fff67065ef0 error 4 in brisk-menu[563968f57000+11000]
avril 03 14:02:07 fredo-manja-mate systemd-coredump[1524]: Process 1373 (brisk-menu) of user 1000 dumped core.
                                                           #0  0x0000563968f66226 brisk_apps_section_update_directory (brisk-menu)
                                                           #4  0x0000563968f64e39 brisk_apps_backend_recurse_root (brisk-menu)
                                                           #5  0x0000563968f64ee9 brisk_apps_backend_build_from_tree (brisk-menu)
                                                           #6  0x0000563968f64fcd brisk_apps_backend_init_menus (brisk-menu)
                                                           #7  0x0000563968f653c7 brisk_apps_backend_reload (brisk-menu)
                                                           #14 0x0000563968f5716b main (brisk-menu)
                                                           #16 0x0000563968f571be _start (brisk-menu)

Used version: git code + defer patch. ; cold boot crash.

avril 03 14:43:03 fredo-arch-mate brisk-menu[950]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
avril 03 14:43:03 fredo-arch-mate brisk-menu[950]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
avril 03 14:43:03 fredo-arch-mate dbus-daemon[779]: [session uid=1000 pid=779] Activating service name='org.mate.ScreenSaver' requested by ':1.28' (uid=1000 pid=950 comm="/usr/libexec/brisk-menu ")
avril 03 14:43:08 fredo-arch-mate brisk-menu[950]: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkToggleButton)
avril 03 14:43:12 fredo-arch-mate brisk-menu[950]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
avril 03 14:43:12 fredo-arch-mate kernel: brisk-menu[950]: segfault at 3 ip 00007f27e94fd1fd sp 00007ffcddf12058 error 4 in libgobject-2.0.so.0.6000.0[7f27e94f7000+34000]
avril 03 14:43:12 fredo-arch-mate brisk-menu[950]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
avril 03 14:43:12 fredo-arch-mate brisk-menu[950]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
avril 03 14:43:12 fredo-arch-mate brisk-menu[950]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
avril 03 14:43:12 fredo-arch-mate brisk-menu[950]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
avril 03 14:43:12 fredo-arch-mate brisk-menu[950]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
avril 03 14:43:12 fredo-arch-mate brisk-menu[950]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
avril 03 14:43:12 fredo-arch-mate brisk-menu[950]: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
avril 03 14:43:12 fredo-arch-mate brisk-menu[950]: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
avril 03 14:43:12 fredo-arch-mate systemd-coredump[1046]: Process 950 (brisk-menu) of user 1000 dumped core.
                                                          #3  0x000055806e45e84f brisk_classic_category_button_constructed (brisk-menu)
                                                          #7  0x000055806e459778 brisk_classic_window_add_section (brisk-menu)
                                                          #11 0x000055806e464d02 brisk_apps_backend_init_menus (brisk-menu)
                                                          #18 0x000055806e457147 main (brisk-menu)
                                                          #20 0x000055806e45719e _start (brisk-menu)
@vkareh

This comment has been minimized.

Copy link
Author

commented Apr 3, 2019

Interesting... How about git code + defer patch + stashed patch? I will try to fix the issue on the brisk_classic_category_button_constructed function and send a new patch sometime today

@FredBezies

This comment has been minimized.

Copy link

commented Apr 3, 2019

Interesting... How about git code + defer patch + stashed patch? I will try to fix the issue on the brisk_classic_category_button_constructed function and send a new patch sometime today

Tests done on my manjaro powered laptop computer.

Both patches applied. Icons are not loaded or "once in a blue moon" :(

Error log related to this issue:

avril 03 16:08:13 fredo-manja-mate brisk-menu[5766]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
avril 03 16:08:13 fredo-manja-mate brisk-menu[5766]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
avril 03 16:08:13 fredo-manja-mate brisk-menu[5766]: Negative content width -11 (allocation 1, extents 6x6) while allocating gadget (node button, owner GtkToggleButton)
avril 03 16:08:13 fredo-manja-mate brisk-menu[5766]: Negative content height -3 (allocation 1, extents 2x2) while allocating gadget (node button, owner GtkToggleButton)
avril 03 16:08:13 fredo-manja-mate dbus-daemon[5609]: [session uid=1000 pid=5609] Activating service name='org.mate.ScreenSaver' requested by ':1.19' (uid=1000 pid=5766 comm="/usr/libexec/brisk-menu ")
avril 03 16:08:28 fredo-manja-mate brisk-menu[5766]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed
avril 03 16:08:28 fredo-manja-mate brisk-menu[5766]: gdk_window_get_origin: assertion 'GDK_IS_WINDOW (window)' failed

No crashes while doing 5 or 6 logout/login sequence.
No crashes after a reboot or a cold boot.

But with Brisk-menu, you're never sure :(

@vkareh vkareh force-pushed the vkareh:update-to-mate-menus-1.21 branch from da32112 to 69b8745 Apr 3, 2019

@vkareh

This comment has been minimized.

Copy link
Author

commented Apr 3, 2019

@FredBezies - I think I've got it now! 69b8745

Had to revert some changes from the original API update commit, and generate the icons locally based on the directory path. It discards some nice additions from the newer libmate-menus API, but it's more true to how Brisk used to behave on 1.20.

@FredBezies

This comment has been minimized.

Copy link

commented Apr 3, 2019

Will test this asap. Saying goodbye to stashed patch apparently. Just give me 15 minutes. My laptop is waiting to test your last patch.

Keeping fingers crossed!

You nailed this big bad bug! You nailed it! :D

Tested last patch with defer one and mate-1.22 api upgrade patch, and no problems so far.

Login/logout? Check
Reboot? Check
Cold boot? Check

I will test it as much as I can both virtually and on my laptop until Friday morning (Paris time) and bring back anything that might crash.

Simple question? Can we apply all the patches to the old stable version while a new major version is released?

Thanks for the patches anyway!

@vkareh

This comment has been minimized.

Copy link
Author

commented Apr 3, 2019

So, I removed the Defer patch, actually. Once this is confirmed fixed my plan is to squash both commits together, as this change should be atomic.

What do you mean with applying these patches to the old stable version?

@FredBezies

This comment has been minimized.

Copy link

commented Apr 3, 2019

I applied defer patch. Will try without it. Report asap.

@Ste74

This comment has been minimized.

Copy link

commented Apr 3, 2019

Hi there, we can grab the commits and apply as patch for the stable release, not needed a new stable release soon.. Keep your time to clean code or to adjust better the code.. I talk as packager and i think all distro can do this...

@FredBezies

This comment has been minimized.

Copy link

commented Apr 3, 2019

Hi there, we can grab the commits and apply as patch for the stable release, not needed a new stable release soon.. Keep your time to clean code or to adjust better the code.. I talk as packager and i think all distro can do this...

I was going to write you about the beautiful work @vkareh have done here. Testing a "2 patches" version of the fix.

@vkareh : I think @Ste74 answered me before I can :)

Quick feedbacks on my manjaro mate testing powered laptop.

Login/logout? Check!
Reboot? Check!
Cold boot? Check!

Forgot to add: I'm the maintainer of brisk-menu-git and co-maintainer of brisk-menu on AUR... So you understand why I wanted to help you fixing brisk menu.

And cherry on the cake for @Ste74:

VirtualBox_Manjaro Mate_03_04_2019_19_34_20

Looks like @vkareh patches are working great :)

@vkareh

This comment has been minimized.

Copy link
Author

commented Apr 3, 2019

@Ste74, @FredBezies - Haha, I'm not a Brisk maintainer (although I've been one of the authors for a few years now ;)), so I cannot speak for the project directly. But, as I understand it, since the current MATE stable is 1.22, merging this would probably call for a new stable release, as 0.5.0 only works for MATE 1.20, and this patch makes it so that it only works with 1.22...

But I would worry about release versions only after this is merged, and @JoshStrobl would probably know better.

@vkareh

This comment has been minimized.

Copy link
Author

commented Apr 3, 2019

@flexiondotorg - seems like we have a candidate fix. I've been testing this on 18.10 with MATE 1.22 and I have not gotten any crashes since applying this last commit. Will test on 19.04 soon (need to compile 1.22 for it, unless you have an up-to-date ppa?)

@kyrios123

This comment has been minimized.

Copy link

commented Apr 3, 2019

@vkareh Here it's working perfectly fine as well with your last update.
I made a few reboots, logon/log off, add/remove the menu from the panel, edit some menu entries and I haven't encountered any issue.

Tested on Solus with kernels 4.20.16 & 5.0.5

@FredBezies

This comment has been minimized.

Copy link

commented Apr 3, 2019

@Ste74, @FredBezies - Haha, I'm not a Brisk maintainer (although I've been one of the authors for a few years now ;)), so I cannot speak for the project directly. But, as I understand it, since the current MATE stable is 1.22, merging this would probably call for a new stable release, as 0.5.0 only works for MATE 1.20, and this patch makes it so that it only works with 1.22...

But I would worry about release versions only after this is merged, and @JoshStrobl would probably know better.

Indeed this patch is THE call for a new version. But until it is released, let's use a workaround.

@kyrios123 Do you know how many reboots my poor laptop have done the last three days? Lets say something half my age... About 20 or so... I was fed up with them last night. At least, Brisk will be working with Mate 1.20/1.22 flawlessly :)

@vkareh

This comment has been minimized.

Copy link
Author

commented Apr 3, 2019

OK, we need to squash these commits then. I do not want these to be separate, as that means a log with broken builds. @JoshStrobl are you planning on doing a squash-and-rebase commit on your side, or do you want me to squash them locally and force-push here, or something else?

@flexiondotorg

This comment has been minimized.

Copy link

commented Apr 3, 2019

I've tested this patch and can confirm it fixes the issue. Thanks @vkareh 👍

I am carrying about a dozen patches for Brisk Menu in Debian/Ubuntu, some of them are PRs here for merging. So I will need to file new PRs for here.

@JoshStrobl What can we do to help get these merged and released? Would you be interested in giving me write access to the repo to act as a maintainer?

@JoshStrobl

This comment has been minimized.

Copy link

commented Apr 3, 2019

Hey @flexiondotorg, you've had a pending invite for a few months now to the MATE Team for the GetSolus org, which will grant you admin capabilities on this repository. You may however only see it by going to the organizations root, https://github.com/getsolus

@vkareh Yes I plan on performing a squash and rebase. Just need to read the backlog of comments and work, was busy travelling.

@JoshStrobl

This comment has been minimized.

Copy link

commented Apr 3, 2019

I saw no issues with the code, excellent work @vkareh.

@JoshStrobl JoshStrobl merged commit 3d5e639 into getsolus:master Apr 3, 2019

@JoshStrobl

This comment has been minimized.

Copy link

commented Apr 4, 2019

Just a follow-up, I am happy to do a stable release assuming @flexiondotorg doesn't have any other items he wishes to land. @kyrios123 will be doing more thorough testing and the MATE stack upgrade sometime soon after this week's sync to our stable repo.

@FredBezies

This comment has been minimized.

Copy link

commented Apr 4, 2019

Just a follow-up, I am happy to do a stable release assuming @flexiondotorg doesn't have any other items he wishes to land. @kyrios123 will be doing more thorough testing and the MATE stack upgrade sometime soon after this week's sync to our stable repo.

Does it mean that Brisk 0.6.0 will be soon a reality? Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.