Blank image (frame buffer) - java

I have a really annoying problem which I'm pretty sure is due to the hybrid graphics on my laptop in some way....
I have a dell 15r laptop with hybrid nvidia/intel graphics.
If I have an external monitor plugged into my HDMI port when I run anything from libGDX I just get a blank screen the program is running fine, but nothing appears/displayed. So I can click on my application and it works correctly, however I cannot see anything.
If I run it just on the laptop then plug the monitor in half way through, it carries on running as normal.
If I start running it on the monitor but then unplug the monitor so it reverts to the laptop screen, it displays nothing again.
Using this...
System.out.println(Gdx.graphics.getGL20().glGetString(GL20.GL_VENDOR));
The program reports
NVIDIA Corporation

Fixed it.
Upgraded to latest NVidia drivers and everything seems fine.

Related

Mac OS and java.lang.NullPointerException at java.awt.Window.init(Window.java:497)

I've been setting up a 2018 MacBook Pro for Java development. It's running Mojave 10.14.1 - just like the older machine I'm migrating from, an early 2013 MacBook Pro. I installed Java 1.8.0_192 and immediately noticed that I could not launch jars or any Java app that had a UI on this mac. I uninstalled and tried each of these: 1.8.0_172, 1.8.0_191, 1.8.0_192, and 11.0.1. I traced the issue further and found a common error:
Caused by: java.lang.NullPointerException
at java.awt.Window.init(Window.java:497)
at java.awt.Window.<init>(Window.java:537)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1763)
at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1838)
at javax.swing.JWindow.<init>(JWindow.java:187)
at javax.swing.JWindow.<init>(JWindow.java:139)
Curious, I launched our Swing-based product and it reported the same error. I googled and found only unanswered posts.
(revising this to be formatted as a question and not a blog post)
What gives?
I had the same issue and I found it reported here.
In my case, I was using a docking station for my MacBook Pro and DisplayLink Driver for extended display. This made Jmeter crash.
The workaround was to disconnect my laptop from its docking station and launching the application.
The solution to this problem was simple, but not immediately obvious.
I dug into the JVM and found that the native code wasn't able to identify a compatible graphics mode from the OS. This results in a null GraphicsConfiguration. That's not good - it causes a NullPointerException in Window.java...guess what line. (Line 497)
I suspected the OS wasn't returning the right information about its graphics setup and then started to suspect the graphics driver. That's when I remembered Macs have parameter RAM (PRAM) and non-volatile RAM (NVRAM).
I zapped the PRAM and NVRAM and now the machine is working fine!
To zap the PRAM and NVRAM:
shut down your mac
restart while holding option+command+P+R
keep holding these until the mac appears to reboot again (the apple logo
will appear, disappear, and reappear)
If your mac starts up without the disappearing mac logo, shut it down and retry.
Reset NVRAM or PRAM on your Mac
I hope resetting the PRAM helps others!
We have the same issue when trying to open an inhouse Java-based application in conjunction with Dell D6000 docks using DisplayLink software.
As others have suggested disconnecting the Dock then launching the application works after which you can reconnect the dock and move the application to the other screen.
The other way we have managed to get it to work is with the laptop open making the laptop screen the main display this is done in the system prefs in the display settings and moving the white bar to the laptop screen then opening the application.
I think it has been said before when the main display is one run through DisplayLink it can't detect the display so return a null value, even running most recent drivers (24th Aug 2020) this is still the case.
So its workarounds not solutions if you are in the same boat

Swing app freezes in dual screen windows 7 environment when moving app to top right hand corner of second monitor

I built this Swing app to help my girlfriend get a particular job done faster. On my dual monitor windows system, the app and the Operating System freeze when moving the app to the extreme right hand side of the second monitor. Windows recovers, but the app does not. Has anyone experienced this sort of issue and know how to solve it? Below is the github link to the source code.
I tried to also provide a screenshot of the frozen app and the OS but it is difficult to take one when the OS freezes.
The app works fine on her Mac.
https://github.com/johndeverall/BehaviourCoder

Gui application halting on OSX when left unattended

My (java based) Gui application processes digital music files, and is designed so it can be left unattended. I have noticed that if I leave it running overnight on my OSX Mavericks computer that it stops shortly after I leave it, only restarting when I touch the keybaord in the morning.
How can I prevent this, I do not have the same problem running the application on a Windows 8 machine.
Select your app in the Finder and "Get Info" and then check "Disable App Nap"…
See the Apple Developer notes for Mavericks for more info

Issue with OSX 10.9 multiple desktops

I run about multiple desktops at all times and if I stay on the desktop that My App is running on everything seems fine. If I move away from the desktop with my app on and work on a different desktop this is where my app will stop downloading once it has finished its current process, it will switch to the next process but will not start next downloading.
I identified that that it might be virtual desktop related. If I switch all desktops for a second then operation works fine.
I was working on 10.8 OS X where my app (built in java) was working absolutely fine.
but as I upgraded it to 10.9, I am facing problem like above.
Is that have any solution or It is a bug of 10.9 OS X.

Java app on windows 8 tablet being killed when screen turns off

We had to write a Java application which runs on a windows 8 tablet (not RT).
I would much rather have written it using C#, but we really didn't have a choice.
Basically, we use launch4j to wrap our installer executable JAR in an EXE which then installs the appropriate application files and creates shortcuts on the desktop and in the start menu programs folder to ensure that the user sees the icons on the metro start screen.
The Problem
When the application starts up, it checks if any updates are available via a server, if they are available they are downloaded.
The issue that we've seen is that if the application is downloading the updates, and then we turn off the screen and leave it off for at least 30 seconds, once we turn the screen back on, the application is frozen and does not progress.
We then have to kill the app and start it again.
Providing the screen is not turned off again, the downloads finish and the application works fine.
Is there a way to either keep the screen on, keep our process running or detect when the screen comes back on and execute some code when that occurs?
Any help would be greatly appreciated.

Categories

Resources