Pinta crashes at startup on MacOS- missing DLLs

Bug #1958066 reported by Carlo A. Bertelli
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Pinta
Triaged
Undecided
Unassigned

Bug Description

Pinta 2.2 crashes at startup on MacOS 10.14.6, but I think on other versions, declaring:
Unhandled exception. System.TypeInitializationException: The type initializer for 'Gtk.Application' threw an exception.
 ---> System.DllNotFoundException: Gtk: libgtk-3-0.dll, libgtk-3.so.0, libgtk-3.0.dylib, gtk-3.dll
   at GLibrary.Load(Library library)
   at Gtk.Application..cctor()
   --- End of inner exception stack trace ---
   at Gtk.Application.Init()
   at Pinta.MainClass.Main(String[] args)
Abort trap: 6

Tags: osx
Revision history for this message
Cameron White (cameronwhite91) wrote :

Were you building Pinta from source, or is this from the official Pinta.app bundle?

Revision history for this message
Carlo A. Bertelli (carlo-bertelli) wrote : Re: [Bug 1958066] Re: Pinta crashes at startup on MacOS- missing DLLs

It's the official app bundle. Maybe the problem is the version of MacOS on
my mac, 10.14.6. I reported the bug even to macbrew-cask and a user replied
that Pinta was running well on MacOS 11.
Maybe I should build it from source.

On Sun, Jan 16, 2022 at 4:20 PM Cameron White <email address hidden>
wrote:

> Were you building Pinta from source, or is this from the official
> Pinta.app bundle?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1958066
>
> Title:
> Pinta crashes at startup on MacOS- missing DLLs
>
> Status in Pinta:
> New
>
> Bug description:
> Pinta 2.2 crashes at startup on MacOS 10.14.6, but I think on other
> versions, declaring:
> Unhandled exception. System.TypeInitializationException: The type
> initializer for 'Gtk.Application' threw an exception.
> ---> System.DllNotFoundException: Gtk: libgtk-3-0.dll, libgtk-3.so.0,
> libgtk-3.0.dylib, gtk-3.dll
> at GLibrary.Load(Library library)
> at Gtk.Application..cctor()
> --- End of inner exception stack trace ---
> at Gtk.Application.Init()
> at Pinta.MainClass.Main(String[] args)
> Abort trap: 6
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pinta/+bug/1958066/+subscriptions
>
>

tags: added: osx
Revision history for this message
Carlo A. Bertelli (carlo-bertelli) wrote :

Building from source lets me run Pinta on MacOS 10.14.6, but I would like
to build the bundle. What should I do?
TIA

On Sun, Jan 16, 2022 at 4:27 PM Carlo A. Bertelli (Charta s.r.l.) <
<email address hidden>> wrote:

> It's the official app bundle. Maybe the problem is the version of MacOS on
> my mac, 10.14.6. I reported the bug even to macbrew-cask and a user replied
> that Pinta was running well on MacOS 11.
> Maybe I should build it from source.
>
> On Sun, Jan 16, 2022 at 4:20 PM Cameron White <email address hidden>
> wrote:
>
>> Were you building Pinta from source, or is this from the official
>> Pinta.app bundle?
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1958066
>>
>> Title:
>> Pinta crashes at startup on MacOS- missing DLLs
>>
>> Status in Pinta:
>> New
>>
>> Bug description:
>> Pinta 2.2 crashes at startup on MacOS 10.14.6, but I think on other
>> versions, declaring:
>> Unhandled exception. System.TypeInitializationException: The type
>> initializer for 'Gtk.Application' threw an exception.
>> ---> System.DllNotFoundException: Gtk: libgtk-3-0.dll, libgtk-3.so.0,
>> libgtk-3.0.dylib, gtk-3.dll
>> at GLibrary.Load(Library library)
>> at Gtk.Application..cctor()
>> --- End of inner exception stack trace ---
>> at Gtk.Application.Init()
>> at Pinta.MainClass.Main(String[] args)
>> Abort trap: 6
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/pinta/+bug/1958066/+subscriptions
>>
>>

Revision history for this message
Cameron White (cameronwhite91) wrote :

Thanks, it might be useful to see the output from running with DYLD_PRINT_APIS=1 and/or DYLD_PRINT_LIBRARIES=1 environment variables set

Thinking about it, the installers are built on the Github actions CI machines which look to be running macOS 11.6.2. The GTK libraries are bundled, so it's possible that those are failing to load on your machine if they require a newer macOS version?

Revision history for this message
Carlo A. Bertelli (carlo-bertelli) wrote :

building with make && make install lets it open by command line.

On Sun, Jan 16, 2022 at 5:00 PM Cameron White <email address hidden>
wrote:

