Error when generating code in GUI Guider

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error when generating code in GUI Guider

Jump to solution
4,519 Views
filo96
Contributor III

Hi,

 

I'm using GUI Guider 1.5.1-GA.

In my PC (Windows 11) I'm able to generate the code of the given examples in GUI Guider. However, in a project we are developing, I'm not able to generate the code anymore.

I got a list of Java errors:

 

Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuffer.append(Unknown Source)
at java.io.StringWriter.write(Unknown Source)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:625)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.directive.Foreach.renderBlock(Foreach.java:309)
at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:279)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.directive.Foreach.renderBlock(Foreach.java:309)
at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:279)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.runtime.directive.Parse.render(Parse.java:284)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.directive.Foreach.renderBlock(Foreach.java:309)
at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:279)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.Template.merge(Template.java:358)
at org.apache.velocity.Template.merge(Template.java:262)
at controller.Uit.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

 

I encounter this problem only in my PC. When I use another PC with Windows 11 andh the same project it works well.

I attach both the logs when GUI Guider creates the code correctly and when it doesn't.

I noticed that the two log are very different.. Also, when it doesn't work, it seems to generate correctly the C code, but when it switches to MicroPython code it loops the same images for about 30 times (and it shouldn't do this)!

 

Other infos: I tried to uninstall and re-install both GUI Guider and Java in their latest version, but it doesn't solve anything.

Tags (2)
0 Kudos
Reply
1 Solution
4,475 Views
filo96
Contributor III

Thank you for your reply @LiubinGong !

We are not able to run the C simulator due to problems related to the 32k limit of the Windows command line.

This is why we'd like to use the MicroPython simulator.

 

However I've been able to solve the problem! I installed the last version of JAVA JDK and the problem has instantly disappeared!

I didn't know that JDK is required. Also, the other examples were working without JDK installed!

 

Here my versions of java:

C:\Users\user>java --version
java 20.0.1 2023-04-18
Java(TM) SE Runtime Environment (build 20.0.1+9-29)
Java HotSpot(TM) 64-Bit Server VM (build 20.0.1+9-29, mixed mode, sharing)

C:\Users\user>javac --version
javac 20.0.1

 

[ I'm happy to read that Java will be removed for the next version of GUI Guider ]

View solution in original post

0 Kudos
Reply
3 Replies
4,476 Views
filo96
Contributor III

Thank you for your reply @LiubinGong !

We are not able to run the C simulator due to problems related to the 32k limit of the Windows command line.

This is why we'd like to use the MicroPython simulator.

 

However I've been able to solve the problem! I installed the last version of JAVA JDK and the problem has instantly disappeared!

I didn't know that JDK is required. Also, the other examples were working without JDK installed!

 

Here my versions of java:

C:\Users\user>java --version
java 20.0.1 2023-04-18
Java(TM) SE Runtime Environment (build 20.0.1+9-29)
Java HotSpot(TM) 64-Bit Server VM (build 20.0.1+9-29, mixed mode, sharing)

C:\Users\user>javac --version
javac 20.0.1

 

[ I'm happy to read that Java will be removed for the next version of GUI Guider ]

0 Kudos
Reply
4,491 Views
LiubinGong
NXP Employee
NXP Employee

Hi Filo96

    According to the log analysis, it should be that converting images consumes too much memory when generating MicroPython code.

We currently support the win10 version, So some unknown issues in all win11 without verification.

I have a workaround method, you can click "run->simulator->c" instead of "generated code". This will only generate C code and run the simulator.

BTW,  Version 1.6.0 will be released at the end of July. it will no longer depend on Java. 

Best Regards

Liubin

 

0 Kudos
Reply
4,470 Views
LiubinGong
NXP Employee
NXP Employee

  @filo96 That's great, Thanks for your support to GuiGuider. Would you please resolve this issue? 

Best Regards
Liubin

0 Kudos
Reply