Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » Error loading control flow pane(LTTng )
Error loading control flow pane [message #655582] Mon, 21 February 2011 19:45 Go to next message
Bill is currently offline BillFriend
Messages: 5
Registered: February 2011
Junior Member
Hi,

I'm running RH 5.4 and I'm seeing the following error when I load the LTTng workspace on the control flow tab. This happens when I first load the workspace without any traces. Please let me know if I am missing something in my setup. BTW, I don't have root access to the system I'm using.

java.lang.NullPointerException
at org.eclipse.linuxtools.lttng.ui.views.controlflow.ControlFlo wView.checkForSWTBugItemHeightAdjustement(ControlFlowView.ja va:1070)
at org.eclipse.linuxtools.lttng.ui.views.controlflow.ControlFlo wView.createPartControl(ControlFlowView.java:487)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewR eference.java:375)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReferen ce.java:229)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:31 3)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:52 9)
at org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1254)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.ja va:666)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.ja va:574)
at org.eclipse.ui.internal.PartSashContainer.createControl(Part SashContainer.java:568)
at org.eclipse.ui.internal.PerspectiveHelper.activate(Perspecti veHelper.java:272)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.j ava:981)
at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPa ge.java:2632)
at org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWind ow.java:2986)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(Workbe nchWindow.java:2967)
at org.eclipse.ui.internal.WorkbenchWindow$21.runWithException( WorkbenchWindow.java:2284)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3515)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3164)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(Work benchAdvisor.java:803)
at org.eclipse.ui.internal.Workbench$31.runWithException(Workbe nch.java:1567)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run (StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3515)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3164)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2548)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)


Thanks,
Bill
Re: Error loading control flow pane [message #655598 is a reply to message #655582] Mon, 21 February 2011 21:36 Go to previous messageGo to next message
Francois Chouinard is currently offline Francois ChouinardFriend
Messages: 28
Registered: July 2009
Junior Member
Hi Bill,

Let me get this straight:

1. You start your Eclipse
2. You switch to the LTTng perspective
3. You get a NulPointerException

Is this correct?

Which version of LTTng are you using? The one delivered with Linux Tools 0.7?

Re: Error loading control flow pane [message #655636 is a reply to message #655598] Tue, 22 February 2011 04:24 Go to previous messageGo to next message
Bill is currently offline BillFriend
Messages: 5
Registered: February 2011
Junior Member
Hi Francois,

That is correct. The LTTng version is 0.2.0.201009101021 which comes straight from the "Eclipse IDE for C/C++ Linux Developers (includes Incubating components)" I downloaded yesterday.

I'm starting to think it is related to the gnome installation. I also have this error from liblttvtraceread.so: undefined symbol: g_strcmp0. This terminates eclipse immediately after trying to load a sample trace.

Perhaps the setup is just too old. I ran the exact same setup on Fedora 14 without any issues. Any ideas?

Thanks,
Bill

Re: Error loading control flow pane [message #655791 is a reply to message #655636] Tue, 22 February 2011 16:15 Go to previous messageGo to next message
Francois Chouinard is currently offline Francois ChouinardFriend
Messages: 28
Registered: July 2009
Junior Member
Hi Bill,

It seems that my earlier reply didn't make it for some reason. I guess I clicked the wrong button...

[1] liblttvtraceread

The symbol "g_strcmp0" appeared in glibc 1.6 or so. If the symbol is not defined, you are likely to get a SIGSEGV upon loading the library and the app will crash in full glory.

The easy workaround is to replace "g_strcmp0" by the plain old "strcmp" in the lib source code and re-compile. That should do the trick. Let me know if you need help on this one.

BTW, we are working on providing a full Java version of the lib but don't hold your breath: it won't be ready before the fall and will only support the upcoming trace file format (including the improved UST - User Space Tracing).


[2] LTTng

LTTng v0.2.2 is a bit old and quite buggy. You should upgrade to v0.3.0 which is more stable. The preferred way to upgrade is to use the Eclipse Update Manager. The update site URL: http://download.eclipse.org/technology/linuxtools/update.

You can also find general instructions at http://www.eclipse.org/linuxtools/downloads.php.


[3] NPE

The NPE is caused by a missing check in checkForSWTBugItemHeightAdjustement(). This function retrieves the environment variable DESKTOP_SESSION and checks if it is either "gnome" or "kde" and provides a corresponding height adjustment to align ControlFlow process entries with their Gantt chart (this is to address an SWT issue).

My guess is that DESKTOP_SESSION is not defined in your environment and this results in an NPE. I will open a bug and provide the fix shortly.

As a workaround, I suggest that you define that variable and assign it any value you see fit. So far, we only tested t5his with "gnome" and "kde" but It would be interesting to know which environment you are using.


BTW, I realize I never asked: What is your environment?

Re: Error loading control flow pane [message #655818 is a reply to message #655791] Tue, 22 February 2011 17:35 Go to previous messageGo to next message
Francois Chouinard is currently offline Francois ChouinardFriend
Messages: 28
Registered: July 2009
Junior Member
Oops mistake:

The symbol "g_strcmp0" appeared in glibc *2.16* or so....

Sorry.
Re: Error loading control flow pane [message #655838 is a reply to message #655791] Tue, 22 February 2011 19:10 Go to previous messageGo to next message
Bill is currently offline BillFriend
Messages: 5
Registered: February 2011
Junior Member
Hi Francois,

I followed all of your steps:

1. export DESKTOP_SESSION=gnome
2. Update lttng to 0.3.0
3. Change g_strcmp0 to strcmp. I found only one instance in each library.

Everything is working until I try to open an experiment with the sample traces. Nothing seems to load. This step works on my Fedora 14 setup, but not the Red Hat 5.4 setup that is the "real" setup.

I'm so close right now. Any more ideas? I really appreciate the help you have given me on this. I never would have made it this far without your help!

Thanks,
Bill
Re: Error loading control flow pane [message #655882 is a reply to message #655838] Wed, 23 February 2011 01:12 Go to previous messageGo to next message
Bill is currently offline BillFriend
Messages: 5
Registered: February 2011
Junior Member
Hi Francois,

I fixed the problem. I needed to load the 2.3 library to view the sample traces. I thought I would get an error message in this case, but it looks like the errors showed up on stderr and I saw them when I exited eclipse.

Thanks for all your help!
Bill
Re: Error loading control flow pane [message #655886 is a reply to message #655882] Wed, 23 February 2011 01:52 Go to previous messageGo to next message
Francois Chouinard is currently offline Francois ChouinardFriend
Messages: 28
Registered: July 2009
Junior Member
Hi Bil,

I presume you no longer get an NPE but that now nothing shows up when you load an experiment.

It would help if you started your Eclipse from a shell and checked if you have libraries report any error when you try to load a trace. If you get an error, please post it so I can give it a look.

Also, try an experiment with a single trace or, even better, just double-click on a trace (i.e. no experiment).


Off the top of my head, here are a few things that can go wrong if you are not extra careful (this whole library thing is quite brittle and has to be revisited - once you get it working you never have to worry about it again but it can be painful to get there).

[1] Library build order

This could be caused by the order in which you compiled the libraries (BTW, we are fully aware that this procedure is quite error prone...)

After the compilation, your lib directory should look like this:

-rwxr-xr-x 1 francois francois 204813 2010-07-27 20:01 liblttvtraceread-2.3.so
-rwxr-xr-x 1 francois francois 206955 2010-07-27 20:01 liblttvtraceread-2.5.so
-rwxr-xr-x 1 francois francois 207115 2010-07-27 20:02 liblttvtraceread-2.6.so
-rw-r--r-- 1 francois francois 310864 2010-07-27 20:02 liblttvtraceread.a
-rwxr-xr-x 1 francois francois 1147 2010-07-27 20:02 liblttvtraceread.la
-rwxr-xr-x 1 francois francois 106425 2010-07-27 20:01 liblttvtraceread_loader-2.3.so
-rwxr-xr-x 1 francois francois 106425 2010-07-27 20:01 liblttvtraceread_loader-2.5.so
-rwxr-xr-x 1 francois francois 106425 2010-07-27 20:02 liblttvtraceread_loader-2.6.so
-rw-r--r-- 1 francois francois 141922 2010-07-27 20:02 liblttvtraceread_loader.a
-rwxr-xr-x 1 francois francois 1196 2010-07-27 20:02 liblttvtraceread_loader.la
lrwxrwxrwx 1 francois francois 30 2010-07-27 20:02 liblttvtraceread_loader.so -> liblttvtraceread_loader-2.6.so
lrwxrwxrwx 1 francois francois 23 2010-07-27 20:02 liblttvtraceread.so -> liblttvtraceread-2.6.so

Notice that the loader (liblttvtraceread_loader.so) and the default lib (liblttvtraceread.so) are soft links to the latest lib version.

The way the loaders are coded, they check if the trace can be parsed with the "current" version and *downgrade* if the check failed. The checking order (for now) is v2.6 -> v2.5 -> v2.3. If the soft link doesn't point to v2.6, the trace format might not be recognized... (BTW, if you are using the sample traces, they are at v2.5)


[2] Your LD_LIBRARY_PATH is not set correctly

The other possibility is that the libs might not be on your lib path (I understand that this is quite unlikely since the libs with the bad symbol were found previously but just in case...)

Try starting your Eclipse the following way:

LD_LIBRARY_PATH=<full path to your liblttvtraceread libs>:$LD_LIBRARY_PATH eclipse


You probably already tried these but I mention them just in case.

Anyway, I will try to get hold of RH 5.4 and "exercise" it Smile
Re: Error loading control flow pane [message #655887 is a reply to message #655886] Wed, 23 February 2011 01:54 Go to previous message
Francois Chouinard is currently offline Francois ChouinardFriend
Messages: 28
Registered: July 2009
Junior Member
Well, I guess you were still at it when I was replying Smile

Glad I could help.

Take care.
Previous Topic:importing files as links
Next Topic:Can events be filtered?
Goto Forum:
  


Current Time: Tue Apr 23 07:43:14 GMT 2024

Powered by FUDForum. Page generated in 0.03969 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top