Community
Participate
Working Groups
Launching Eclipse 3.3M7 on Solaris 9 (with the launcher patch from bug 176805) produces hundreds of the following warnings printed to the stdout console: ** (Eclipse:13532): WARNING **: pango-layout.c:2435: broken PangoLayout These messages are due to the old version of GTK on Solaris 9. Similar bugs have been reported before with Eclipse 3.0 on Linux Redhat 8 and marked WONTFIX (bug #55743, bug #56638) because the Eclipse Project Plan explicitly states that only GTK versions 2.2.1 or newer are supported. But on Solaris 9, the situation is somewhat special because GTK 2.1.0 is available as a precompiled package from Sun (package: SUNWGtkr, VERSION: 11.9.0,REV=2002.10.17.10.57, PSTAMP: sfw-patch20021017110354). So most installations have exactly this GTK version. A newer version is available from sunfreeware.com, but it visually looks very strange so it's not usable according to bug #140244 comment 16; there are other problems with this one according to bug #177949 comment 15. Recompiling GTK oneself is really hard according to bug #140244 comment 18. I have not found any other available newer GTK version for Solaris 9. Because it's so hard getting a GTK version other than 2.1.0 on Solaris 9, it seems that consensus was on bug #140244 to work around the known issues with that GTK version, and allow users to run Eclipse although it is not officially supported. Following this approach, I'd like to suggest the following: 1. PangoLayout message in pango-layout.c:2435 should be printed only once (A static variable could be used to remember when it has been printed before) 2. The text of the message should be improved, saying e.g. "WARNING **: broken PangoLayout, consider upgrading to GTK+-2.2.1 or newer Also, I'd like to get an idea what problems users with a broken PangoLayout in their GTK version will likely experience?
I have no idea exactly what is broken in Pango for GTK 2.1.0. Can you set Device.DEBUG=true so we can see where the error message is coming from?
./eclipse -vmargs -DDevice.DEBUG=true does not give me any additional console output, could you be a little more explicit what kind of debug info I should switch on and where to expect it?
1) Check SWT out of CVS from HEAD (http://www.eclipse.org/swt/cvs.php) 2) Hack the boolean DEBUG in the class Device, setting it to true
Do I need to play any tricks with the Classpath? I'm working on my Solaris 9 host, and org.eclipse.swt HEAD shows errors in the problems view due to incorrect classpath. Ctrl+Shift+T, Device, appears to bring me to a win32 variant instead of Solaris. Any advice?
Did you follow the steps? Creating a .classpath for the platform is one of them. I wish it was not (don't get me started on this).
Ah, I'm sorry! One shouldn't think one knows how to check out of CVS if instructions are there :-) Anyways, I see the same messages printed to the Console as before, but even with Device.DEBUG=true I don't get any additional messages giving any hint. I tried finding the C native sources for the sharedlibs, are they also in the org.eclipse.swt project? - Searching for "broken PangoLayout" doesn't give any match in my workspace...
The message "broken PangoLayout" originates from the can_break_at function in pango-layout.c. The function seems to be used to figure out the desired wrapping behaviour (either wrap on word or char). If the PangoWrapMode is not set, it will print out the broken message and return that it is a valid place to break. I tried exercising the StyledText widget in CustomControlExample (org.eclipse.swt.examples) and wrapping seemed to be OK. There might be other places (such as tooltips) where wrapping might be affected. Seeing how the message comes straight from the native code, and we can't do anything to not display it. The only thing we can do is add a minimum version check for GTK and print an error message for that.
If we know when "can_break_at" is called, can we temporarily turn off GTK error logging or is "can_break_at" called from all over the place?
"can_break_at" is an internal utility function that is called from all over the place. With a quick look, I found 8 API functions that eventually call "can_break_at" at some point.
(In reply to comment #7) > The message "broken PangoLayout" originates from the can_break_at function Thanks a lot for analyzing this! So do I get this right, this is part of the GTK library? This explains why I didn't find it in the workspace :-) > If the PangoWrapMode is not set, it will print out the broken message and > return that it is a valid place to break. How can I make sure the PangoWrapMode is set? Is this something the application can or should should do? Why isn't it set? (In reply to comment #8) > Can we temporarily turn off GTK error logging I think we'd probably like to turn off GTK error logging globally in our application built on top of Eclipse. Is this possible? This is probably nothing the Eclipse Framework should do, but I think our application could do it.
See Device.setWarnings().
SWT no longer provides Solaris builds.