Run Frysk Monitor on any program, cause the program to fork, or clone, then double click on one of the events which has a stack trace symbole next to it. Here is the error from trying to do this with nautilius: java.lang.NullPointerException at lib.dw.DwarfDie.getDecl(FryskGui) at frysk.cli.hpd.SymTab.setSubprogram(FryskGui) at frysk.cli.hpd.SymTab.setFrames(FryskGui) at frysk.gui.srcwin.SourceWindow.generateProcStackTrace(FryskGui) at frysk.gui.srcwin.SourceWindow.finishSourceWin(FryskGui) at frysk.gui.srcwin.SourceWindow$LockObserver$31.run(FryskGui) at org.gnu.glib.CustomEvents.runEvents(libgtkjava-2.8.so) and here is the stack trace I was trying to view: cloning 3992: thread called clone and created {frysk.proc.LinuxPtraceTask@2915230,pid=3161,tid=3992,state=StartClonedTask.blockedOffspring} #0 0x0055e258 in clone () #1 0x00b37aaa in [unknown] #2 0x006cf192 in g_thread_create_full () #3 0x006d09b6 in [unknown] #4 0x006d0b4b in g_thread_pool_push () #5 0x07a42384 in [unknown] #6 0x07a43639 in [unknown] #7 0x07a360d0 in gnome_vfs_async_get_file_info () #8 0x080e2786 in nautilus_directory_async_state_changed () #9 0x080f6b3f in [unknown] #10 0x080f6ba6 in [unknown] #11 0x08094015 in [unknown] #12 0x08096c04 in [unknown] #13 0x0809a083 in [unknown] #14 0x08068b7a in [unknown] #15 0x08096954 in [unknown] #16 0x08129cee in [unknown] #17 0x080a6e6a in [unknown] #18 0x080a9e06 in [unknown] #19 0x080f6835 in [unknown] #20 0x080e1ad7 in [unknown] #21 0x080e3cda in [unknown]
sami> there is more <sami> java.lang.NullPointerException <sami> at frysk.gui.srcwin.SourceWindow.attachEvents(FryskGui) <sami> at frysk.gui.srcwin.SourceWindow.finishSourceWin(FryskGui) <sami> at frysk.gui.srcwin.SourceWindow.<init>(FryskGui) <sami> at frysk.gui.srcwin.SourceWindowFactory.createSourceWindow(FryskGui) <sami> at frysk.gui.monitor.eventviewer.TimeLine$TimeLineDrawingArea.mouseEvent(FryskGui) <sami> at org.gnu.gtk.Widget.fireMouseEvent(libgtkjava-2.8.so) <sami> at org.gnu.gtk.Widget.handleButtonPressed(libgtkjava-2.8.so)
This is a special case because the use StackFrame stack trace is a saved stack trace from a previous event, and then process is currently running during the attempted raising of the SourceWindow.
2007-03-22 Mike Cvet <mcvet@redhat.com> * SourceWindow.java (generateProcStackTrace): Only set frames for SymTab if the RunState is stopped. Addresses #4222.
I can't reproduce the lib.dw error, but do still get the SourceWindow nullpointer.
I believe this should fix it. Sami? 2007-03-22 Mike Cvet <mcvet@redhat.com> * SourceWindow.java (generateProcStackTrace): Only set frames for SymTab if the RunState is not running. Addresses #4222. * SourceWindow.java (SourceWindow): Don't call populateStackBrowser() explicitly; instead set global StackFrame array. (finishSourceWin): If the RunState is not stopped, use the global StackFrame array as a parameter to populateStackTrace(). (populateStackBrowser): Set temporary StackFrame to first element of array parameter if the StackView returns no selected frame. Fixes #4222.
According to sami, the above patch fixes the problem.