[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 on 2018-10-12
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Sikuli
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.
--------------------------------------

[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

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) on 2018-10-12
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

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.

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

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.

RaiMan (raimund-hocke) wrote :

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

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

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) on 2019-01-12
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

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.

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.

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.

Ryan (ryan-g2) wrote :

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

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.

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) on 2019-04-12
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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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