KDS Version 3.2 "Failed to create Java Virtual Machine"

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

KDS Version 3.2 "Failed to create Java Virtual Machine"

6,090 Views
richardfox75
Contributor III

Randomly on KDS startup I receive an error message "Failed to create Java Virtual Machine".The version of Java that I have installed is: Java 8 update 74, and Java SE Development kit update 74. This error prevents KDS from starting. My work around, so far, is to restart my PC. I am using Windows 7 Professional. I have been using KDS version 3.1, and never received this error message. The error started following an install of KDS version 3.2.

Labels (1)
0 Kudos
Reply
14 Replies

5,311 Views
warnerjonn
Contributor I

If you having multiple Java versions installed on your system, then this can be happen. You can solve this by change the maximum memory allowed for the eclipse process (which is run in a Java Virtual Machine). Open eclipse.ini (which is in the same directory as eclipse.exe) in Notepad or any other text-editor application, Find the line -Xmx256m (or -Xmx1024m). Then change the default value 256m (or 1024m) to 512m . You also need to give the exact java installed version (1.6 or 1.7 or other).

Like This:

-Xmx512m
-Dosgi.requiredJavaVersion=1.6

OR

-Xmx512m
-Dosgi.requiredJavaVersion=1.7

OR

-Xmx512m
-Dosgi.requiredJavaVersion=1.8

 

0 Kudos
Reply

5,509 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Richard.

first, we don't suggest user share KDS3.2 workspace with other KDS version workspace. please make sure you have a new workspace for KDS3.2 project.

in the past we have customer had similar problem as yours with older KDS versions, he solved the problem in this way:

"If the Kinetis Design Studio IDE fails to launch with the error message Failed to create the Java Virtual Machine then

you may need to decrease the maximum size of IDE's heap. Similarly, if the IDE reports "Out of memory" errors while

running, then you may need to increase the heap size.

This is achieved by changing the value of the -Xmx argument found in the file install-dir\eclipse\kinetis-designstudio.

ini.

The default is -Xmx512m, giving the IDE a maximum heap size of 512MB.

"

please check if this can also help you.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

5,509 Views
richardfox75
Contributor III

Jennie,

I am not sharing the workspace across different versions.

Thanks for the information. I found that the amount of RAM

memory allocated to the VM was half of what users have

told me it should be. I didn't modify the ini file, I didn't know

anything about it. I simply use the default values that the

tool has configured it for.

Regards,

Dick Fox

Firmware Engineer

NATIONAL CONTROLS CORPORATION BUSINESS UNIT

INSTRUMENTATION AND SPECIALTY CONTROLS DIVISION

1725 Western Dr | West Chicago, IL 60185 | http://www.ametekncc.com

Phone: (630)621-3118 | email: Dick Fox@ametek.com

0 Kudos
Reply

5,509 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Dick,

I also install KDS3.2 in my computer, I use default ini file. it works normal. see my attached default one. please check if it is the same as yours.

however depend on amount of projects in workspace, and which plugins I’m using, the default Eclipse Java VM size might not enough. Edit the .ini inside the eclipse folder and increase the value of the -Xmx parameter to a higher value may change he situation.

So I increased that value to

-Xmx1024m

see how it works?

if it still can not fix the problem. I suggest you uninstall your KDS3.2 and remove the redundant folder. then reinstall KDS3.2 again to another disk. see how it works.

you may also try to install KDS3.2 on on another computer. then copy the install folder to your computer., then open KDS from this folder. see how it works.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

5,509 Views
richardfox75
Contributor III

Jennie,

I have increased the memory to 1024 but that did not help.

I just sent an e-mail to Mike Steffen, and this e-mail address,

explaining in some detail what I am seeing.

Regards,

Dick Fox

Firmware Engineer

NATIONAL CONTROLS CORPORATION BUSINESS UNIT

INSTRUMENTATION AND SPECIALTY CONTROLS DIVISION

1725 Western Dr | West Chicago, IL 60185 | http://www.ametekncc.com

Phone: (630)621-3118 | email: Dick Fox@ametek.com

0 Kudos
Reply

5,509 Views
richardfox75
Contributor III

Mike,

There are only two issues that are affecting me. I can resolve

the other issues, plus they happen infrequently.

The first is an error message stating that the Configuration of GDB

has aborted. When this happens the IDE freezes and I have to

kill the processes to get back to Windows. I suspect that this is a GDB

issue, but since the IDE freezes I can't get any information on what

happened. I have looked at the GDB log file, but don't see any

indication of what happens. I have a PC which is still in this state

so I can't use it for Kinetis development at the moment. The only

way that I have been able to recover from this is to remove and then

re-install all of the tool files.

The second issue is a Failure to create the Java VM upon KDS startup.

I have increased the heap memory in the config file but this didn't help

This happens when I attempt to startup KDS V3.2 with other processes

open at the time. The other processes are an editor, two Windows

Explorer, and sometimes the Chrome browser. This PC is dedicated to

just Kinetis development I have removed all other unnecessary programs.

I can kill all of the processes and then attempt to start KDS but continue

to get the Java VM error. The PC is Windows 7 Pro with 3 Gig of RAM.

I can get out of this situation by restarting the PC, and starting KDS

when Windows comes up. This always works. I can then open my other

