Author Topic: [Kubuntu Linux] MyPaint crashes immediately after launch.  (Read 1263 times)

Offline edwinbarton

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
[Kubuntu Linux] MyPaint crashes immediately after launch.
« on: July 15, 2012, 07:37:45 pm »
Version of MyPaint is 1.0.0 installed via package manager.
Some details of sytem:
Kubuntu 12.04 32 bit
Athlon64-4200X2 CPU (dual core)
4Gb DDR400 (PC3200) DRAM
nVidia 7300GT PCI-e Graphics Card with 256mb Video Memory
Dual Monitors (without Xinerama enabled!), Display 0 is Acer X193w 19" LCD monitor, Display 1 is Envision 19" CRT monitor.

All other apps installed work fine, though had problems with Pinta originally when I had been using Xinerama, since disabling Xinerama it works fine now though.

Output when attempting to launch MyPaint from shell prompt:
Code: [Select]
builtin python 2.6 json support
confpath = /home/edwin/.mypaint/
Traceback (most recent call last):
  File "/usr/bin/mypaint", line 176, in <module>
    main.main(datapath, extradata, confpath)
  File "/usr/share/mypaint/gui/main.py", line 72, in main
    run()
  File "/usr/share/mypaint/gui/main.py", line 47, in run
    app = application.Application(datadir, extradata, options.config, args)
  File "/usr/share/mypaint/gui/application.py", line 118, in __init__
    self.layout_manager.get_subwindow_by_role("backgroundWindow")
  File "/usr/share/mypaint/gui/layout.py", line 127, in get_subwindow_by_role
    self.get_widget_by_role(role)
  File "/usr/share/mypaint/gui/layout.py", line 85, in get_widget_by_role
    result = self.factory(role, self, *self.factory_opts)
  File "/usr/share/mypaint/gui/windowing.py", line 57, in window_factory
    window = module.Window(app)
  File "/usr/share/mypaint/gui/backgroundwindow.py", line 40, in __init__
    self.bgl = BackgroundList(self)
  File "/usr/share/mypaint/gui/backgroundwindow.py", line 117, in __init__
    pixbuf = gdk.pixbuf_new_from_file(filename)
glib.GError: Couldn't recognize the image file format for file '/usr/share/mypaint/backgrounds/mrmamurk/mamurk_b_1.png'
I'm hoping someone has encountered this problem and knows how to fix it.  Or if the problem is fixed in a newer release then could someone please post a link to a .deb package of a newer version or a link to a PPA with the newer version?

Any help would be appreciated, thank you,
Edwin Barton

Offline achadwick

  • Mypaint Dev
  • Full Member
  • *****
  • Posts: 206
  • Karma: +7/-0
  • MyPaint developer and Mypaint-testing PPA owner
Re: [Kubuntu Linux] MyPaint crashes immediately after launch.
« Reply #1 on: July 15, 2012, 08:05:34 pm »
Version of MyPaint is 1.0.0 installed via package manager.

It'd be helpful to know from which source you got it. I'm going to assume it's the Ubuntu one.

Quote
Output when attempting to launch MyPaint from shell prompt:
Code: [Select]
builtin python 2.6 json support
[...]
glib.GError: Couldn't recognize the image file format for file '/usr/share/mypaint/backgrounds/mrmamurk/mamurk_b_1.png'

Check that file exists, is readable, and not zero-length, and that it can be opened in Eye of GNOME (and/or GIMP, and/or the KDE image viewer). If it looks incorrect, try purging and then reinstalling the mypaint and mypaint-data* packages.

Quote
I'm hoping someone has encountered this problem and knows how to fix it.  Or if the problem is fixed in a newer release then could someone please post a link to a .deb package of a newer version or a link to a PPA with the newer version?

If you're feeling brave, you could try the mypaint-testing PPA. Have a look in the Development forum here. However we've taken no specific action to fix the problem you're seeing, and it looks like it reflects some sort of installation brokenness.

Offline edwinbarton

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: [Kubuntu Linux] MyPaint crashes immediately after launch.
« Reply #2 on: July 15, 2012, 08:55:30 pm »
Thank you for taking the time to reply, I have tried purging and reinstalling MyPaint a few times with no success (both the mypaint and mypaint-data packages).  Additionally per your suggestion I have verified that the files in the '/usr/share/mypaint/backgrounds/mrmamurk/' folder are all accessible and that none are zero length files (I was successfully able to view them with Gwenview).  I'm starting to wonder if maybe the version of glib that's installed might not be the problem.  Though I don't know which particular glib package MyPaint calls, I see close to a dozen or more glib packages installed on my system (some for networking, some for other things).  Oh and yes I did install from the default Ubuntu repository.

Offline achadwick

  • Mypaint Dev
  • Full Member
  • *****
  • Posts: 206
  • Karma: +7/-0
  • MyPaint developer and Mypaint-testing PPA owner
Re: [Kubuntu Linux] MyPaint crashes immediately after launch.
« Reply #3 on: July 15, 2012, 09:53:45 pm »
Hmm. Are *all* PNG loads from libgdk-pixbuf2 programs broken? That error message is from libgdk-pixbuf and occurs when picking a loader module for the file has failed. It could indicate a broken install, or a broken cache file, but it indicates that you at least have a sort-of working libgdk-pixbuf core, and that pygtk is installed and talking to it.

Any particularly strange combinations of backports, local compiles, PPAs etc on your system?

Make sure "libgdk-pixbuf2.0-0" and "libgdk-pixbuf2.0-dev" are installed. Then check using the terminal that the output of "gdk-pixbuf-query-loaders" mentions "libpixbufloader-png.so" for "The PNG image format", along with a load of gibberish detailing how the format should be recognised. If it does, check that that file it mentions exists on the disk and isn't corrupt (mine is "/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so").

If something looks amiss, try a reinstall of libgdk-pixbuf2.0-0 and libgdk-pixbuf2.0-common, and then if that doesn't work try running.

Code: [Select]
$ sudo gdk-pixbuf-query-loaders --update-cache

It may also be worth checking your user runtime environment for bad values of vars like GDK_PIXBUF_MODULEDIR etc., as mentioned in the manpage.

Offline edwinbarton

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: [Kubuntu Linux] MyPaint crashes immediately after launch.
« Reply #4 on: July 16, 2012, 01:38:24 am »
Ok, tried reinstalling the 2 libgdk-pixbuf packages you mentioned but it didn't make any difference.  As for checking the one file to see if it's corrupt or not I don't really know how to do that, I did verify that the file 'libpixbufloader-png.so' (retrieved from the query output) exists and Dolphin reports it's size as 17.6Kb (reasonably close in size to some of the other files in the same folder, give or take a few Kb).  As for any PPA's or Backports, I have to say yes, several PPA's and I have the Kubuntu Backports Repo enabled as well as the Kubuntu Backports PPA.  Also as for checking the runtime environment like you mentioned I don't really understand what that means (I'm originally a Windows user but I've been using Kubuntu now for a couple years, but there is a great deal I still don't know about using linux), is that kind of like the 'environment variables' in a Windows environment?  I could check to see if other pixbuf programs are working or not but I don't really know what programs those would be offhand, is there an easy way I can list the packages that depend on the 2 libgdk-pixbuf2.0 packages, then I can scan through the list and try some of the programs that might be listed there to see if they work or not.

Almost forgot, if it matters the version numbers for the 2 libgdk-pixbuf2.0 packages is 2.26.  Also is there a specific pygtk package that's supposed to be installed?  In my package manager I didn't see any specific package named pygtk, only a couple of python-gtk******* packages that weren't installed though several software packages were listed when I searched for pygtk in my package manager (I use Synaptic because while Muon has come a long way it still isn't as good about notifying about package conflicts as Synaptic is in my opinion).  Could this be part of the problem?

Also I want to thank you for being so patient with me and helping me try to track down the problem.

Offline edwinbarton

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: [Kubuntu Linux] MyPaint crashes immediately after launch.
« Reply #5 on: July 16, 2012, 01:51:42 am »
Also on a hunch I checked the repo source (not sourcecode) for the 2 libgdk-pixbuf packages and they're both from the main ubuntu/kubuntu repo, not from a PPA or one of the Repos I added.

Offline edwinbarton

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: [Kubuntu Linux] MyPaint crashes immediately after launch.
« Reply #6 on: July 16, 2012, 08:31:18 pm »
I think I might have figured it out (sort of at least, still not sure why I seem to be the only one affected by this though), it seems that 2 of the .png files in the backgrounds folder must be using some special feature of the .png specification that for some reason is not supported by the pixbuf png loader (or one of the packages called by the relevant pixbuf loader).  I was sort of able to confirm this by copying all of the .png files from the affected backgrounds folder into a temporary folder and compressing them into a .zip file which I then renamed into a .cbz file (compressed comic book format) and opened it with the program Comix which is one of the programs that I get in the list when I search my package manager for 'pygtk'.  I can successfully view all but 2 of those files with Comix.  I haven't figured out how to get Comix to show me the filename for each individual file in the compressed comic book archive though so I'm not entirely sure which files they are, but I'm willing to bet that at least one of those files is the one mentioned in the Glib error message I get when I try to launch MyPaint from a shell prompt.  I'm going to try to see if I can figure out which of the 2 files it is that I can't view with Comix and then maybe try to convert them using GIMP or some other editor to the same .png specification as used by the other files.

Ok, I tried opening the 2 files (mamurk_b_1.png & mamurk_b_2.png) in Pinta but Pinta doesn't recognize them as .png files, they open just fine in GIMP though and can be previewed just fine in Gwenview.  If I enable the preview feature in Dolphin (I normally have it off to save on memory usage and just rely on a preview being generated when I actually select a file) I can view a preview of the 2 files just fine.  I'm not sure what is so different about these 2 files that keeps MyPaint and Pinta from being able to open them.  I tried using GIMP's 'Save for Web' plugin to resave the files into the temporary folder I setup, but even if I try to have GIMP generate an optimized palette I still can't open the files in Pinta (I'm using Pinta as a test bed figuring that if Pinta can open them then MyPaint will probably be able to as well once I figure out what's going on with those 2 files).  I doubt that it's a file corruption issue because of the fact that each time I've purged and reinstalled MyPaint my package manager has had to re-download the installation packages for both the main mypaint package and the mypaint-data package, and I find it highly unlikely that with the other disk operations taking place on my system (web page caching and other downloads and yet other things) that the files would be written to the exact same place on the hard drive each and every time causing them to become corrupted due to bad hard drive sectors (besides I've run fsck and it didn't find any problems).

Ok, it's definitely caused by those 2 background files, I manually deleted the backgrounds folder they were in (figuring I could always reinstall yet again), and VOILA!! MyPaint actually started right up, though it did complain a bit about my mouse (I think it was my mouse it was complaining about at least, might have been related to my drivers for my Wacom tablet though too since I didn't have my tablet plugged in at the time).  Now I just need to figure out how to fix those 2 files so I can access those backgrounds in MyPaint if I decide I want to.  Any thoughts?  I haven't tried running any of the .png optimizer programs against them yet, might give that a try here in a bit.  Still not sure why I seem to be the only one having this problem though, it's really weird.

Offline edwinbarton

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: [Kubuntu Linux] MyPaint crashes immediately after launch.
« Reply #7 on: July 16, 2012, 08:47:00 pm »
I think I might have figured it out (sort of at least, still not sure why I seem to be the only one affected by this though), it seems that 2 of the .png files in the backgrounds folder must be using some special feature of the .png specification that for some reason is not supported by the pixbuf png loader (or one of the packages called by the relevant pixbuf loader).  I was sort of able to confirm this by copying all of the .png files from the affected backgrounds folder into a temporary folder and compressing them into a .zip file which I then renamed into a .cbz file (compressed comic book format) and opened it with the program Comix which is one of the programs that I get in the list when I search my package manager for 'pygtk'.  I can successfully view all but 2 of those files with Comix.  I haven't figured out how to get Comix to show me the filename for each individual file in the compressed comic book archive though so I'm not entirely sure which files they are, but I'm willing to bet that at least one of those files is the one mentioned in the Glib error message I get when I try to launch MyPaint from a shell prompt.  I'm going to try to see if I can figure out which of the 2 files it is that I can't view with Comix and then maybe try to convert them using GIMP or some other editor to the same .png specification as used by the other files.

Ok, I tried opening the 2 files (mamurk_b_1.png & mamurk_b_2.png) in Pinta but Pinta doesn't recognize them as .png files, they open just fine in GIMP though and can be previewed just fine in Gwenview.  If I enable the preview feature in Dolphin (I normally have it off to save on memory usage and just rely on a preview being generated when I actually select a file) I can view a preview of the 2 files just fine.  I'm not sure what is so different about these 2 files that keeps MyPaint and Pinta from being able to open them.  I tried using GIMP's 'Save for Web' plugin to resave the files into the temporary folder I setup, but even if I try to have GIMP generate an optimized palette I still can't open the files in Pinta (I'm using Pinta as a test bed figuring that if Pinta can open them then MyPaint will probably be able to as well once I figure out what's going on with those 2 files).  I doubt that it's a file corruption issue because of the fact that each time I've purged and reinstalled MyPaint my package manager has had to re-download the installation packages for both the main mypaint package and the mypaint-data package, and I find it highly unlikely that with the other disk operations taking place on my system (web page caching and other downloads and yet other things) that the files would be written to the exact same place on the hard drive each and every time causing them to become corrupted due to bad hard drive sectors (besides I've run fsck and it didn't find any problems).

Ok, it's definitely caused by those 2 background files, I manually deleted the backgrounds folder they were in (figuring I could always reinstall yet again), and VOILA!! MyPaint actually started right up, though it did complain a bit about my mouse (I think it was my mouse it was complaining about at least, might have been related to my drivers for my Wacom tablet though too since I didn't have my tablet plugged in at the time).  Now I just need to figure out how to fix those 2 files so I can access those backgrounds in MyPaint if I decide I want to.  Any thoughts?  I haven't tried running any of the .png optimizer programs against them yet, might give that a try here in a bit.  Still not sure why I seem to be the only one having this problem though, it's really weird.

Ok, found some more information that might be helpful, I tried opening the 2 files with MyPaint now that I know they're the ones causing the problem and I get the following error message:

Code: [Select]
Traceback (most recent call last):
  File "/usr/share/mypaint/gui/application.py", line 133, at_application_start(*junk=())
                    else:
                        self.filehandler.open_file(fn)
  variables: {'fn': ('local', u'/home/edwin/Downloads/mypaint test/mamurk_b_1.png'), 'self.filehandler.open_file': ('local', <bound method FileHandler.wrapper of <gui.filehandling.FileHandler object at 0x989922c>>)}
  File "/usr/share/mypaint/gui/drawwindow.py", line 46, wrapper(self=<gui.filehandling.FileHandler object>, *args=(u'/home/edwin/Downloads/mypaint test/mamurk_b_1.png',), **kwargs={})
            try:
                func(self, *args, **kwargs)
                # gtk main loop may be called in here...
  variables: {'self': ('local', <gui.filehandling.FileHandler object at 0x989922c>), 'args': ('local', (u'/home/edwin/Downloads/mypaint test/mamurk_b_1.png',)), 'func': ('local', <function open_file at 0x9654924>), 'kwargs': ('local', {})}
  File "/usr/share/mypaint/gui/filehandling.py", line 249, open_file(self=<gui.filehandling.FileHandler object>, filename=u'/home/edwin/Downloads/mypaint test/mamurk_b_1.png')
            try:
                self.doc.model.load(filename, feedback_cb=self.gtk_main_tick)
            except document.SaveLoadError, e:
  variables: {'self.doc.model.load': ('local', <bound method Document.load of <lib.document.Document instance at 0x966b94c>>), 'feedback_cb': (None, []), 'self.gtk_main_tick': ('local', <function gtk_main_tick at 0x96548ec>), 'filename': ('local', u'/home/edwin/Downloads/mypaint test/mamurk_b_1.png')}
  File "/usr/share/mypaint/lib/document.py", line 389, load(self=<lib.document.Document instance>, filename=u'/home/edwin/Downloads/mypaint test/mamurk_b_1.png', **kwargs={'feedback_cb': <function gtk_main_tick>})
            try:
                load(filename, **kwargs)
            except gobject.GError, e:
  variables: {'load': ('local', <bound method Document.load_png of <lib.document.Document instance at 0x966b94c>>), 'kwargs': ('local', {'feedback_cb': <function gtk_main_tick at 0x96548ec>}), 'filename': ('local', u'/home/edwin/Downloads/mypaint test/mamurk_b_1.png')}
  File "/usr/share/mypaint/lib/document.py", line 449, load_png(self=<lib.document.Document instance>, filename=u'/home/edwin/Downloads/mypaint test/mamurk_b_1.png', feedback_cb=<function gtk_main_tick>)
            self.clear()
            self.load_layer_from_png(filename, 0, 0, feedback_cb)
            self.set_frame(*self.get_bbox())
  variables: {'feedback_cb': ('local', <function gtk_main_tick at 0x96548ec>), 'self.load_layer_from_png': ('local', <bound method Document.load_layer_from_png of <lib.document.Document instance at 0x966b94c>>), 'filename': ('local', u'/home/edwin/Downloads/mypaint test/mamurk_b_1.png')}
  File "/usr/share/mypaint/lib/document.py", line 304, load_layer_from_png(self=<lib.document.Document instance>, filename=u'/home/edwin/Downloads/mypaint test/mamurk_b_1.png', x=0, y=0, feedback_cb=<function gtk_main_tick>)
            s = tiledsurface.Surface()
            s.load_from_png(filename, x, y, feedback_cb)
            self.do(command.LoadLayer(self, s))
  variables: {'y': ('local', 0), 'x': ('local', 0), 'feedback_cb': ('local', <function gtk_main_tick at 0x96548ec>), 's.load_from_png': ('local', <bound method Surface.load_from_png of <lib.tiledsurface.Surface; proxy of <Swig Object of type 'TiledSurface *' at 0x9c21470> >>), 'filename': ('local', u'/home/edwin/Downloads/mypaint test/mamurk_b_1.png')}
  File "/usr/share/mypaint/lib/tiledsurface.py", line 372, load_from_png(self=<lib.tiledsurface.Surface; proxy of <Swig Object of type 'TiledSurface *' at 0x9c21470> >, filename=u'/home/edwin/Downloads/mypaint test/mamurk_b_1.png', x=0, y=0, feedback_cb=<function gtk_main_tick>)
            filename_sys = filename.encode(sys.getfilesystemencoding()) # FIXME: should not do that, should use open(unicode_object)
            mypaintlib.load_png_fast_progressive(filename_sys, get_buffer)
            consume_buf() # also process the final chunk of data
  variables: {'mypaintlib.load_png_fast_progressive': ('global', <built-in function load_png_fast_progressive>), 'filename_sys': ('local', '/home/edwin/Downloads/mypaint test/mamurk_b_1.png'), 'get_buffer': ('local', <function get_buffer at 0x966e1ec>)}
RuntimeError: Failed to convince libpng to convert to RGBA (wrong color_type)[code\]

Offline mfraser

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: [Kubuntu Linux] MyPaint crashes immediately after launch.
« Reply #8 on: November 03, 2012, 06:36:58 pm »
I'm now getting the crash notifier appear even though I've deleted the two files. Any ideas?

Offline achadwick

  • Mypaint Dev
  • Full Member
  • *****
  • Posts: 206
  • Karma: +7/-0
  • MyPaint developer and Mypaint-testing PPA owner
Re: [Kubuntu Linux] MyPaint crashes immediately after launch.
« Reply #9 on: November 03, 2012, 11:55:08 pm »
Not a clue why this is happening; cannot reproduce at my end. I suspect this is happening because of some installation issue beyond our control, presumably some breakage with libgdkpixbuf since that's what we're using (@edwinbarton's message seems to indicate some weirdness detectable with libpng directly though).

Please consider upgrading to the upcoming PPA release. Is it still happening?

To make this bug less annoying, I've made the background loader in master more sensible when it encounters errors loading background images: now you'll have less to click through when it goes wrong for a lot of images, at least.

InTiLinuX Forum

Re: [Kubuntu Linux] MyPaint crashes immediately after launch.
« Reply #9 on: November 03, 2012, 11:55:08 pm »


Social Bookmarks

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

Günstige Soirée Robes de Cérémonie