# gimp, kde, xorg



## Anonymous (May 19, 2010)

Hi!

I have FreeBSD 8.0, KDE 4.4.3, Xorg 7.5...

After last updates (Xorg, KDE, GNOME stuff...) GIMP doesn't show correct Image Window.
Image window has (had) on the bottom of the window pulldown menus for zoom, units...
After all of this updates it doesn't show anymore. I rebuld GIMP but it is the same.

Thanks in advance,

Mitja
-------
http://starikarp.redbubble.com


----------



## sixtydoses (May 20, 2010)

Not sure if I really understand what your problem is but you could try removing ~/.gimp* and rebuild it.


----------



## OH (May 20, 2010)

I see this problem too, but frankly it doesn't bother me that much beyond not being able to use the zoom-applet from it.

I notice these messages when starting The Gimp:


```
(gimp:2858): Gtk-CRITICAL **: gtk_container_remove: assertion `GTK_IS_TOOLBAR (container) || 
widget->parent == GTK_WIDGET (container)' failed

(gimp:2858): Gtk-WARNING **: Attempting to add a widget with type GtkHBox to a GtkFrame, but
as a GtkBin subclass a GtkFrame can only contain one widget at a time; it already contains a
widget of type GtkHBox
```

Perhaps someone with a greater understanding of (GTK-)programming can comment on these.


----------



## Anonymous (May 20, 2010)

OH said:
			
		

> I see this problem too, but frankly it doesn't bother me that much beyond not being able to use the zoom-applet from it.
> 
> I notice these messages when starting The Gimp:
> 
> ...



I have to used this a lot. On Debian it works.


----------



## expl (May 20, 2010)

OH said:
			
		

> I see this problem too, but frankly it doesn't bother me that much beyond not being able to use the zoom-applet from it.
> 
> I notice these messages when starting The Gimp:
> 
> ...



First error means that widget that is being removed is not a child of the container.

Second error is probably a result of the first error, as the container in question can contain only one child and since that child has not been removed it fails to insert a new child.

This however does not help understand greater picture of the problem's origins. To do that GIMP needs to be started inside a debugger and these messages traced to specific code.


----------



## Anonymous (Jun 4, 2010)

OH said:
			
		

> I see this problem too, but frankly it doesn't bother me that much beyond not being able to use the zoom-applet from it.



But there are not just a problem with ZOOM. Just for example: if I change a size of the picture I don't see a percentage of work which was before. The same is with using plugins etc...
I rebuilt gtk20, gimp but there are no changes. The problem exist.

Is this problem affecte just KDE4 users or exist also on Gnome or other WM, please?


----------



## Anonymous (Jun 14, 2010)

So many views but no help...
The same problem was on Linux but they solved it. I talk with one friend but he doesn't know how ):

BTW: the problem is IMO not related just for KDE 4 because it is the same when I use Fluxbox.


----------



## zeiz (Jun 15, 2010)

Gimp uses GTK but you have KDE installed. Qt an GTK libraries may interfere especially now when so many important changes happened.
I always try to get working both Gnome and KDE and it worked but recently I installed KDE after Gnome and got such a mess than had to reinstall everything from scratch. What I remember Gnome uses unixODBC library but KDE libiodbc and they are incompatible. Just a sample.
Did you try *WITHOUT_NOUVEAU=yes* in /etc/make.conf and portupgrade Xorg?
I got some improvements after that.


----------



## Anonymous (Jun 15, 2010)

zeiz said:
			
		

> Gimp uses GTK but you have KDE installed. Qt an GTK libraries may interfere especially now when so many important changes happened.
> I always try to get working both Gnome and KDE and it worked but recently I installed KDE after Gnome and got such a mess than had to reinstall everything from scratch. What I remember Gnome uses unixODBC library but KDE libiodbc and they are incompatible. Just a sample.
> Did you try *WITHOUT_NOUVEAU=yes* in /etc/make.conf and portupgrade Xorg?
> I got some improvements after that.



Yes, I did and I have it in make.conf. I rebuilt gtk20, GIMP but it is the same.


----------



## zeiz (Jun 15, 2010)

Just installed Gimp from packages (few updates still available) on machine with only KDE. 
It looks quite normal to me and I don't remember if I ever notice the pulldown menus on the bottom of the image window.
However if started from terminal the error mentioned are here (so it doesn't affect Gimp functionality).

```
$ gimp &
$ ** Message: Module '/usr/local/lib/gegl-0.1/ff-load.so' load error: /usr/local/lib/gegl-0.1/ff-load.so: 
Undefined symbol "avcodec_decode_video2"
:1: error: unexpected character `\1', expected keyword - e.g. `style'

(gimp:18623): Gtk-CRITICAL **: gtk_container_remove: assertion `GTK_IS_TOOLBAR (container) || widget->parent == GTK_WIDGET (container)' failed

(gimp:18623): Gtk-WARNING **: Attempting to add a widget with type GtkHBox to a GtkFrame, but as a GtkBin subclass a GtkFrame can only contain 
one widget at a time; it already contains a widget of type GtkHBox

(gimp:18623): Gtk-CRITICAL **: gtk_box_pack: assertion `child->parent == NULL' failed
```
On another machine I also have totally updated Gimp with totally updated Gnome (no KDE) and it looks absolutely the same (no menus). 
And the errors are absolutely the same!


----------



## Anonymous (Jun 15, 2010)

zeiz said:
			
		

> Just installed Gimp from packages (few updates still available) on machine with only KDE.
> It looks quite normal to me and I don't remember if I ever notice the pulldown menus on the bottom of the image window.
> However if started from terminal the error mentioned are here (so it doesn't affect Gimp functionality).
> 
> ...



Is it possible that is something wrong with gtk20 as was on Linux?


----------



## zeiz (Jun 15, 2010)

Let me check Linux, I'll be right back.


----------



## wblock@ (Jun 15, 2010)

Been watching this thread but wasn't sure exactly was missing.  Trying it in an Xubuntu VM shows that it's the GIMP status bar, and searching on that finds this bug report: https://bugs.launchpad.net/ubuntu/+source/gimp/+bug/542916

Has anyone contacted the port maintainer or entered a PR?


----------



## zeiz (Jun 15, 2010)

Interesting! I checked Ubuntu, Fedora and Slackware(KDE). The menus you've mentioned are there (+ cursor position) and the errors ARE NOT there.
Looks like our Gimp here was modified a little bit to fit the current conditions and have Gimp working anyway.
I found your message to Joe Marcus and his reply. He is the right person. You could add in your report that in Gnome everything is the same.
So, you found a bug!


----------



## wblock@ (Jun 15, 2010)

With that Ubuntu bug report and some skimming through the gimp git repository, I think this is the code they were talking about.

I reworked that into a port patch which seems to work for me, but needs more testing.  Here's the PR.

To test the totally unguaranteed patch at your own risk, download it from that PR.
Save as /usr/ports/graphics/gimp-app/files/patch-app-display-gimpstatusbar.c
Rebuild and reinstall the gimp-app port.


----------



## zeiz (Jun 15, 2010)

I tried the patch but

```
===>  Patching for gimp-app-2.6.8_4,1
===>   gimp-app-2.6.8_4,1 depends on package: libtool>=2.2 - found
===>  Applying FreeBSD patches for gimp-app-2.6.8_4,1
patch: **** malformed patch at line 11: @@ -171,12 +173,13 @@
=> Patch patch-app-display-gimpstatusbar.c failed to apply cleanly.
*** Error code 1

Stop in /usr/ports/graphics/gimp-app.
*** Error code 1
```


----------



## wblock@ (Jun 15, 2010)

zeiz said:
			
		

> I tried the patch but
> 
> ```
> patch: **** malformed patch at line 11: @@ -171,12 +173,13 @@
> ...



Maybe carriage returns or line wrap or something else.  Here's a direct link.


----------



## OH (Jun 15, 2010)

For ease of use you could probably add _work/gimp-2.6.8/_ to the start of the path, other than that this fixes it for me (8.0, amd64, fully up to date).
Thanks!


----------



## zeiz (Jun 15, 2010)

@wblock.
That's it. The patch from your link works. Thanks!
Couple of errors still appear:

```
$ gimp &
$ ** Message: Module '/usr/local/lib/gegl-0.1/ff-load.so' load error: /usr/local/lib/gegl-0.1/ff-load.so: Undefined symbol "avcodec_decode_video2"
:1: error: unexpected character `\1', expected keyword - e.g. `style'
:1: error: unexpected character `\1', expected keyword - e.g. `style'
```
I'll try play with gegl port.


----------



## wblock@ (Jun 15, 2010)

OH said:
			
		

> For ease of use you could probably add _work/gimp-2.6.8/_ to the start of the path, other than that this fixes it for me (8.0, amd64, fully up to date).
> Thanks!



Were you patching manually?  That should be unnecessary, the port will apply the patch.

The path has to be relative to $WRKSRC.  Makes it less convenient to manually patch but much easier to have the port do it.


----------



## OH (Jun 15, 2010)

wblock said:
			
		

> Were you patching manually?  That should be unnecessary, the port will apply the patch.
> 
> The path has to be relative to $WRKSRC.  Makes it less convenient to manually patch but much easier to have the port do it.



I stand corrected. Yes since I can't save the patch (as a normal user) inside the ports-dir, I usually save it under my home-dir and patch manually


----------



## Anonymous (Jun 15, 2010)

wblock said:
			
		

> With that Ubuntu bug report and some skimming through the gimp git repository, I think this is the code they were talking about.
> 
> I reworked that into a port patch which seems to work for me, but needs more testing.  Here's the PR.
> 
> ...



Thank you very much. GIMP works same as before. I have just one error:


> :1: error: unexpected character `\1', expected keyword - e.g. `style'



Thanks.


----------



## wblock@ (Jun 24, 2010)

wblock said:
			
		

> With that Ubuntu bug report and some skimming through the gimp git repository, I think this is the code they were talking about.
> 
> I reworked that into a port patch which seems to work for me, but needs more testing.  Here's the PR.
> 
> ...



The good news is gimp has been updated in ports to version 2.6.9, which has the patch built-in.

The bad news is if you used my patch, you have to delete it or the port will fail to build:`# rm /usr/ports/graphics/gimp-app/files/patch-app-display-gimpstatusbar.c`

After that, it will build and work.  2.6.9 looks like it doesn't have any problems with the status bar.


----------

