JavaFX on RPI (raspberry PI) freezes after system time change - javafx

I have strange problem with JavaFX on RPI platform...
I am using raspberry PI RPI3B (latest Raspbian) with JavaFX 11.0.2 (JavaFX armv6hf SDK, Embedded armv6hf). I have found out that JavaFX application seems to be sensitive to system clock change. If I change system clock 10 seconds back, graphic of my application freezes for 10 seconds.
Any ideas what could be wrong and how to solve this problem?
I have tried also several examples from internet - the same problem.
Thanks in advance.

Related

QMediaPlayer and Segmentation Fault

Hello Guys i used just this simple example to play music with this code:
QMediaPlayer *mediaPlayer { new QMediaPlayer };
mediaPlayer->setMedia(QUrl(currentMediaFileName));
mediaPlayer->setVolume(50);
mediaPlayer->play();
he show me in debug mode the message "Segmentation fault" and my application crash.
I used Qt 5.15.0
This seems to be a bug in Qt. I found this bug report. Hopefully this issue will be resolved soon.
Based on my experience, the problem seems to occur only on certain hardware: I have two laptop computers, both with XUbuntu 21.04 and both using proprietary drivers, and when running the same code i get SIGSEGV on one system but on the other (older) system there is no problem.

Qt cross compiled for RaspberryPi 4 - application runs but is not displayed

I'm trying to develop a gui for a RaspberryPi 4 using Qt. I followed the directions shown in this video and managed to get things up and running on the RaspberryPi. The speedometer demo that was demonstrated near the end of the video also works in my case. After getting the demo to work, I began working through the QML tutorials that were on qt.io.
I started with QML Tutorial 1 - Basic Types, and managed to get this to run on the RaspberryPi.
I then moved on to QML Tutorial 2 - QML Components. I attempted to run this application on the RaspberryPi, however, no gui/window displayed on the Pi.
Since I am new to Qt and new to cross-compiling in general, I went through basic troubleshooting steps:
Rebooted the Pi
Rebooted my Ubuntu VM that I am running Qt Creator from.
Deleted the build directory on my Ubuntu VM so that the application would be forced to rebuild everything.
Attempted to rerun the application (still no gui present).
Deleted the application from the Pi
Attempted to rerun the application (still no gui present).
Checked for a pid for the app on my Pi (A pid was present).
killed pid and reran the application, both from the Ubuntu VM as well as directly from the Pi. (Still no gui)
Attempted to run the demo speedometer application that I referred to in the first paragraph. This ran without a hitch.
I then deleted the additional code that QML Tutorial 2 introduced, and reverted back to the code that was only present in QML Tutorial 1. Reran and still did not have a gui.
What am I missing here? It doesn't appear that Qt is throwing any errors (from what I can tell).

Running videos on JavaFX in Raspberry Pi Zero

I am trying to run a program which shows a simple video through mediaView and then shows a QR code that is associated with a string that the program generates on javaFX in a Raspberry Pi Zero. I have tried to follow this answer Play a video using JavaFX on Raspberry Pi but I get the following problems:
I try to install Gluon following this tutorial (https://docs.gluonhq.com/embedded/#_setting_up_the_raspberry_pi) but I get the following error message when I try to run a JavaFX application WITHOUT video which simply has a button that when pressed show "Hello World":
Error occurred during initialization of VM
Server VM is only supported on ARMv7+ VFP
It seems that Gluon doesn't work with the Raspberry Pi Zero but I am not sure.I must say that in order to follow the answer mentioned above I fully reinstalled the Raspberry Pi OS so it's up to date and previously I had been able to run JavaFX applications without video but not using Gluon.
Also when trying to install the gstreamer packages they all seem to be outdated and I can't install them.
So I would be very thankful if anyone could tell me how to not only properly install Gluon on Raspberry Pi Zero but also the needed packages in order to run the video. If you see that this is impossible do you have any ideas how to replicate this program in another language in order to make it work on my Raspberry Pi Zero
From that tutorial you have linked it states it is using Java 11 which your Pi Zero (ARMv6) doesn't support.
You will need supported hardware.
EDIT : If you wish to just play videos & use QR on your Pi Zero using JavaFX you can using Java8 instead.

Terminal printing over JavaFX application on Raspberry

Hi guys I'm new to Raspberry coding, for my three year thesis I'm writing a twitter wall application in javafx to be runned on a Raspberry Pi Model B+ v1.2.
I programmed it in eclipse neon under windows 10 and everything works correctly there, but when i moved the .jar on the raspberry initially it wasn't working at all. After a bit of googling i finally managed to make it work, i was on Raspbian Stretch with Desktop at that time and I only installed Gluon JavaFX Embedded SDK on my raspberry. After that the application started to run, a bit lagging and there was a problem with the input devices (which for me isn't really a problem because my app doesn't need any input from the user). The major issue is that whenever the app prints something on the terminal it shows up over the javafx app covering it.
After that i tried to install Raspbian Stretch Lite and after some steps i managed to make the app works, but with the same issue.
To make it works on Raspbian Stretch Lite i installed jdk8, gluon javafx sdk and xwindows (via sudo apt install xorg libgtk2.0-0).
I make a video of it to show you clearly what is the problem: (you can skip to 1 minute to see the issue)
https://drive.google.com/file/d/1EyvdpLuLnGwV3xrvgCqBU8e5T3go3-up
Hope someone can help me, thanks!

Tricky Qt / OpenGL bug - everything crashes

I have an annoying and unfortunately urgent problem. I started out by trying to subclass the QGLWidget for my Windows application in Visual Studio 2008 x86. It crashed immediately upon running, as far as I could tell, when the QGLWidget was instantiated. Finally I ended up trying all the included Qt examples for Open GL, and they all behave the same - crashing as follows:
Error message pops up:
"Windows has triggered a breakpoint in
2dpainting.exe..."
The execution halts in qgl_win.cpp (breakpoint indicated):
QGLTemporaryContext::~QGLTemporaryContext()
{
wglMakeCurrent(d->dmy_pdc, 0);
wglDeleteContext(d->dmy_rc);
ReleaseDC(d->dmy_id, d->dmy_pdc);
DestroyWindow(d->dmy_id);
--> if (d->old_dc && d->old_context)
wglMakeCurrent(d->old_dc, d->old_context);
}
Output:
... HEAP[2dpainting.exe]: HEAP: Free
Heap block a40c108 modified at a40c288
after it was freed Windows has
triggered a breakpoint in
2dpainting.exe.
This may be due to a corruption of the
heap, which indicates a bug in
2dpainting.exe or any of the DLLs it
has loaded ...
Also happens when I switch from debug to release. However, I can run most of these Open GL example compiled executables just fine.
I can't find anything through internet searches. Gurus, please help!
Thanks,
Matt
I resolved the problem by updating my graphics drivers to their latest version. Strange, because I'm using the Intel GMA 965 Express chipset, which is already very old.
Now all the Qt examples compile just fine. No heap corruption.
I'm also able to run the main Qt Examples and Demos app from the start menu, which I was never able to do before - it would just crash.

Resources