Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 not finding DLL in JAR file. #1

Closed
mcpierce opened this issue Mar 5, 2020 · 12 comments
Closed

Windows 10 not finding DLL in JAR file. #1

mcpierce opened this issue Mar 5, 2020 · 12 comments

Comments

@mcpierce
Copy link

mcpierce commented Mar 5, 2020

I'm the project lead for ComiXed.

We're using your library to process WebP encoded comic pages. On Mac no issues have been reported. However some Windows users have reported a bug when working with WebP images (see the thread here for the details - comixed/comixed#159):

Exception in thread "Jarvis-ComiXed" java.lang.UnsatisfiedLinkError: C:\Users\<user>\AppData\Local\Temp\8794223231485648063webp-imageio.dll: Can't find dependent libraries
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.load0(Unknown Source)
        at java.lang.System.load(Unknown Source)
        at com.luciad.imageio.webp.NativeLibraryUtils.loadFromJar(WebP.java:131)
        at com.luciad.imageio.webp.WebP.loadNativeLibrary(WebP.java:31)
        at com.luciad.imageio.webp.WebP.<clinit>(WebP.java:38)
        at com.luciad.imageio.webp.WebPDecoderOptions.<clinit>(WebPDecoderOptions.java:20)
        at com.luciad.imageio.webp.WebPReadParam.<init>(WebPReadParam.java:24)
        at com.luciad.imageio.webp.WebPReader.getDefaultReadParam(WebPReader.java:147)
        at javax.imageio.ImageIO.read(Unknown Source)
        at javax.imageio.ImageIO.read(Unknown Source)
        at org.comixed.model.library.Page.getImageMetrics(Page.java:145)
        at org.comixed.model.library.Page.<init>(Page.java:120)
        at org.comixed.loaders.ImageEntryLoader.loadContent(ImageEntryLoader.java:45)
        at org.comixed.adaptors.archive.AbstractArchiveAdaptor.processContent(AbstractArchiveAdaptor.java:211)
        at org.comixed.adaptors.archive.ZipArchiveAdaptor.loadAllFiles(ZipArchiveAdaptor.java:90)
        at org.comixed.adaptors.archive.ZipArchiveAdaptor.loadAllFiles(ZipArchiveAdaptor.java:45)
        at org.comixed.adaptors.archive.AbstractArchiveAdaptor.loadComic(AbstractArchiveAdaptor.java:138)
        at org.comixed.task.model.ProcessComicTask.startTask(ProcessComicTask.java:60)
        at org.comixed.task.runner.Worker.run(Worker.java:187)
        at java.lang.Thread.run(Unknown Source)

We're using the 1.0 release from Maven of webp-imageio.

@bareheiny
Copy link

A bit more info (I'm one of the users with issues on Windows).

This has occurred on two machines - both running 64bit Win 10 Pro. I reset one of my machines (for unrelated reasons) and reinstalled Java SE 1.8.0_241.

I tried CX again, and got a completely different set of errors than the missing library ones, but didn't capture a log.

Now I get the missing library error again.

@ediweissmann
Copy link
Contributor

Thanks for the bug report!
Tests seem to fail on Windows 10, but seem to pass on Windows 10 when VS2017 build tools installed.

I think maybe the compiled webp-imageio.dll has a dependency that is not present on Windows 10 by default.

@mcpierce
Copy link
Author

mcpierce commented Mar 7, 2020

@ediweissmann My Windows fu is pretty weak, but is there a command line tool to do that? Similar to the tools available on *nix systems to get the list of immediate dependencies for a shared library?

@dukeofradish
Copy link

@mcpierce The tool you want is Dependencies. https://github.com/lucasg/Dependencies
Running that across the webp-imageio.dll showed a missing dependency for 'ucrtbased.dll'. That DLL is installed with the VS2017 Build Tools Windows 10 SDK.

After installing that DLL webp comics import properly.
webp-dependency

@bareheiny
Copy link

On a 64bit Win 10 Surface Pro 4, I'm seeing VCRUNTIME140D.dll as missing as well.

@ediweissmann
Copy link
Contributor

I'll be looking into going the static library route to avoid these problems.

@coder111111
Copy link

Hi, I've hit this problem as well and this prevents me from progressing. Could you please get this fixed soon?

@gondur
Copy link

gondur commented Apr 22, 2020

Hi i think the core of this problem is, that the webP DLL was compiled as DEBUG build (therefore linking to the debug DLLs) while it should be build as RELEASE build, then it would link against the usually available DLLs on Windows' and c++ redistributable libs.

@ediweissmann
Copy link
Contributor

You're right gondur, that seems to be the root cause of the problem.
If I build as RELEASE build it works on a clean Windows 10.

Thanks!

I'll make a release tomorrow.

@ediweissmann
Copy link
Contributor

Fixed in 0.1.2

@coder111111
Copy link

coder111111 commented Apr 23, 2020 via email

@ediweissmann
Copy link
Contributor

Should be published now, under:
org.sejda.imageio:webp-imageio:0.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants