Bug 4222 - Frysk crashes when trying to open the source window to view a stack trace
Summary: Frysk crashes when trying to open the source window to view a stack trace
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Mike Cvet
Depends on:
Blocks: 1633 2935
  Show dependency treegraph
Reported: 2007-03-20 19:11 UTC by Sami Wagiaalla
Modified: 2007-03-22 19:32 UTC (History)
3 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Sami Wagiaalla 2007-03-20 19:11:00 UTC
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:

   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
#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]
Comment 1 Mike Cvet 2007-03-20 19:18:48 UTC
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 
<sami>    at org.gnu.gtk.Widget.fireMouseEvent(libgtkjava-2.8.so)
<sami>    at org.gnu.gtk.Widget.handleButtonPressed(libgtkjava-2.8.so)
Comment 2 Mike Cvet 2007-03-20 19:20:47 UTC
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.
Comment 3 Mike Cvet 2007-03-22 13:34:32 UTC
2007-03-22  Mike Cvet  <mcvet@redhat.com>

	* SourceWindow.java (generateProcStackTrace): Only set frames for SymTab
	if the RunState is stopped. Addresses #4222.
Comment 4 Mike Cvet 2007-03-22 15:39:51 UTC
I can't reproduce the lib.dw error, but do still get the SourceWindow 
Comment 5 Mike Cvet 2007-03-22 18:17:42 UTC
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 
	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.
Comment 6 Mike Cvet 2007-03-22 19:32:04 UTC
According to sami, the above patch fixes the problem.