-
Notifications
You must be signed in to change notification settings - Fork 295
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
Unable to load OpenCV native library on Windows #431
Comments
By the way, in the version that can load dicom properly, the log output "[Dicom Model-pool-2-thread-1] org.opencv.osgi: Successfully loaded OpenCV native library." In the version that cannot load the dicom properly, no matter how I open the dicom operation, there will be no log statement output |
I can't reproduce the problem on Windows 2012 R2. If OpenCV fails to load, you should see this in the log output. Please provide logs (default.log) when you open DICOM file because the logs above don't give any clue about the issue. |
I have faced this issues for for different radiologist and end up with older versions. |
Of course, I'd be happy to offer it to you. |
At the same time, although 4.1.2 does not load DICOM, the load icon in the lower left corner will flash |
It's really amazing because there are no errors and some plugins don't seem to be launched. I've never seen this before. Could provide the output of the OSGI console that will give the status of all the plugins, start Weasis and type in a prompt:
|
And I tweaked my test procedure and found some new clues. After I opened weasis for the first time and set default.log, I deleted the log opened this time. I then restarted weasis and opened DICOM. Here is the new log. After comparison, I found that in the version (4.1.2) where the image cannot be opened, the two sentences "INFO [FelixStartLevel] org.weasis.core.internal.cv.NativeOpenCVCodec: Native OpenCV is activated","INFO [FelixStartLevel] org.weasis.core.internal.Activator: Register Image Codec Plug-in: OpenCV imgcodecs"are missing in default.log. I hope this clue will help you. |
It is like the weasis-core-img-4.6.1-jdk11.jar.xz package is corrupted because it is Active in the OSGI console "Image Processing (OpenCV) 4.6.1" but we do not see the initialisation in the logs. Could you try to delete cache folder in your user ".weasis/cache-id" (replace id by the one in boot.log Application Source ID = B130CF7D) and the restart. Or delete the whole .weasis folder. |
Sorry, I'm a little confused. You mean that the ".weasis" cache folder generated by the previous test version is deleted before each version test? If this is the case, then before this, every test I have done has been to delete the previous ".weasis" folder and then test. This means that there are no cached folders for each test, as they are all reloaded in this round of tests. If not, please provide more detailed test procedures. |
If you delete .weasis folder it will clean all the preferences and some cache for osgi. So it will be the same state when you run Weasis for the very first time on a Windows session. |
My steps are as follows:
I repeated steps 4-7 many times I hope these things work |
Okay, the package doesn't seem to be corrupted.
|
There are indeed abnormal log outputs. When opening weasis, boot.log has abnormal information output: "SEVERE [FelixStartLevel] org.opencv.osgi: Cannot load OpenCV native library: C:\Users\Administrator.weasis\cache-B130CF7D\bundle37\version0.0\bundle.jar-lib\0\opencv_java.dll: Can’t find dependent libraries". Then, I performed the open DICOM operation, and it will load the DICOM, although what is loaded is error information. At the same time, there is also abnormal information output, please see the log file for details. Before replacing the weasis-core you provided, there was no content loaded when performing the open DICOM operation. But please note that under the same environment, when opening versions below weasis4.0.3 (including 4.0.3), the DICOM can be opened normally. I’m glad we’ve made some progress. |
Dear sir, |
Now the problem is clear: opencv_java.dll is missing some dependencies. First, I'll propose modifying the initialization in the opencv project because this error is not caught. According to the documentation, the latest build requires: For systems prior to Windows 10 they are already end of life, it should no longer be used. For Windows 2012 R2, there are 3 months left before EOL. |
I'm glad you found the problem
After I tried to install Visual C++ redistributable 2015, it worked fine.
For some hospitals, they will still choose to use windows 7,, which is inevitable, but in most cases it will still be windows 10. |
Unfortunately, there's no clear information on these developments, and I can't see any obvious change in the construction of the binaries. I'll have a look, but I don't think I'll be able to change that, as it's in OpenCV and seems to be part of the library's evolution. As it's already a lot of effort to get Weasis supported on many systems and architectures, it's obvious that end-of-life systems can't be supported. However, I'll update the requirement in the download comment. |
No matter what the outcome, thank you for your dedication and support. |
Weasis 4.2.0 will use a new release of opencv without a Visual C++ redistributable 2015 dependency. |
Describe the bug. What happened?
I found a bug.
In some environments, weasis versions later than 4.0.3 cannot load dicom.
I tried the following versions: 4.0.1, 4.0.2, 4.0.3, 4.1.0, 4.1.1, 4.1.2.
These versions are installed after downloading the windows installation package, rather than compiling through code.
When I opened the dicom or dragged the dicom onto the weasis form, the first three versions loaded the dicom correctly, but the last three failed to load the dicom properly.
So I looked at their logs.
I found that versions that load dicom correctly, after starting weasis, will always have a sentence at the end of the log "[FelixStartLevel] org.opencv.osgi: Successfully loaded OpenCV native library ", and the version that failed to load dicom does not output this sentence in the log. So I wonder if it is because OpenCV is not loaded correctly that the dicom cannot be loaded.
Note: I tested the above six versions in three environments, one of which was my own machine (windows10) and the other two were VMware virtual machines (windows server 2012R2).
In one of the virtual machines and my local environment, the above 6 versions can load OpenCV and load dicom correctly, and when I check their logs, they all output the log of OpenCV loading success;
Another virtual machine, the first three versions are normal output OpenCV loading success log, and can also open the dicom , while the latter three versions do not output OpenCV loading success log, and can not load the dicom .
I've had this problem with windows7.
At that time it was like this: there were two computers with windows7, but one of them could not load dicom properly, and the other could load dicom normally. The weasis version at the time was a bit higher than the 4.0.3 environment and was compiled from code in March 2023.
I didn't care at the time, but now I think OpenCV didn't load successfully.
I'm a java novice, sorry if I'm wrong.
My English is not very good, if you are not clear, please reply me, I will try my best to express more clearly.
What version of Weasis are you running?
4.1.2
On which system the problem occurs?
Windows
Relevant log output
Additional contextual elements
No response
The text was updated successfully, but these errors were encountered: