OpenCV 4.1.1 Imread() & Imwrite() Crashes Program ?
-
@jksh said in OpenCV 4.1.1 Imread() & Imwrite() Crashes Program ?:
The above shows that the DLLs that were previously in the Qt folder are incompatible with the DLLs in the MinGW compiler folder.
Could your build of OpenCV 4.1.1 be similarly contaminated?
In what sense, because I specified the correct paths to the compiler and Qt folders...
Does that mean you have multiple versions of OpenCV in your PATH at the same time?
Yes, although I have used this setup across multiple projects using different versions of opencv and I didn't run into any problems.
Did you use the same version of MinGW to build all your versions of OpenCV?
No, I have 32bit builds of OpenCV and 64bit builds.
Qt 5.12 and Qt 5.13 come pre-built for MinGW 7.3.0 64-bit.
What do you think of using one of those? That way, you can use an official build of Qt and its compiler to build your copy of OpenCV 4.1.1; you don't need a custom-built copy of Qt? (Note: Qt 5.5 reached end-of-life in March 2018)
That was exactly what I was looking for. Are you sure the 64bit compiler is available now with Qt ? And if so, when was it added because I did the custom setup like 6 months ago specifically because Qt only shipped with a 32bit minGW compiler ?
@r-p-h said in OpenCV 4.1.1 Imread() & Imwrite() Crashes Program ?:
In what sense
In the DLL Hell sense.
Yes, although I have used this setup across multiple projects using different versions of opencv and I didn't run into any problems.
Can you be 100% sure that that your current problems aren't caused by this setup?
No, I have 32bit builds of OpenCV and 64bit builds.
...and all of those different versions of MinGW and OpenCV are in your PATH...?
Please do yourself a favour and remove them all from your PATH. You don't need them in the PATH. This type of setup has caused many, many headaches over the years.
That was exactly what I was looking for. Are you sure the 64bit compiler is available now with Qt ? And if so, when was it added because I did the custom setup like 6 months ago specifically because Qt only shipped with a 32bit minGW compiler ?
Yes, I'm sure. It was added with Qt 5.12.0, which was released in December 2018.
-
@r-p-h said in OpenCV 4.1.1 Imread() & Imwrite() Crashes Program ?:
In what sense
In the DLL Hell sense.
Yes, although I have used this setup across multiple projects using different versions of opencv and I didn't run into any problems.
Can you be 100% sure that that your current problems aren't caused by this setup?
No, I have 32bit builds of OpenCV and 64bit builds.
...and all of those different versions of MinGW and OpenCV are in your PATH...?
Please do yourself a favour and remove them all from your PATH. You don't need them in the PATH. This type of setup has caused many, many headaches over the years.
That was exactly what I was looking for. Are you sure the 64bit compiler is available now with Qt ? And if so, when was it added because I did the custom setup like 6 months ago specifically because Qt only shipped with a 32bit minGW compiler ?
Yes, I'm sure. It was added with Qt 5.12.0, which was released in December 2018.
-
@jksh Thanks, I upgraded both Qt and added the 64bit compiler and now everything is working fine.
@r-p-h said in OpenCV 4.1.1 Imread() & Imwrite() Crashes Program ?:
now everything is working fine.
so please don't forget to mark your post as solved! Thanks.