Bug 3412 - Frysk throws a lot of StringIndexOutOfBoundsException and gives no response in GUI.
Summary: Frysk throws a lot of StringIndexOutOfBoundsException and gives no response i...
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Andrew Cagney
URL:
Keywords:
Depends on:
Blocks: 1633 2127
  Show dependency treegraph
 
Reported: 2006-10-23 08:00 UTC by Yong Zheng
Modified: 2006-11-22 23:09 UTC (History)
4 users (show)

See Also:
Host: X86_64
Target:
Build:
Last reconfirmed:


Attachments
the test case for this bug. (423 bytes, text/x-csrc)
2006-10-23 08:02 UTC, Yong Zheng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yong Zheng 2006-10-23 08:00:47 UTC
On X86_64, take the followings to reproduce the bug:
1) compile the attached .c file into executable program
2) run the above executable progam
3) start up FryskGui and choose the "Debug an Existing Process" in "Frysk
Startup Manager"
4) Click the "Click Here to Select a Process" and choose the program started at
the step 2)

then, you will get a lot of exception like the following and GUI will give no
response.

java.lang.StringIndexOutOfBoundsException
   at java.lang.String.substring(libgcj.so.7)
   at frysk.dom.cparser.CDTParser$ParserCallBack.enterInclusion(FryskGui)
   at
org.eclipse.cdt.internal.core.parser.scanner2.ScannerCallbackManager.popCallbacks(FryskGui)
   at
org.eclipse.cdt.internal.core.parser.scanner2.Scanner2.beforeSecondFetchToken(FryskGui)
   at org.eclipse.cdt.internal.core.parser.scanner2.BaseScanner.nextToken(FryskGui)
   at org.eclipse.cdt.internal.core.parser.Parser.fetchToken(FryskGui)
   at org.eclipse.cdt.internal.core.parser.Parser.LA(FryskGui)
   at org.eclipse.cdt.internal.core.parser.Parser.LT(FryskGui)
   at org.eclipse.cdt.internal.core.parser.Parser.errorHandling(FryskGui)
   at
org.eclipse.cdt.internal.core.parser.Parser.failParseWithErrorHandling(FryskGui)
   at org.eclipse.cdt.internal.core.parser.Parser.translationUnit(FryskGui)
   at org.eclipse.cdt.internal.core.parser.Parser.parse(FryskGui)
   at frysk.dom.cparser.CDTParser.parse(FryskGui)
   at frysk.dom.DOMFactory.createDOM(FryskGui)
   at frysk.gui.srcwin.SourceWindowFactory.finishSourceWin(FryskGui)
   at frysk.gui.srcwin.SourceWindowFactory$2.run(FryskGui)
   at org.gnu.glib.CustomEvents.runEvents(libgtkjava-2.8.so)
   at org.gnu.gtk.Gtk.gtk_main(libgtkjava-2.8.so)
   at frysk.gui.Gui.gui(FryskGui)
   at frysk.gui.FryskGui.main(FryskGui)
Comment 1 Yong Zheng 2006-10-23 08:02:22 UTC
Created attachment 1385 [details]
the test case for this bug.

Compile the program through:
gcc -g -o daemon daemon.c
Comment 2 Rick Moseley 2006-11-22 23:09:37 UTC
This has been fixed in the current CVS head.  It turns out there are multiple
versions of unistd.h and it was trying to get added to the DOM multiple times. 
A check added in enterInclusion in CDTParser.java has fixed this.