> ** Tags added: osx
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1958066
>
> Title:
> Pinta crashes at startup on MacOS- missing DLLs
>
> Status in Pinta:
> New
>
> Bug description:
> Pinta 2.2 crashes at startup on MacOS 10.14.6, but I think on other
> versions, declaring:
> Unhandled exception. System.TypeInitializationException: The type
> initializer for 'Gtk.Application' threw an exception.
> ---> System.DllNotFoundException: Gtk: libgtk-3-0.dll, libgtk-3.so.0,
> libgtk-3.0.dylib, gtk-3.dll
> at GLibrary.Load(Library library)
> at Gtk.Application..cctor()
> --- End of inner exception stack trace ---
> at Gtk.Application.Init()
> at Pinta.MainClass.Main(String[] args)
> Abort trap: 6
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pinta/+bug/1958066/+subscriptions
>
>

Revision history for this message
Cameron White (cameronwhite91) wrote :

To build the bundle, you can run the installer/macos/build_installer.sh script
You'll need to edit it to exit before the "Signing..." section since that requires code signing certificates, and if you already have GTK etc installed on your system then you can also probably exit before the "Bundling GTK" section to generate a much smaller bundle

Revision history for this message
Carlo A. Bertelli (carlo-bertelli) wrote :

I built as per the instructions found in the Readme.md, installing
dependencies with brew.
I'll try that and report back.

On Sun, Jan 16, 2022 at 5:10 PM Cameron White <email address hidden>
wrote:

> Thanks, it might be useful to see the output from running with
> DYLD_PRINT_APIS=1 and/or DYLD_PRINT_LIBRARIES=1 environment variables
> set
>
> Thinking about it, the installers are built on the Github actions CI
> machines which look to be running macOS 11.6.2. The GTK libraries are
> bundled, so it's possible that those are failing to load on your machine
> if they require a newer macOS version?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1958066
>
> Title:
> Pinta crashes at startup on MacOS- missing DLLs
>
> Status in Pinta:
> New
>
> Bug description:
> Pinta 2.2 crashes at startup on MacOS 10.14.6, but I think on other
> versions, declaring:
> Unhandled exception. System.TypeInitializationException: The type
> initializer for 'Gtk.Application' threw an exception.
> ---> System.DllNotFoundException: Gtk: libgtk-3-0.dll, libgtk-3.so.0,
> libgtk-3.0.dylib, gtk-3.dll
> at GLibrary.Load(Library library)
> at Gtk.Application..cctor()
> --- End of inner exception stack trace ---
> at Gtk.Application.Init()
> at Pinta.MainClass.Main(String[] args)
> Abort trap: 6
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pinta/+bug/1958066/+subscriptions
>
>

Revision history for this message
Carlo A. Bertelli (carlo-bertelli) wrote :

Thanks! I'll try that.

On Sun, Jan 16, 2022 at 5:20 PM Cameron White <email address hidden>
wrote:

> To build the bundle, you can run the installer/macos/build_installer.sh
> script
> You'll need to edit it to exit before the "Signing..." section since that
> requires code signing certificates, and if you already have GTK etc
> installed on your system then you can also probably exit before the
> "Bundling GTK" section to generate a much smaller bundle
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1958066
>
> Title:
> Pinta crashes at startup on MacOS- missing DLLs
>
> Status in Pinta:
> New
>
> Bug description:
> Pinta 2.2 crashes at startup on MacOS 10.14.6, but I think on other
> versions, declaring:
> Unhandled exception. System.TypeInitializationException: The type
> initializer for 'Gtk.Application' threw an exception.
> ---> System.DllNotFoundException: Gtk: libgtk-3-0.dll, libgtk-3.so.0,
> libgtk-3.0.dylib, gtk-3.dll
> at GLibrary.Load(Library library)
> at Gtk.Application..cctor()
> --- End of inner exception stack trace ---
> at Gtk.Application.Init()
> at Pinta.MainClass.Main(String[] args)
> Abort trap: 6
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/pinta/+bug/1958066/+subscriptions
>
>

Revision history for this message
grofaty (grofaty) wrote :

Today I have downloaded build Pinta version from Github master repository: https://github.com/PintaProject/Pinta/actions/runs/3402100648 and unzip the program and then executed: ./Pinta and program has started up successfully and is working fine.

But then I tried to run it inside Podman container and I have got exactly the same error as in the first post of this bug report. After investigating it looks like default Fedora Silverblue 36 container image does not have GTK installed, so I installed GTK3 package inside container: sudo yum install gtk3
and then executed: ./Pinta and program has started up successfully and is working fine.

I don't know about MacOS, maybe it is the same problem like at my case, MacOS not having GTK3 installed by defaut

Revision history for this message
Cameron White (cameronwhite91) wrote :

We do bundle GTK3 with the macOS installer - I think the issue is likely that the bundled libraries are built for a newer macOS version and aren't compatible with older versions

Changed in pinta:
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.