QML crashed if static build - qt

I build static Qt 5.10.1 with mingw32.
Ref: https://github.com/arkceajin/QtDemos/blob/master/windows-build-qt-static/windows-build-qt-static.ps1
For testing purpose, build an empty QML project, it could run perfectly in QtCreator.
But if I copy the release build to another Win10&7 PC which doesn't contain the Qt environment, it will crash after the windows appeared. I'm guessing something missed inside QML.
Update:
I found No qmlscene installed appears in the Qt Versions tab, not sure it relates to the issue or not.
These two files did generate in the build folder.
projectname_plugin_import.cpp
projectname_qml_plugin_import.cpp
Found the similar issue: https://forum.qt.io/topic/42145/i-can-t-run-static-qt-qml-app-on-another-computer
Update 2:
Problem solved but I want to know why.
Here is I tried:
Connect a Win PC using remote desktop from another Win PC, run a static build QML program, then it crashed immediately after the Window appeared.
Directly login into the same local machine, run the same static build QML program, successful run.
Using the remote desktop run dynamic link QML program with Qt libs, successful run.
So the problem is Windows remote desktop, but I can't find the doc or bug report about it, if you have any idea or guessing, please help me.

Related

SIGSEGV fault in qml application on app.exec()

I'm trying to set up the environment on the new machine for our application written on Qt15.2 with GCC compiler version 10.2, and because it is a windows application, I get the qt and gcc from the MSYS2.
The compiling process is going well, but when I'm trying to launch the application, it crashes with the message: "the program has unexpectedly finished. the process was ended forcefully"
The same I obtained if trying to compile a blank qml app with a single ApplicationWindow in it.
I will be very grateful for your help.
The solution was found - I used "dependencies" (https://github.com/lucasg/Dependencies) to find out, which .dll libraries are missing. The problem was in some Windows libraries because it was a fresh system downloaded from Microsoft site without any updating made yet and seems to be very old. I had updated the system and everything is working fine now.

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).

Simple Javafx application not launching from eclipse <exit value: -1073740791>

This is a frustrating one that i am sure has a simple solution but i can't figure out which setting changed which is causing my javafx application not to launch.
The first javafx application that i ran on my workstation through eclipse oxygen worked fine. I imported a project that was prebuilt to display fractals and added "javafx/**" as accessible to my build path and i was able to launch it successfully.
Since then, I've tried loading other javafx projects to my workspace and running them with the same build path but nothing appears after i try to run the application.
I made sure to be in the class that extends application with the launch in it and that the build path is set but all i get when i try to run it in debug any javafx application terminates right away with the following exit code:
<disconnected>org.hameister.javafx.fractal.JavaFXFractal at localhost:49944
<terminated, exit value: -1073740791>C:\Program Files\Java\jdk1.8.0_161\bin\javaw.exe
At first i thought it was the code in the new projects but when i try to run the original fractal project again it gives me the same thing.
Does anyone have a clue how i can fix this?
Thank you!
Update:
I reinstalled the jdk (jdk-8u161-windows-x64) and eclipse (Oxygen.2 Release (4.7.2)) and am working out of a new workspace.
When I debug the applications, I get a quick stack that displays:
-Daemon Thread [QuantumRenderer-0] (Running)
-Daemon Thread [thread-1] (Running
-Thread [WindowsnativeRunLoopThread] (Running)
Then the stack is empty with only the terminated exit value from above.
It's as though I hit some hotkey or button that is no longer allowing applications to visually appear. Console based Java applications run fine.

QtWebEngineProcess error

I have a QWebEngineView instance included in my .Ui file. Program compiles without issues. However, when I start the program (via Visual Studio Debug mode), following error pops up.
Could not find QtWebEngineProcessd.exe.
Note: In a different windows pc - this programs runs without any issues. Can someone please point me to the right direction?
There was a problem with the QtCored.dll What I had in the Debug folder was apparently different than the version installed in the workstation. Hence, application runs with a version different to what it was built with.

Qt program does not run and exits immediately when run on another computer

I want to deploy my QT program and I can't find the reason it doesn't work, maybe you guys can help me ?
I work with visual studio 2010, windows 7, QT 5.0.2.
I have tested my deployment tree on my own computer and it works fine.
When deploying my application I ship every necessary dll that I am aware of. Depends.exe does not complain. I also deployed the plugin I know of, and since it still did not work I moved my entire plugin folder in the exe folder.
When I execute it on any other computer than my development computer, the program exits instantaneously with no message whatsoever.
Any idea where I should look now ?
How can I debug that kind of issue ?
Did you try deploying the debug version of the program and then starting it from the command line. The debug version will output more information to the console which could help you resolve the issue.
You will have to also deploy the debug versions of the MS c-runtime libraries.
Deploying the debug version is not a permanent solution, so you should not adopt that as normal routine for distributing your software. I am just suggesting that you try running the debug version one time on that particular machine until you figure out the issue. Then remove the installed program and install the release version again.
You can run your application using QtCreator:
Debug > Start Debugging > Start and Debug External Application...
This can give you more information about what's going on.

Resources