programs with no problems. Everything works fine as long as I don't exit

KDS. I am debugging a HW design, so I frequently have to power things

down I also exit KDS. Maybe I shouldn't exit KDS? Each time I exit I

have to restart the PC to get back a working system.

I have only seen the Java issue on version 3.2.

Regards,

Dick Fox

Firmware Engineer

NATIONAL CONTROLS CORPORATION BUSINESS UNIT

INSTRUMENTATION AND SPECIALTY CONTROLS DIVISION

1725 Western Dr | West Chicago, IL 60185 | http://www.ametekncc.com

Phone: (630)621-3118 | email: Dick Fox@ametek.com

0 Kudos
Reply

5,508 Views
MarekTrmac
NXP Employee
NXP Employee

Dick,

"Failure to create the Java VM upon KDS startup" means your computer does not have enough memory to start Java. If you increase size in the *.ini file, KDS will request more memory and it will fail more often (or all the time). I'd recommend to use default memory sizes.

This issue might be alspo related to GDB server crash, so some memory is still allocated by the GDB process?

Regards

Marek

0 Kudos
Reply

5,509 Views
richardfox75
Contributor III

Marek,

Thanks for the information. I had been using the default values.

NXP support suggested that I increase the values.

My PC has 3 Gig of RAM. I have been watching the RAM

utilization and have not seen it go over 38%.

When I came into work this morning, my first attempt to start

KDS resulted in the Java error message. I have found that if

I start KDS with a "clean system", in other words no other

application running. (Removed all startup programs, no

virus code.) KDS starts with no error. I can then open as many

applications as I want. If I attempt to start KDS after I have

been working with the PC, I get the Java error message.

Regards,

Dick Fox

Firmware Engineer

NATIONAL CONTROLS CORPORATION BUSINESS UNIT

INSTRUMENTATION AND SPECIALTY CONTROLS DIVISION

1725 Western Dr | West Chicago, IL 60185 | http://www.ametekncc.com

Phone: (630)621-3118 | email: Dick Fox@ametek.com

0 Kudos
Reply

5,509 Views
michalzan
NXP Employee
NXP Employee

Hi Richard,

the thing is that KDS has it's own JRE installed in eclipse feature. Are following lines in your {KDS installation folder}\eclipse\kinetis-design-studio.ini ?

-vm

features/com.somniumtech.jre.win32.win32.x86_1.7.0.76/jre/bin

Regards,

Michal

0 Kudos
Reply

5,509 Views
richardfox75
Contributor III

Michael,

Yes my configuration file has those lines in it.

My question is why does it work, and then sometimes not?

Regards,

Dick Fox

Firmware Engineer

NATIONAL CONTROLS CORPORATION BUSINESS UNIT

INSTRUMENTATION AND SPECIALTY CONTROLS DIVISION

1725 Western Dr | West Chicago, IL 60185 | http://www.ametekncc.com

Phone: (630)621-3118 | email: Dick Fox@ametek.com

0 Kudos
Reply

5,508 Views
richardfox75
Contributor III

Marek,

I compared my ini file against what you put in your

e-mail. The only difference is:

-Xms256m instead of -Xms512m

-Xmx512m instead of -Xms1024

This is the memory size passed to the Java VM, yes?

How does it get sized?

My first response to you was before I compared the

ini files. Sorry.

Regards,

Dick Fox

Firmware Engineer

NATIONAL CONTROLS CORPORATION BUSINESS UNIT

INSTRUMENTATION AND SPECIALTY CONTROLS DIVISION

1725 Western Dr | West Chicago, IL 60185 | http://www.ametekncc.com

Phone: (630)621-3118 | email: Dick Fox@ametek.com

0 Kudos
Reply

5,509 Views
MarekTrmac
NXP Employee
NXP Employee

Dick, it means you have modified the INI file manually, right? The default configuration should work for all "modern" machines.

Regards

Marek

0 Kudos
Reply

5,509 Views
richardfox75
Contributor III

Sorry, no I didn't. The first I learned of it's existence was from

your e-mail.

Never have time to read any of the documents/instructions,

just get it done!

Dick Fox

Firmware Engineer

NATIONAL CONTROLS CORPORATION BUSINESS UNIT

INSTRUMENTATION AND SPECIALTY CONTROLS DIVISION

1725 Western Dr | West Chicago, IL 60185 | http://www.ametekncc.com

Phone: (630)621-3118 | email: Dick Fox@ametek.com

0 Kudos
Reply

5,509 Views
richardfox75
Contributor III

Thanks,

The next time it happens, if, I will check the RAM memory.

The only processes that should be running are:

gdb server, KDS, 2 Windows Explorer, and sometimes

the Chrome browser. Along with all of the other MS

processes.

I have removed everything from Startup, and most other

programs on this PC. I use this PC just for KDS development.

It is also not running Anti-Virus SW.

I am running Windows 7 Pro with 3.41 Gig of usable RAM.

Regards,

Dick Fox

Firmware Engineer

NATIONAL CONTROLS CORPORATION BUSINESS UNIT

INSTRUMENTATION AND SPECIALTY CONTROLS DIVISION

1725 Western Dr | West Chicago, IL 60185 | http://www.ametekncc.com

Phone: (630)621-3118 | email: Dick Fox@ametek.com

0 Kudos
Reply