Issues with OpenRocket

The Rocketry Forum

Help Support The Rocketry Forum:

Astrofox

Member
Joined
Jul 6, 2020
Messages
24
Reaction score
4
I hate to say it, but it seems like it "depends."
It seems to work in some instances, but completely fails in others. Then again, I've only opened up the 3d views a total of like, two times. Requires a bit more fudging but really I don't need to use the 3d views anytime soon.
 

mooffle

Well-Known Member
TRF Supporter
Joined
Apr 20, 2020
Messages
350
Reaction score
223
Hopefully someone can make this a much cleaner process than I am fudging through...

Open notepad, change the username and paste this:
start java.exe -Dsun.java2d.d3d=false -jar C:\Users\astrofox\Desktop\OpenRocket-15.03.jar

Then save it as openrocket.bat to wherever you want (desktop probably)

The .bat makes it executable so you just click this batch file and it should run without using command prompt each time. I tried it on my PC and seems to work.
 

Tobor

Get your peanuts....
TRF Supporter
Joined
Oct 8, 2016
Messages
2,041
Reaction score
630
I'm glad mooffle got things sorted out for you.

As an aside, I'm fairly sure I know why Astrofox's laptop is having fits with openRocket. Laptops like the Alienware 15 R4 are gaming laptops with dual GPUs. The integrated Intel unit handles all "2D" functions as it uses much less power then the nVidia GPU( so the laptop can run longer before recharging), which is reserved for 3D intensive work like games, CAD, video encoders, etc...

So the issue is likely tied to how Java is handing off the 3D workload, or how the nVidia driver is interpreting Java's call for 3D processing.
 

mooffle

Well-Known Member
TRF Supporter
Joined
Apr 20, 2020
Messages
350
Reaction score
223
I do recall hearing something like that way back when.
Superficially my gaming PC has similar specs to his laptop but my integrated gpu isn't doing any hand off like that. That would probably explain why most of us don't have that issue.
 

jrap330

Retired Engineer, NAR # 76940
TRF Supporter
Joined
Jan 25, 2020
Messages
670
Reaction score
196
Location
NJ
I would have tried simple fixs change resolution to a lower resolution, issues have happen at higher resolutions and it looks like you have an extra graphics chip, maybe this is a gaming laptop since it is IN. Go to control panel , hardware manger and see which chip is being used. These are basic solutions tt may help in future.
 

LithosphereRocketry

Pining for the Fjords
Joined
Feb 19, 2017
Messages
791
Reaction score
17
I'd guess the dual GPU situation is the root of the problem. I believe you can set programs to force one GPU or another in Nvidia settings-- would this be a possible solution?
 

Digeratus

New Member
Joined
May 30, 2021
Messages
2
Reaction score
3
Ran head on into this on upgrade to Windows 10 with a NVIDIA GeForce GTX1660 Super and using my existing LG 4K non-G Sync monitor.

With this newer graphics card, the screen tearing problem exists on either the prepackaged OpenRocket install or a direct Java + OpenRocket .jar install.
It's unusable. Tearing just follows the mouse around, a good clue it's not a frame rate problem - don't waste time on vsync settings.
The issue is Direct3D (part of DIrectX 12) is stomping all over OpenGL on this graphics card/driver and the library used in OpenRocket.

To simplify debug, I installed the latest Java 8 version 291 on my C: drive, and downloaded OpenRocket-15.03.jar to D:\Documents\ModelRockets.

As suggested in this thread, I built a batch file with one line:
java.exe -Dsun.java2d.d3d=false -jar OpenRocket-15.03.jar
and added D:\Documents\ModelRockets to my PATH environment variable so the .jar file is found.
java.exe is found from the Java install automatically adding a PATH variable of C:\Program Files (X86)\CommonFiles\Oracle\Java\javapath

That works. 3D views also work when enabled in OpenRocket under Preferences > Graphics.

So, the -Dsun.java2d.d3d=false flag has to be passed to the Java runtime to shut off the Direct3D conflict, somehow.


Now, for a simpler solution, no creating and running a batch file or changing path variables required.

On Windows 10, install Java 8 version 291 from https://java.com/

After installed, type "edit the system environment variables" in your start search box
Run the control panel result - you should be on the Advanced tab of System Properties
(you can also get there from Settings > System > About > Advanced system settings, in the right hand column)
Click "Environment Variables" in the lower right hand corner
In the User variables (top box), click New
Create a variable name _JAVA_OPTION with a value of -Dsun.java2d.d3d=false
Click OK

Download OpenRocket from https://openrocket.info/ (which is just the latest .jar file)
Double click the OpenRocket-15.03.jar file, wherever you choose to put it on your machine.

Yes, that shuts off Direct3D for anything running Java, but my thought is if OpenRocket has a problem so will other apps.

I dug through the prepackaged OpenRocket install looking for how to set the -Dsun.java2d.d3d=false flag, did not find it.
If someone has a step-by-step on how to configure the prepackaged install runtime for this flag, please comment.
Personally, I'm more comfortable from a system security standpoint using the official Java install, but that's another topic.
 
Last edited:

Digeratus

New Member
Joined
May 30, 2021
Messages
2
Reaction score
3
A bit more homework on this - it turns out to be a known problem in Java 8 where Swing (the GUI code) is using the Direct3D pipeline.
Shutting the Direct3D pipeline off in Java fixes the problem for OpenRocket and most other apps.

There's an alternative environment variable to do this, even simpler, same general procedure:

On Windows 10, install Java 8 version 291 from https://java.com/

After installed, type "edit the system environment variables" in your start search box
Run the control panel result - you should be on the Advanced tab of System Properties
(you can also get there from Settings > System > About > Advanced system settings, in the right hand column)
Click "Environment Variables" in the lower right hand corner
In the User variables (top box), click New
Create a variable name J2D_D3D with a value of false
Click OK

Download OpenRocket from https://openrocket.info/ (which is just the latest .jar file)
Double click the OpenRocket-15.03.jar file, wherever you choose to put it on your machine.
 
Top