Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » string index error when launching app within TPTP profiler(launching application with TPTP)
icon5.gif  string index error when launching app within TPTP profiler [message #915565] Mon, 17 September 2012 14:40 Go to next message
Jean Le Fur is currently offline Jean Le FurFriend
Messages: 5
Registered: September 2012
Junior Member
Hello,
I run a simulation model (using repast-Simphony 2)within eclipse.
The application runs fine but when I schedule it within TPTP, I get an error message from the application of the type below.
I see that there may be a problem at the level of WatcheeInstrumentor but I do not know where to search for the error: does TPTP defines watch annotations or produce any config file or else (this error might occur when the instrumentor is recursing into directories to look for @Watch annotated classes.
On an other side, the error is of the type "string index out of range", could it be linked to a specific directory or jar not properly adressed when TPTP launches?.
Any suggestion ? sincerely,
Jean

error message
==========
ERROR [AWT-EventQueue-0] 2012-09-14 16:34:56,593 repast.simphony.ui.RSApplication - Scenario Load Error
repast.simphony.scenario.ScenarioLoadException: String index out of range: -1
at repast.simphony.scenario.ScenarioLoader.load(ScenarioLoader.java:219)
at repast.simphony.ui.RSApplication.open(RSApplication.java:361)
at repast.simphony.ui.RSAppConfigurator.postWindowOpen(RSAppConfigurator.java:39)
at saf.core.ui.GUICreatorDelegate.runDisplay(GUICreatorDelegate.java:188)
at saf.core.ui.GUICreator$1.run(GUICreator.java:18)
at simphony.util.ThreadUtilities$Runner.run(ThreadUtilities.java:33)
at simphony.util.ThreadUtilities.runInEventThread(ThreadUtilities.java:47)
at saf.core.ui.GUICreator.runDisplay(GUICreator.java:16)
at repast.simphony.ui.RSUIPlugin$1.run(RSUIPlugin.java:92)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at repast.simphony.engine.watcher.WatcheeInstrumentor.processDir(WatcheeInstrumentor.java:358)
at repast.simphony.engine.watcher.WatcheeInstrumentor.findClasses(WatcheeInstrumentor.java:335)
at repast.simphony.engine.watcher.WatcheeInstrumentor.addFieldFromWatchers(WatcheeInstrumentor.java:258)
at repast.simphony.engine.watcher.WatcheeInstrumentor.instrument(WatcheeInstrumentor.java:141)
at repast.simphony.scenario.ScenarioWatcheeInitializer.initWatchees(ScenarioWatcheeInitializer.java:74)
at repast.simphony.scenario.ScenarioWatcheeInitializer.run(ScenarioWatcheeInitializer.java:34)
at repast.simphony.scenario.ScenarioLoader.load(ScenarioLoader.java:113)
... 16 more

Re: string index error when launching app within TPTP profiler [message #916669 is a reply to message #915565] Wed, 19 September 2012 09:42 Go to previous messageGo to next message
Heiner Westphal is currently offline Heiner WestphalFriend
Messages: 18
Registered: July 2009
Junior Member
Hello Jean,

what I can see is, that Repast Simphony tries to call substring with an
index of -1 on something.
Without a single line of tptp in the stacktrace, it is hard to guess,
how "launching via TPTP" makes this happen.

You should check the file servicelog.log in the config folder of your
TPTP-Agent to see if the agent had some trouble loading the app.
If that log is too terse, change the logging level DEBUG in
<install directory>/config/serviceconfig.xml and give it another try.

Best regards,

Heiner


Am 17.09.2012 16:40, schrieb Jean Le Fur:
> Hello, I run a simulation model (using repast-Simphony 2)within eclipse.
> The application runs fine but when I schedule it within TPTP, I get an
> error message from the application of the type below. I see that there
> may be a problem at the level of WatcheeInstrumentor but I do not know
> where to search for the error: does TPTP defines watch annotations or
> produce any config file or else (this error might occur when the
> instrumentor is recursing into directories to look for @Watch annotated
> classes.
> On an other side, the error is of the type "string index out of range",
> could it be linked to a specific directory or jar not properly adressed
> when TPTP launches?. Any suggestion ? sincerely, Jean
Re: string index error when launching app within TPTP profiler [message #916790 is a reply to message #916669] Wed, 19 September 2012 13:15 Go to previous messageGo to next message
Jean Le Fur is currently offline Jean Le FurFriend
Messages: 5
Registered: September 2012
Junior Member
Hello Heiner,
thank you for this quick answer.
I changed the logging level to DEBUG and obtained the attached servicelog.log. Unfortunately I am not used to these messages. Do you think it sheds any light on the problem ?
sincerely,
Jean
Re: string index error when launching app within TPTP profiler [message #917532 is a reply to message #916790] Thu, 20 September 2012 07:04 Go to previous messageGo to next message
Heiner Westphal is currently offline Heiner WestphalFriend
Messages: 18
Registered: July 2009
Junior Member
Hello Jean,

what I forgot to suggest was Logging format "Simple".
The default log format is common base event (CBE), which is intended for
interpretation by software. I find it difficult to read.
(I am only human :) ).

Given the number of lines in the log, I suspect the launch itself
worked.
From the Agent's point of view, this is just a fork of the jvm,
which is happy with its parameters and exits with zero.
The agent does look into the jvm there - IIRC.

Another possibility is, that TPTPdid not understand the Logging-config
and fell back to defaults (e.g. level="Debug", oder "debug" might not work).

Perhaps you try something like:
<Logging directory="%TPTP_AC_CONFIG_HOME%" format="Simple" level="DEBUG"/>

If this does not change anything, I see three other approaches to get
some more info:
a) Enable fine grained logging within Repast-Simphony
b) Look into the sources of Repast-Simphony.
Possibly remote debugging and connecting before tptp
times out helps as well.
c) Add jvm-parameters, that show which classes are loaded.
Compare the output with and without TPTP.
This may sound like a Herkules-task, but if you use some of the good
old unix-tools like sort and comm, you can gain a quick overview of
the differences within an hour.

Hope this helps,

Heiner

Am 19.09.2012 15:15, schrieb Jean Le Fur:
> Hello Heiner,
> thank you for this quick answer.
> I changed the logging level to DEBUG and obtained the attached servicelog.log. Unfortunately I am not used to these messages. Do you think it sheds any light on the problem ?
> sincerely,
> Jean
>
Re: string index error when launching app within TPTP profiler [message #922705 is a reply to message #915565] Tue, 25 September 2012 08:52 Go to previous messageGo to next message
Torsten Stolpmann is currently offline Torsten StolpmannFriend
Messages: 37
Registered: July 2009
Member
For me as well this smells like the parser in the repast.simphony.engine.watcher.WatcheeInstrumentor is not able to cope with the classpath entries given at the application launch via TPTP.

Comparing the command line invocation of the application with and without TPTP may shed some light on the causing entry introduced by TPTP.

I suspect a corner case bug in the WatcheeInstrumentor implementation.
Re: string index error when launching app within TPTP profiler [message #924944 is a reply to message #922705] Thu, 27 September 2012 08:55 Go to previous messageGo to next message
Jean Le Fur is currently offline Jean Le FurFriend
Messages: 5
Registered: September 2012
Junior Member
Hello Torsten,
thank you for having adressed my problem.
I am somehow newbie in this field : where/how can I "compare the command line invocation of the application with and without TPTP" ?
sincerely,
Jean
[Resolved]: string index error when launching app within TPTP profiler [message #925010 is a reply to message #922705] Thu, 27 September 2012 10:00 Go to previous messageGo to next message
Jean Le Fur is currently offline Jean Le FurFriend
Messages: 5
Registered: September 2012
Junior Member
I have updated all my environment.
TPTP works fine now with my Repast Simphony(and sounds as a pleasant application).
Thank you all.
Jean
Re: string index error when launching app within TPTP profiler [message #925045 is a reply to message #924944] Thu, 27 September 2012 10:28 Go to previous message
Torsten Stolpmann is currently offline Torsten StolpmannFriend
Messages: 37
Registered: July 2009
Member
Hi Jean,

good to see that resolved and thanks for letting us know. Just for the record:

The process list should show you the complete command line. This is easier with Linux but at least the Windows SysInternals Suite should be able to reveal this.

If my memory does not fail me TPTP uses the ! jar separator character to address individual files in jar files in the class path it automatically appends. My educated guess is that your version of repast symphony stumbled upon that.

Regards,

Torsten
Previous Topic:Unable to run JUnit tests on Eclipse Juno : IllegalStateException: Unable to acquire application ser
Next Topic:TPTP idle
Goto Forum:
  


Current Time: Tue Apr 16 20:27:54 GMT 2024

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

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

Back to the top