Native package of JavaFX 8 app with with javafx-maven-plugin on 32-bit Windows fails to load due to MSVCR100.dll missing - javafx

I am packaging my app into exe with javafx-maven-plugin. x64 version works well. But then I package x86 version on 32-bit Windows 7 (running in VirtualBox if that's important) with 32-bit JDK 1.8.0_161 and 32-bit Maven. The resulting application installs, but fails to run, claiming that MSVCR100.dll is missing even though it is in the runtime\bin folder. I googled around and found out that this is a JDK bug that was supposedly fixed way back in u40. So why does this still happen?
If I copy that dll manually next to the .exe it starts on one machine (again, in VirtualBox), but for some reason silently crashed on another (real one this time, fresh installation). Found an identical problem in javafx-gradle-plugin issues, though it got resolved when building on newest Win10 version, whereas I'm building on newest Win7.
If I just install Microsoft Visual C++ 2010 Redistributable Package then everything works, obviously, but I don't want user having to do that. So how do I copy .dll with Inno Setup script and how do I figure out the reason behind silent crashing?

I don't think this is related to Windows being 32 bit and it just happens to coincide with your two testing computers. I posted a question that is related here: Failed to find library: jvm.dll. What's going on here?
What you are experiencing is likely a bug on java(fx)packager as described here: https://bugs.openjdk.java.net/browse/JDK-8191176. That bug report claims the bug started on 8u155 and was solved by 8u171 but I am experiencing the bug all the way to the latest 8u172 b03 as I describe here: https://github.com/javafxports/openjdk-jfx/issues/59
I also tried going to 8u144 before the bug existed and I found that building the installer fails because of a missing MSVC dll (surprise! surprise!). I described the problem here: Where/how to get the MSVC dlls Java 1.8.0_144 wants?

There may be another .dll on which MSVCR100.dll depends and which is not present on specific machine.
That is a reason why the Redistributable Package installs everything together.
Try to find another dependencies using http://dependencywalker.com/, it looks like you need more dlls than MSVCR100.dll.
Or simply install Redistributable Package on each machine. Installing it multiple times does not harm any application or system.

Related

Qt application crash on Wayland

I've recently installed Ubuntu 22.04 LTS on my development laptop. Previously I was running 18.04 so this is my first experience of Wayland. I did a clean installation on a new disc. I had relatively few problems reinstalling gitkraken and cloning the repository of my source code from github but when I came to install the Qt libraries this is where my problems started. The on-line installer from the Qt website simply wouldn't run. It just exited silently. I eventually found an old version of the on-line installer executable in a backup of my downloads folder from Ubuntu 18.04 and was able to use this to download and install the same version of the Qt libraries that I was using previously (5.15.0). This is also the same version that I use on my other development machine which runs Windows 10. Keeping the two in step is useful and upgrading too many things at the same time seemed like asking for trouble. I installed the latest versions of Qt Creator (7.0.1) and g++ (11.2.0).
I was then able to build my application and, after a brief search of stack overflow I added "-platform wayland" to the command line arguments setting in Qt Creator but the application crashed almost immediately on start-up with the error "The Wayland connection experienced a fatal error: Protocol error".
Several things made me think this might be a bug in the Qt libraries rather than my application (none of them definitive!):
At the point of application exit, apart from main() there is none of my application code in the call-stack (see below)
My application has been stable for a long time and has survived several operating system, compiler and Qt version changes across two OS families
The fact that the latest Qt on-line installer (itself almost certainly a Qt application) wouldn't run
I downloaded Qt 5.15.12 (the latest Qt 5 version available) and rebuilt my application against that but the result was the same.
The next step is obviously to strip my application right down to something minimal that still shows the problem but before I do I was wondering whether this is something other people have come across when migrating a Qt5 application to Wayland and whether I need to take the bigger step of upgrading to Qt6? The Qt Wiki describes Qt 5.11 as being "stable" with Wayland.
The call stack at the time of the error looks like this:
qt_message_fatal
QMessageLogger::fatal
QtWaylandClient::QWaylandDisplay::checkError
QtWaylandClient::QWaylandDisplay::flushRequests
doActive
QMetaObject::activate
QSocketNotifier::activated
QSocketNotifier::event
QApplicationPrivate::notify_helper
QApplication::notify
QCoreApplication::notifyInternal2
QCoreApplication::sendEvent
socketNotifierSourceDispatch
g_main_context_dispatch
??
g_main_context_iteration
QEventDispatcherGlib::processEvents
QEventLoop::exec
QCoreApplication::exec
main
Many thanks.
It's something to do with QDialog::setMaximumSize. The call to setMaximumSize itself does not crash but if I remove all calls to it the application works fine. Some controls do subjectively seem bigger on Wayland so I wonder if Qt 5 on Wayland crashes if the size of the QDialog contents exceeds the maximum size specified. This certainly doesn't cause a crash in Qt 5 on Windows and didn't in Qt 5 on Ubuntu prior to the switch to Wayland. I think this is a Qt bug but of course it may well be fixed in a later version of Qt and there's an easy enough work-around now I know the cause.
I was using setMaximumSize to allow the dialog to expand dynamically as widgets were added but to prevent the user from making the window any bigger than it needed to be. layout()->setSizeConstraint(QLayout::SetFixedSize); achieves the same thing.

How do I install pglogical extension on Windows machine?

I need to migrate an enterprise production database from a Windows source machine running Postgres 9.5 to an Ubuntu destination machine running Postgres 11.6 with < 15 mins downtime. I plan to do this with pglogical, which requires the extension being loaded on both source and destination. I am having trouble with the source side because it is Windows.
I have very little Postgres-Windows experience and can neither find any helpful literature on the specific situation nor can I figure out for myself how to presumably install from source.
I've dug and dug and so far the only answer I've been able to find is "ugh... Windows". It seems like the only way to build from source is using Visual Studio, which I don't have or know how to use.
Sources:
https://www.2ndquadrant.com/en/blog/compiling-postgresql-extensions-visual-studio-windows/
https://postgrespro.ru/list/thread-id/1835275
Alex, the 2ndQuadrant article you link to in your own comment solves this. A few of the project or build options noted there have moved a little bit in the newer VisualStudio Community editions, so I can see where you got hung-up.
Just for kicks I compiled 32-bit DLL on my oldest Windows instance. I included the /Release path so you can grab my DLL & see if it works for you. It's (a) 32-bit because I'm assuming worst-case for an old v9.5 install, and (b) targets Postgres 9.6 because that's what I had installed. Unless there were major API changes though, it should connect to v9.5 without any issues:
https://github.com/mbijon/winpglogical/tree/master
If you find you need a version that entirely matches Postgres 9.5, grab my solution files & VS Community 20xx. Load the project & update the Additional Include Directories in Project Config to target your v9.5 paths. That should be all that's needed to link v9.5 Postgres libs.

Asp.Net Core 2.0 Linux Arm - SQLIte issue

we are currently trying to run asp.net core 2.0 (latest preview) on Linux arm (Raspberry Pi - Ubuntu Mate) and we were able to solve almost all the issues so application works very well.
Not we are trying to run it with SQL Db (Sqlite) and on Windows, everything works fine, we can connect and read the DB but on the linux, we are getting following error:
System.DllNotfoundException: Unable to load DLL 'e_sqlite3': The specified module or one of its dependencies could not be found. (Exception from HRESULT: 0x8007007E).
I think I already tried everything, installed sqlite on linux, but nothing helped.
Any idea what might be wrong?
Thanks a lot
Rado
i changed the library that I used to connect to sqlite to this one
https://www.nuget.org/packages/sqlite-net-pcl/
and then (and not sure why), on linux, i had to take their implementation of SQLite.cs and manually add it to the project.
So for Linux, i had to have that CS included and for windows, i just excluded it so the one which was part of DLL works. Didn't do more investigation, but it works on Windows and Linux as well.
If you need more help just let me know.
https://github.com/oysteinkrog/SQLite.Net-PCL
This file:
https://github.com/praeclarum/sqlite-net/blob/master/src/SQLite.cs
Thanks
Rado
I think we'll have to wait, the issue isn't closed.
UPDATE:
this issue is closed and launched new version. You only need install the last version 1.1.8 of the package SQLitePCLRaw.bundle_green and SQLite in ARM works fine.
I am having the same issue and I after some investigation I think this happens because e_sqlite3.dll for ARM is not (yet) included the SQLitePCLRaw.bundle_green package.
This package contains the dll for different architectures but linux-arm is not yet mentioned in the dependencies (linux, osx and v110xp (win7) are).
We probably have to wait until the .NET Core ARM team adds it properly...

Installing 32 and 64-bit Oracle client but 32-bit installer crashes

I am trying to install Oracle 12c instant 32-bit client alongside my 64-bit installation because I can't connect Visual Studio to the 64-bit version (throws BadImageFormatException). I run the installer and give it another directory for home, so it's like this:
64-bit: D:\app\MyUser\product\12.1.0\dbhome_1 (previously installed)
32-bit: D:\app\Lazar\product\12.1.0\dbhome_x84
The installer performs the checks and sends me to next step. I click install and it crashes!
Can someone please help?
I've actually run into the same problem. It looks like it is some sort of issue with the registry.
It appears to be a missing registry entry for the location of the Oracle Inventory. The below blog explains the following steps to add the missing registry key:
Open regedit
Go to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node
Create a new key with name "Oracle"
Go to Oracle and then create a new String Value with name "inst_loc"
Give the value as "C:\Program Files (x86)\Oracle\Inventory"
Retry installation
This blog post has more detail on the fix (though not much) and is where I originally found my solution.
https://oracledba1949.wordpress.com/2016/03/11/oracle-12-1-0-2-32bit-client-installation-on-windows-2012-x64bit/
I also had the same issue and finally realized that Oracle installer doesn't support both 64bit and 32bit versions alongside. At least as you have mentioned in the question, it has got a bug. Here how I resolved the problem.
Hence both 64bit & 32bit versions unable to install alongside, first, uninstall the 64bit version.
Run the command %ORACLE_HOME%\deinstall\deinstall.bat
If any errors occur while uninstall, refer to the log and correct accordingly.
Recommend to restart the computer.
Install the 32bit version.
This will resolve your problem.

When installing an ODBC driver, Windows Installer keeps putting it in SystemFolder

I'm working on an installer that, among other things, installs a web server.
As part of the setup, I'm setting up an ODBC driver and data source. I'm
trying to put a bunch of utility files, including the third party ODBC driver DLL,
into a certain folder, but when I run the installer, it insists on changing
that directory to the SystemFolder directory. Why is it doing this, and is
there any way that I can make it install the files where I want them to go?
Strangely enough, it was actually working correctly up until I added a bunch
more files to that particular folder. In case it's relevant, the files that I'm having trouble with are in a merge module.
(I'm temporarily getting around the problems that this is causing by
installing the DLL to the SystemFolder, but I'd much rather avoid DLL hell by
having it installed where I want it to go, not where Windows Installer seems
to think it should go.)
I should also point out that I'm using Wise Installation Studio 7.0 as my development environment.
It would seem that it's not Windows Installer that insists on the ODBC Driver DLL being installed in the SystemFolder directory, but Wise. We found this solution for getting rid of an Error 1918 problem that we were also seeing, which says to take the driver entries out of the ODBCDriver table, and stick them in as Registry entries instead. After implementing that fix, we tried moving our DLL to where we really want it to be installed, and the installer was happy with that.

Resources