kevoree / kevoree-model-generator

0 stars 0 forks source link

StackOverflowError for create a big model #1

Open Savak opened 8 years ago

Savak commented 8 years ago

Hi!

I have a StackOverflowError when i want generate a big model with lots of nodes.

Here is the method I use :

public static void generateModel(final String[] args, int numberOfNodes, int numberOfComponents, int numberOfChannels) throws FileNotFoundException, IOException {
        // final long seed = -3309530520489196191L;
        final long seed = initSeed(args);

        final Random generator = new Random();
        generator.setSeed(seed);

        //final int n = 4;
        final OperationsService graphService = new OperationsService(generator).withNodes(numberOfNodes).withComponents(numberOfComponents)
                .withChannels(numberOfChannels).withGroups(1);

        final List<IOperation> operations = graphService.initialize();

        final Graph graph = saveAll(operations, 0, null);

        final List<IOperation> operations2 = graphService.next(graph);
        saveAll(operations2, 1, graph);
}

It is exactly the same method than the main method in the class Application except for the initialization of grapService. In fact, the user define the number of nodes, components and channels.

It's working good with 100 nodes but when i put 200 nodes, i have this error :

Using randomly generated 3402466676710028330 as the random generator seed
200
199
198
197
196
195
194
193
192
191
Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
    at org.waxeye.parser.CacheKey.<init>(CacheKey.java:37)
    at org.waxeye.parser.Parser$InnerParser.matchAutomaton(Parser.java:202)
    at org.waxeye.parser.Parser$InnerParser.visitAutomatonTransition(Parser.java:461)
    at org.waxeye.parser.AutomatonTransition.acceptVisitor(AutomatonTransition.java:46)
    at org.waxeye.parser.Parser$InnerParser.matchEdge(Parser.java:380)
    at org.waxeye.parser.Parser$InnerParser.matchEdges(Parser.java:350)
    at org.waxeye.parser.Parser$InnerParser.matchState(Parser.java:318)
    at org.waxeye.parser.Parser$InnerParser.matchAutomaton(Parser.java:220)
    at org.waxeye.parser.Parser$InnerParser.visitAutomatonTransition(Parser.java:461)
    at org.waxeye.parser.AutomatonTransition.acceptVisitor(AutomatonTransition.java:46)
    at org.waxeye.parser.Parser$InnerParser.matchEdge(Parser.java:380)
    at org.waxeye.parser.Parser$InnerParser.matchEdges(Parser.java:350)
    at org.waxeye.parser.Parser$InnerParser.matchState(Parser.java:318)

The 3 last line of error are repeated many times at the end of this exception.

maxleiko commented 7 years ago

@Savak looks like this is an issue with the KevScript parser of Kevoree. Are you still working on Kevoree? :D

Savak commented 7 years ago

No I dont, it was just a bad manipulation so I re-open it. Sorry for this.