Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gnuplot: Why does gnuplot_qt fail to start on some PCs?

Tags:

qt

gnuplot

I have a gnuplot script which works fine on Win7 and Win10 PCs.

set term wxt size 400,400
...

However, if I switch to qt terminal it works fine on some PCs, but on others I get error messages.

set term qt size 400,400
...

enter image description here

enter image description here

The error message suggests to reinstall the application? Which application? Which Qt platform plugin? I am working with gnuplot 5.2.6 and simply unpacked gnuplot from the file gp526-win64-mingw.7z from https://sourceforge.net/projects/gnuplot/files/gnuplot/5.2.6/

What exactly do I have to reinstall to get it working everywhere?

Addition: Some more findings.

On those PCs where the qt-terminals didn't work, I was running gnuplot 5.2.6, however, the qt-terminals worked with gnuplot 5.2.0 on the same PCs. Going back to gnuplot 5.2.0 is not a solution because it doesn't have some features which I need. Some differences of the "working" and "non-working" PCs were the Microsoft Visual C++ Redistributables. Some PCs have the 2008,2010,2012,2013 and 2015 versions installed. On the newest Win10 PCs there is even a 2017 version but no 2015 version. So, my current suspicion is that gnuplot 5.2.6 requires the 2015 version, whereas gnuplot 5.2.0 probably runs with the 2013 version. If it is like this, it would have been nice if gnuplot_qt.exe told me that this or that specific version is missing.

Currently, I don't have access to those PCs. So, further tests will take some more time.

like image 810
theozh Avatar asked Apr 12 '19 20:04

theozh


2 Answers

I have never used gnuplot, however, I have recently debugged issues with Qt plugins. From the popup it is clear that the platform plugin has been found (windows), but could not be initialized.

It might just be that the plugin DLL is somehow corrupt, or that multiple versions of Qt are available on the machine, and for some reason version A tries to load plugins from version B (and fails).

The part of Qt that loads plugins has some debug output built in. I suggest you try to enable debug output and get more information about the error:

  1. Get DebugView
  2. Enable plugins debug output. This can be done by setting an environment variable: SET QT_DEBUG_PLUGINS=1
  3. Start DebugView
  4. Start gnuplot from the command line where you set the variable
  5. Look for messages from gnuplot in DebugView. There might be some noise depending on what else is running in the system. DebugView collects output from all applications, but you can easily filter and search.

Debug messages should at least show exact paths to plugins that are being loaded. Most likely some additional information about the error will be shown too.

like image 64
Georgy Pashkov Avatar answered Sep 22 '22 05:09

Georgy Pashkov


It's difficult to say without minimal code. But it looks like you didn't correctly deploy your application. 1) you should use windeployqt tool to create redistributable build. 2) you need to configure your app correctly with config: qt.conf. Ask if you need more help.

P.S. I got very difficult bug, when I got installed qt and redistributable qt on one PC. I found an answer here.

like image 35
Dmitry Sazonov Avatar answered Sep 21 '22 05:09

Dmitry Sazonov