1

First, let me say this code ran perfectly well a few months ago at around 49 FPS. since then, one major thing that has changed is that I "Upgraded" from Windows 7 to 10.

I do have a pretty good system:

  • i7-3770K processor (a little dated, but still good)
  • 32GB RAM
  • GTX 970 4GB video card
  • Several SSDs

I have researched this issue for hours and came up with a couple fixes people have tried. Interestingly most centered around late Jan - early Feb '17.

  • Uprading to latest NVIDIA drivers (or downgrading)
  • Making sure the "Main" is pointing to the correct class
  • Verifying all environment variables are set correctly
  • Verify all libraries needed are imported corectly

None of these fixed my issue.

Some details about my code and code style. This project is part of a massive undertaking I have been working on for years to create a complete 3D engine through Java and OpenGL using the LWJGL 2.9.3 libraries. The way my code is structured is that I have organized each concept into separate libraries which I then import into any project I am working on.

For example, I have a library called "Foundations" that handles opening the OpenGL window itself, loading settings from external files, and tracking the timing delta and FPS. Another example library is "Text2D" which handles displaying text to the screen.

This way, I can track down bugs more efficiently. Each library has its own testing and diagnostic classes to verify the library is working as intended. Often many different libraries have dependencies to certain specific others and so this testing can be further independently verified.

Problem:

The one I am having trouble with is called "Entity" which handles placing a 3D object into the world. As I said before, I have had this code working before, and can't figure what went wrong.

The code is broken up into setup and testing sections. The setup code generates a grid of objects for me to look around in and move through along with basics like a sunlight source. The testing code simply adds a small spin to each object so they spin in place.

Now, as my test code runs, I see the generated objects in the display window just fine, populating new objects and textures as they load. I get on average 2-4 seconds per frame. (yes, seconds/frame)

After anywhere from 43 seconds to 92 seconds, generating around 12-15 frames, it fails and gives me the following error message:

C:\Users\Zaanzabar\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: -1073740791
BUILD FAILED (total time: 43 seconds)

By inserting mass output messages and figuring out which lines come right after certain messages, I have tracked down the specific lines of code that are causing the slowdown.

While I'm loading textures into the program, everything runs smoothly and swiftly until it reaches the line:

glGenerateMipmap(GL_TEXTURE_2D);

And these are not large textures mind you, biggest one I think is 512x512 in PNG format. I use SlickUtil to load them into OpenGL.

Once I am done loading the textures, it then pauses for about the same amount of time at the line:

Display.update();

And then eventually crashes. Both of these lines of code are openGL features, and no part of my code, so I have run into a wall about where to look from here.

Does anyone know how to fix this issue?

Zaanzabar
  • 28
  • 1
  • 1
  • 10

1 Answers1

0

It's actually a NetBeans issue it's basically saying that there is an issue in run.xml

C:\Users\Zaanzabar\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml

And since you have mentioned that you have updated your windows, I'm guessing the metadata must have been changed are removed so Netbeans basically cant find your main class hence throwing the error, you did mention everything worked fine so it cant be a dependency issue.

this talks about the same issue Netbeans not running my project

Solution
Try running the code on command line

javac YourMain.java <br>
java Yourmain

Or on another IDE if you can

If that works fine,then it's a NetBean issue for sure :)
You can run the main class directly or mention which is the main class in the project folder by going to the properties tab of the project

Hope it helps :)

rohit thomas
  • 2,302
  • 11
  • 23
  • Yeah, that post is one that I tracked down before, and it did not help. My system was not set up to run from the command line, so I have had no luck running it from there. "javac: file not found" "javac: no source files" "no lwjgl64 in java.library.path" – Zaanzabar Jun 14 '18 at 03:51
  • @Zaanzabar Try importing the project into a new workspace.. Have you tried running the project directly from the Main class ?? – rohit thomas Jun 14 '18 at 03:58
  • The problem is not that Netbeans can't run the program. It runs. For minutes. just.... REALLY slowly, then crashes. Finding the Main isn't the problem. AND it runs from the command line, but fails once it looks for external resources later in the program. How do I import the project into a new work space? – Zaanzabar Jun 14 '18 at 04:02
  • Ok, got all the resources in the right places, and it runs from the command prompt. Identical to within Netbeans IDE. A.K.A. no improvement. Also, when it finishes loading the graphics, it just quits. No error, no description. Just crash. – Zaanzabar Jun 14 '18 at 04:13
  • Have you used an exit command anywhere any logs you can refer too ?? and if you want to import a new project to a workspace.... https://stackoverflow.com/questions/17824960/importing-project-into-netbeans – rohit thomas Jun 14 '18 at 04:28
  • If I do use an exit command, I always include a note as to why, and I give the System.exit command a 6 digit number that is the date I installed that exit command. 180614 for instance. That way I can do a search in my code and go right to it. In this case, nothing. I followed the post on how to import into a new workspace, and same result. That did not fix it either. – Zaanzabar Jun 15 '18 at 00:58
  • Are you still facing the same error in the new workspace ?? or is it just exiting without any error ?? – rohit thomas Jun 15 '18 at 04:01
  • same error. Exiting without error happens from the command prompt. The stuff in my original post happens in the new workspace too. The common denominator is that something in my code is at fault, but there's nothing in there unique. I'm stumped. – Zaanzabar Jun 15 '18 at 15:03
  • try adding -verbose command in your command line `java -verbose` it will show all the class load and put System.out.println("SOME MESSAGE") where you think the issue occurs that should help you debug atleast – rohit thomas Jun 16 '18 at 06:25
  • I was unable to get -verbose to show anything different. I used as you wrote it, but also all the options listed here: https://dzone.com/articles/how-use-verbose-options-java – Zaanzabar Jun 16 '18 at 16:34