Error when generating code in GUI Guider

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Error when generating code in GUI Guider

跳至解决方案
4,524 次查看
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.

标记 (2)
0 项奖励
回复
1 解答
4,480 次查看
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 项奖励
回复
3 回复数
4,481 次查看
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 项奖励
回复
4,496 次查看
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 项奖励
回复
4,475 次查看
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 项奖励
回复