phase1geo / Minder

Mind-mapping application for Elementary OS
GNU General Public License v3.0
976 stars 70 forks source link

Segfault on Arch-based distros after updating `discount` to 3.0.0a #597

Open droserasprout opened 5 months ago

droserasprout commented 5 months ago

Hi! I have found a bug, luckily 100% reproducible:

  1. Create a new root node with any name.
  2. Create a child node, but leave label empty.
  3. Select parent node, press Y, select child node.
  4. Hover the mouse cursor over the small black arrow.
  5. Segfault! 🎉 sticker_set_get_icon_info: assertion 'self != NULL' failed

image

phase1geo commented 5 months ago

What version of Minder and what Linux distribution are you using?

droserasprout commented 5 months ago

I'm on Arch Linux. Checked on:

phase1geo commented 5 months ago

I'm running the latest version 1.16.1 on elementary OS, and I'm not seeing the application crash when I repeat the steps to cause failure. The application will correctly display no tooltip with the name of the node (since the node doesn't have any text associated with it). Clicking the arrow will also correctly select the unnamed node.

I'm not sure if the problem you are seeing is because the issue was fixed since 1.15.6 or if the issue is specific to differences in the Vala compiler used to build the application for Arch and the one used for elementary (i.e., elementary tends to use an older version of valac based on the latest Ubuntu LTS).

Would it be possible for you to try building the 1.16.1 version of Minder from source and test out the scenario? That would at least rule out one possibility.

phase1geo commented 5 months ago

This is a problem with the Markdown to HTML conversion library that seems to be a problem on Arch-based systems. For some reason, discount library on these types of systems is 3.0.0a (I'm not even sure where this version comes from). Other systems use discount-2.x which doesn't cause this issue.

I'm trying to figure out a work-around for this problem, but there's nothing simple about this.

I'm just including this information for documentation purposes. There's nothing that you, as a user, can do to fix this issue. I'll update this issue if I figure anything out.

phase1geo commented 5 months ago

I would suggest that you try downloading/installing the Flathub version of Minder (1.16.1). The flatpak uses the proper version of the discount library, so it shouldn't exhibit the same problems that you are seeing.

droserasprout commented 5 months ago

I should have dig a bit deeper before submitting a report; of course it's not about empty labels. Confirming, downgrading discount package before building Minder solves the problem. I'll drop a line to the maintainer of this package in Arch to ask for a solution. Maybe we can create a separate package in AUR for 2.x branch.

$ pacman -Q discount minder-git 
discount 2.2.7.d-1
minder-git r1940.52163ee-1
phase1geo commented 5 months ago

If you are able to get this fixed in Arch, could you update this bug report (even if it gets closed out before then). I have updated the Minder README.md to indicate that Arch users should use the Flatpak version of Minder. If the packaged version of Minder gets properly fixed, I can change the README.md back to the original installation instructions.

Thanks!