Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in thread "main" java.lang.StringIndexOutOfBoundsException #16

Open
vgiotsas opened this issue Aug 15, 2022 · 0 comments
Open

Comments

@vgiotsas
Copy link

I'm trying to run the simulator in Ubuntu 20.04.4 LTS with openjdk 11.0.16 2022-07-19 and Apache Maven 3.8.6

When I'm trying to run the simple.cfg file I get the following exception:

/service-discovery$ ./run.sh config/simple.cfg
Simulator: loading configuration[config/simple.cfg]
ConfigProperties: File config/simple.cfg loaded.
Simulator: starting experiment 0 invoking peersim.edsim.EDSimulator
Random seed: 24685



EDSimulator: resetting
Network: no node defined, using GeneralNode
EDSimulator: running initializers
- Running initializer init.0randlink: class peersim.dynamics.WireKOut
- Running initializer init.1uniqueNodeID: class peersim.kademlia.CustomDistribution
- Running initializer init.2statebuilder: class peersim.kademlia.StateBuilder
Merging groups
Your network is connected
EDSimulator: loaded controls [control.0traffic, control.3]
Current time: 0
>>>[0] Scheduling new MSG_FIND for 44679646088748448298203248111083314944732970519232921080965672368072094281099
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.base/java.lang.String.substring(String.java:1841)
	at peersim.kademlia.KademliaNode.getTopicNum(KademliaNode.java:132)
	at peersim.kademlia.KademliaObserver.increaseNodeStatsBy(KademliaObserver.java:344)
	at peersim.kademlia.KademliaObserver.accountMsg(KademliaObserver.java:606)
	at peersim.kademlia.KademliaObserver.reportMsg(KademliaObserver.java:736)
	at peersim.kademlia.KademliaProtocol.processEvent(KademliaProtocol.java:431)
	at peersim.edsim.EDSimulator.executeNext(EDSimulator.java:280)
	at peersim.edsim.EDSimulator.nextExperiment(EDSimulator.java:321)
	at peersim.Simulator.main(Simulator.java:170)

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant