[1.1.4] Windows special versions N/KN: can't find dependent libraries with opencv_java342.dll --- workaround

Bug #1797505 reported by Adi Wahyu Saputra
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
SikuliX
Won't Fix
Critical
RaiMan

Bug Description

******************************* workaround
the N and KN versions come without a bunch of media related libraries.
This apparently makes it impossible to use OpenCV.

So use a normal Windows version or install the available media package from Microsoft.

Maybe already the installation of a recent "Visual C++ Redistributable …" package helps.

--- a solution from comment #14:
I had this problem on Windows Server 2012 R2 and solved it by installing Desktop Experience from Control Panel.
--------------------------------------

[error] RunTimeIDE: opencv_java342.dll loaded, but it might be a problem with ne
eded dependent libraries
ERROR: ...TEMP...: Can't find dependent libraries
[error] RunTimeIDE: *** terminating: problem with native library: opencv_java34
2.dll

Revision history for this message
RaiMan (raimund-hocke) wrote :

I guess, there is some "Visual C++ Redistributable …" missing on your system.

As far as I understand: the opencv_java342.dll (from the official opencv Windows package) needs a Redistributable suitable for VS2014/2015.

I have the Redistibutable 2017 on my Windows 10 and it works.

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → In Progress
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.4
summary: - sikuli 1.1.4 IDE error opencv_java342.dll windows 10 64bit
+ [1.1.4] IDE error opencv_java342.dll windows 10 64bit
Revision history for this message
Matthew Miller (millermr) wrote : Re: [1.1.4] IDE error opencv_java342.dll windows 10 64bit

I am seeing this issue on Windows Server 2012 and Windows 7. I have Redistributable 2017 installed on both machines as well as the latest JRE.

Revision history for this message
RaiMan (raimund-hocke) wrote :

I tested with a Windows 7 64Bit Service Pack 1 with latest updates but nothing else (no Net Framework, no Redistributable or other packages):
It works.

So I guess, I cannot help you, sorry

Revision history for this message
Fran J (franjdv) wrote :

I have this issue on windows 7 with latest JRE and Redistributable 2017 but without latest updates of windows (a lot of windows updates was missing in fact).
I updated window, tested it again and it work now.

Revision history for this message
RaiMan (raimund-hocke) wrote :

As mentioned in comment #3: IMHO a Redistributable seems not to be needed

Revision history for this message
Dado (dadotc) wrote :

I solved this issue copying the (missing) file "api-ms-win-downlevel-shlwapi-l1-1-0.dll" from another computer where sikulix was working

Revision history for this message
Singah (singah) wrote :

Installing the win update KB2670838 solved this issue for me, found here: https://www.microsoft.com/en-nz/download/details.aspx?id=36805

solution found at:

https://github.com/opencv/opencv/issues/12010

RaiMan (raimund-hocke)
summary: - [1.1.4] IDE error opencv_java342.dll windows 10 64bit
+ [1.1.4] Windows: can't find dependent libraries with opencv_java342.dll
Revision history for this message
Ryan (ryan-g2) wrote : Re: [1.1.4] Windows: can't find dependent libraries with opencv_java342.dll

I am adding a comment because I have the same issue on one of my test Win10 machines. I tried the solutions here and found elsewhere on the web, but nothing has helped so far.

I do have a Win10 machine that will run Sikuli - same Sikuli version. The difference is the Windows versions. The one that Sikuli does not run on has the Red Stone 5 (1809) update installed - the one that works has Red Stone 4 (1803) still.

I am thinking this may be the issue - as I have uninstalled various KB updates to see if one of them is causing the error. None of the uninstalled KBs helped.

Revision history for this message
Ryan (ryan-g2) wrote :

Oh, I forgot to mention, I am using Sikuli SNAPSHOT from 2019-03-15.

On the version that does not work, I have the C++ Redistributables from 2008, 2010, 2012, and 2017. Uninstalled and reinstalling all that did not help.

Revision history for this message
Ryan (ryan-g2) wrote :

Update to say that I reinstalled Windows RedStone 4 (fresh Windows, but didn't format the drive). The issue still persisted - so it wasn't the Red Stone update to blame.

I then ended up nuking n' paving (formatted and reinstalled Win 10 RedStone 4). NOW a simple 'click the start button' script works again. This was all with the SNAPSHOT 2019-03-20 build.

So, some wires where seriously crossed and I still have no idea how to uncross them without this 'last resort' solution. I still have no idea how thy got crossed in the first place - Sikuli worked on this machine and then when I tried it again a few months later, it didn't work.

Revision history for this message
Ryan (ryan-g2) wrote :

Also with Java 8 64-bit....build 202

Revision history for this message
Kobe Roosens (koban29) wrote :

Same problem: Windows 10 Pro N version 1809, OS build 17763.379 (64 bit)
Fresh install, only the java jdk 11 and chrome installed and same error:

[error] RunTimeAPI: Problematic lib: C:\Users\PCGebruiker1\AppData\Roaming\Sikulix\SikulixLibs\opencv_java342.dll (...TEMP...)
[error] RunTimeAPI: opencv_java342.dll loaded, but it might be a problem with needed dependent libraries
ERROR: ...TEMP...: Can't find dependent libraries

As adviced in this thread I went to find the "api-ms-win-downlevel-shlwapi-l1-1-0.dll" and put it in the same folder as on my source machine, but no solution.

Revision history for this message
Kobe Roosens (koban29) wrote :

Another update:

Reinstalled the machine, fresh windows 10 iso downloaded today.
Only installed java jdk 11 and chrome 73.x and this time sikulix gives no problems

Windows 10 Pro, version 1809, OS build 17763.379 (64 bit)
Didn't take the N-version when reinstalling, perhaps that made the difference?

RaiMan (raimund-hocke)
Changed in sikuli:
status: In Progress → Confirmed
importance: High → Critical
summary: - [1.1.4] Windows: can't find dependent libraries with opencv_java342.dll
+ [1.1.4] Windows special versions N/KN: can't find dependent libraries
+ with opencv_java342.dll --- workaround
description: updated
RaiMan (raimund-hocke)
Changed in sikuli:
status: Confirmed → Won't Fix
milestone: 1.1.4 → none
Revision history for this message
João Ferreira (joaopferreira) wrote :

I had this problem on Windows Server 2012 R2 and solved it by installing Desktop Experience from Control Panel.

RaiMan (raimund-hocke)
description: updated
Revision history for this message
Shresth Suman (shsu7085) wrote :

I was having the same problem on my machine -
Sikulix - 1.1.4
Windows 10 Enterprise N LTSC

Solution - Download Media Feature Pack for N versions of Windows 10
https://www.microsoft.com/en-us/software-download/mediafeaturepack
PS - restart after installation.

Revision history for this message
Manuel Rodriguez (amulen-1810) wrote :

Hello, to solve this problem in Windows you only have to go to the path:

"C: // windows / system32"

And check that the following files are in that folder:

MSVFW32.dll
AVIFIL32.dll
AVICAP32.dll
ole32.dll
KERNEL32.dll
USER32.dll
OLEAUT32.dll
MFPlat.DLL
MF.dll
MFReadWrite.dll
d3d11.dll
api-ms-win-downlevel-shlwapi-l1-1-0.dll

These files are necessary for OpenCV to work correctly in Windows. In case you are missing any of these files, you should search for them on the Internet and download them. Be sure to download them in 32 or 64 bits depending on your computer.

My English is not so good but I hope you can understand.

Revision history for this message
Dat Boi (datboi2) wrote :

Just adding the missing DLL files did not help on my Server 2012 R2 machine but installing the "Media Foundation" Package from the server control panel did the job. Thanks everyone!

RaiMan (raimund-hocke)
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.