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

Startup Crash with Ubuntu 22.04 #215

Open
Selebrator opened this issue Mar 9, 2024 · 8 comments
Open

Startup Crash with Ubuntu 22.04 #215

Selebrator opened this issue Mar 9, 2024 · 8 comments

Comments

@Selebrator
Copy link

I tried running the (standard or self-contained) Linux version of the log manager on a minimal Ubuntu 22.04 install and get this fairly unhelpful stacktrace.

Unhandled exception. GLib.GException: Unrecognized image file format
   at Gdk.PixbufLoader.Write(Byte[] buf, UInt64 count)
   at Gdk.PixbufLoader.LoadFromStream(Stream input)
   at Gdk.PixbufLoader.InitFromStream(Stream stream)
   at Gdk.PixbufLoader..ctor(Stream stream)
   at Gdk.Pixbuf..ctor(Stream stream)
   at Eto.GtkSharp.Drawing.IconHandler.Create(Stream stream)
   at Eto.Drawing.Icon..ctor(Stream stream)
   at GW2Scratch.ArcdpsLogManager.Resources.GetProgramIcon()
   at GW2Scratch.ArcdpsLogManager.LoadingForm..ctor()
   at GW2Scratch.ArcdpsLogManager.Gtk.Program.Main()
Aborted (core dumped)

I made sure that libgdk-pixbuf (every package including that name) is installed. No idea why this isn't working. I don't need this to work. I just wanted to try this for #214.

@Sejsel
Copy link
Member

Sejsel commented Mar 9, 2024

I haven't seen this issue before... The program icon is the only icon that uses the ICO format, not sure if this is is caused by that, or if it's just because that's the first icon that is loaded. We could check platform when loading the icon and load a more suitable format on Linux if ICO needs some special format.

I have also found some recommendations online to refresh the mime database. Can you maybe try file --mime-type program_icon.ico on the file?

@Selebrator
Copy link
Author

$ file --mime-type evtc/ArcdpsLogManager/Images/program_icon.ico
evtc/ArcdpsLogManager/Images/program_icon.ico: image/vnd.microsoft.icon

There is a file for that mime type:

$ cat /usr/share/mime/image/vnd.microsoft.icon.xml
<?xml version="1.0" encoding="utf-8"?>
<mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="image/vnd.microsoft.icon">
  <!--Created automatically by update-mime-database. DO NOT EDIT!-->
  <comment>Windows icon</comment>
  <comment xml:lang="zh_TW">Windows 圖示</comment>
  <comment xml:lang="zh_CN">Windows 图标</comment>
  <comment xml:lang="uk">піктограма Windows</comment>
  <comment xml:lang="tr">Windows simgesi</comment>
  <comment xml:lang="sv">Windows-ikon</comment>
  <comment xml:lang="sr">Иконица Виндоуза</comment>
  <comment xml:lang="sl">Ikona Windows</comment>
  <comment xml:lang="sk">Ikona Windows</comment>
  <comment xml:lang="ru">Значок Windows</comment>
  <comment xml:lang="pt_BR">Ícone do Windows</comment>
  <comment xml:lang="pt">ícone Windows</comment>
  <comment xml:lang="pl">Ikona Windows</comment>
  <comment xml:lang="oc">icòna Windows</comment>
  <comment xml:lang="ko">Windows 아이콘</comment>
  <comment xml:lang="kk">Windows таңбашасы</comment>
  <comment xml:lang="it">Icona Windows</comment>
  <comment xml:lang="id">Ikon Windows</comment>
  <comment xml:lang="ia">Icone pro Windows</comment>
  <comment xml:lang="hu">Windows ikon</comment>
  <comment xml:lang="hr">Windows ikona</comment>
  <comment xml:lang="he">סמל של Windows</comment>
  <comment xml:lang="ga">deilbhín Windows</comment>
  <comment xml:lang="fur">icone Windows</comment>
  <comment xml:lang="fr">icône Windows</comment>
  <comment xml:lang="fi">Windows-kuvake</comment>
  <comment xml:lang="eu">Windows ikonoa</comment>
  <comment xml:lang="es">icono de Windows</comment>
  <comment xml:lang="en_GB">Windows icon</comment>
  <comment xml:lang="el">Εικονίδιο Windows</comment>
  <comment xml:lang="de">Windows-Symbol</comment>
  <comment xml:lang="da">Windows-ikon</comment>
  <comment xml:lang="cs">ikona Windows</comment>
  <comment xml:lang="ca">icona de Windows</comment>
  <comment xml:lang="bg">Икона — Windows</comment>
  <comment xml:lang="af">Windows-ikoon</comment>
  <glob pattern="*.ico"/>
  <alias type="application/ico"/>
  <alias type="image/ico"/>
  <alias type="image/icon"/>
  <alias type="image/x-ico"/>
  <alias type="image/x-icon"/>
  <alias type="text/ico"/>
</mime-type>

Both outputs are the same for the Ubuntu where it's broken and the Arch where it's working.

@Sejsel
Copy link
Member

Sejsel commented Mar 9, 2024

Can you try running gdk-pixbuf-query-loaders --update-cache (possibly with sudo)? Just want to see if that fixes it or if the issue remains after that. It should be a part of the packages you said you installed: https://manpages.ubuntu.com/manpages/jammy/man1/gdk-pixbuf-query-loaders.1.html

After that please also try update-mime-database /usr/share/mime (that one almost surely needs sudo), and then the previous gdk command.

@Selebrator
Copy link
Author

Selebrator commented Mar 9, 2024

That program in not in my path, but I located it.

$ sudo /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders --update-cache
$ sudo update-mime-database /usr/share/mime

I ran everything twice to make sure that order does not matter.
This did not fix the issue.

@Sejsel
Copy link
Member

Sejsel commented Mar 9, 2024

Can you try running the first command one more time after the database update (if you didn't)?

If that doesn't work, I will try to take a look at it in a VM, but it might take me a few days. Thanks for the testing!

@Selebrator
Copy link
Author

I alternated both commands a couple of times. Doesn't make a difference.

Take your time. I'm not in a rush. Actually I don't even depend in a fix. I got everything working like I want it to on my main pc.

@Selebrator
Copy link
Author

The issue also effects my everyday Ubuntu 24.04 install. I don't use it for gaming, so I'm not bothered. Spent an hour trying to find a fix, no luck.

@Sejsel
Copy link
Member

Sejsel commented Dec 14, 2024

I just installed Ubuntu 24.04 in a VM, tried the self-contained latest version off gw2scratch.com and it worked out of the box for me. How did you install Ubuntu? Which version are you trying? Do you have the patch from #214 applied?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants