-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
RegistryKeyLookupFailed `CoderModulesPath' @ error/module.c/GetMagickModulePath/665 #4222
Comments
Windows installations are usually done by downloading one of the *.exe installation programs from https://imagemagick.org/script/download.php#windows , and running it. The "portable" versions don't use the Windows registry. If your old version was "portable", I expect you can replace it by simply deleting all the files and replacing them with the new ones. If the new version is not "portable" then it will use the registry for its searches, and if you haven't done a proper installation, the registry entries will not be there. |
Portable version (windows) do not expose the CORE_RL_MagickWand_.dll that I use to access the wand API from my delphi App. I always use the windows version and I set at the startup of the app the environment variables via the windows api setEnvironmentVariable:
those environment variable overload the registry keys like you can see in the module.c :
It's was working very well in previous version of imagemagick (at least in 7.0.7-23) but I don't understand why in 7.1.0 this not work anymore so their is clearly a regression somewhere |
I activated the log and i can see :
that correspond to this line :
So i don't understand why GetEnvironmentValue("MAGICK_CODER_MODULE_PATH"); do no work anymore in 7.1.0 |
Is their a place where I can get the install exe (ie: ImageMagick-7.0.8-22-Q16-x64-dll.zip) to know exactly at with version the regression appear ? I don't have visual studio so I can't compile the source code As far as I understand, it's look like that now module_path=GetEnvironmentValue("MAGICK_CODER_MODULE_PATH") is not working anymore but I can't understand why :( |
Sorry, I don't know what has changed that might prevent "GetEnvironmentValue("MAGICK_CODER_MODULE_PATH")" from working. I know nothing about Delphi. |
I work on it all the day, I confirm that now in 7.1.0 doing from the calling process
is not working anymore because imagemagick, via the getEnv function, don't see the change made by As getEnv is a quite generic function, I think the cause is maybe due because of a change of the compiler (vsstudio 2019?) this quite big problem because now their is no way to deliver the c++ dll within the app :( |
What defines the function setEnvironmentVariable()? That function isn't part of IM, nor is it part of the GNU C library. I suggest you test your build environment with trivial programs such as:
|
thanks @snibgo, setEnvironmentVariable is a windows api function I synthetize the problem here: https://stackoverflow.com/questions/69199708/setenvironmentvariable-does-not-seem-to-set-values-that-can-be-retrieved-by-gete |
a blank delphi app (in fact doesn"t matter it's delphi or something else) is loading at starting the msvcrt.dll (don't know why but it's like this) with take a cache of the environment variables, so when later I call setEnvironementVariable and later load a dll with use also msvcrt.dll and try to call getenv from this dll, then it's use the cache of msvcrt.dll and don't see the change I made just before via setEnvironementVariable, that a shame :( I I will try now to import from msvcrt.dll the _putenv and use it instead of setEnvironementVariable. don't understand why such ugly getenv exist :( |
ImageMagick version
7.1.0-Q16
Operating system
Windows
Operating system, version and so on
10
Description
I updated ImageMagick-7.0.7-23 to 7.1.0-Q16 by replacing all binaries with the new one, but now when I launch my program I have: Project w3wp.exe raised exception class Exception with message 'RegistryKeyLookupFailed `CoderModulesPath' @ error/module.c/GetMagickModulePath/665'
Note:
*) I don't have any registry, at the launch of my app I do: setEnvironmentVariable(PChar('MAGICK_CODER_MODULE_PATH'), pChar(aImageMagickHome + '\modules\coders'))
*) I load CORE_RL_MagickWand_.dll in my app and I do not call any exe, I work only with wand api
*) Everything work perfectly with ImageMagick-7.0.7-23 binaries
*) Adding the registry keys fix the problem, but I can't use registry key for many reasons
What can explain such regression? when I compare the code of module.c (7.0.7-23 vs 7.1.0-Q16) their in no difference in it that can explain the problem as far as I can understand :( so where the problem can be?
Note: I wrote a wrapper of imagemagick wand api for all Delphi users: https://github.com/Zeus64/alcinoe and it's during the update of this wrapper that I faced the problem
Steps to Reproduce
on windows 10 :
1/ at the launch of the app do: setEnvironmentVariable('MAGICK_CODER_MODULE_PATH', xxx)
2/ load CORE_RL_MagickWand_.dll in the app, work only with wand api
3/ call MagickReadImage and receive the error RegistryKeyLookupFailed `CoderModulesPath' @ error/module.c/GetMagickModulePath/665
Images
No response
The text was updated successfully, but these errors were encountered: