Calling 6.5.x from Java returns error 0xc150004
Posted: 2009-08-27T07:05:23-07:00
Dear ImageMagick Team,
I have a strange new problem calling newer ImageMagick versions from Java on Windows machines.
Since several years I am calling ImageMagick from Java without any problems.
My application can detect and call any installed or uninstalled ImageMagick.
This was working fine up to the version 6.4.1. Now I need to update ImageMagick to a newer version 6.5.x
Everything works fine on an OSX machine (no problems at all).
However:
When trying to call version 6.5.5 from Java on a Windows XP machine, the runtime returns with the error 0xc150004 (process could not be initialised).
No problem if the same software calls version 6.4.1.
The registry is set with correct values.
I am passing the following Strings to the environment which works fine for older IM versions (of course with other/correct paths):
MAGICK_HOME=C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\im\6.5.5
MAGICK_CONFIGURE_PATH=C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\im\6.5.5\config
MAGICK_CODER_MODULE_PATH=C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\im\6.5.5\modules\coders
MAGICK_CODER_FILTER_PATH=C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\im\6.5.5\modules\filters
Path=C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\im\6.5.5;C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\gs\8.70\bin;%Path%
GS_LIB=C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\gs\8.70\lib;C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\gs\8.70\fonts;
These also can be the paths to an installed version - same problem.
The strange thing is: when I do NOT pass ANY environment variables then ImageMagick starts (sure it does not work properly but the process can be initialized and ImageMagick can be loaded).
Calling an installed or uninstalled IM 6.5.x manually from the command prompt works fine.
No 6.5.x version can be called from Java. Any dll and static including the one for package distribution.
As far as I have found out until yet: all older versions (installed or package distr. at least up to 6.4.1) could be installed and/or delivered in a package and were working fine as long as the registry AND the environment variables were properly set.
Google did not really help. One discussion mentioned that evtl. mfc90.dll can not be found and loaded.
To mention again: this problem exists only on Windows with newer 6.5.x IM versions.
As all calls from Java work fine with older versions, I think that this could be a bug.
Do you have any hint for me? What am I missing?
Thank you for your help.
Andreas
I have a strange new problem calling newer ImageMagick versions from Java on Windows machines.
Since several years I am calling ImageMagick from Java without any problems.
My application can detect and call any installed or uninstalled ImageMagick.
This was working fine up to the version 6.4.1. Now I need to update ImageMagick to a newer version 6.5.x
Everything works fine on an OSX machine (no problems at all).
However:
When trying to call version 6.5.5 from Java on a Windows XP machine, the runtime returns with the error 0xc150004 (process could not be initialised).
No problem if the same software calls version 6.4.1.
The registry is set with correct values.
I am passing the following Strings to the environment which works fine for older IM versions (of course with other/correct paths):
MAGICK_HOME=C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\im\6.5.5
MAGICK_CONFIGURE_PATH=C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\im\6.5.5\config
MAGICK_CODER_MODULE_PATH=C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\im\6.5.5\modules\coders
MAGICK_CODER_FILTER_PATH=C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\im\6.5.5\modules\filters
Path=C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\im\6.5.5;C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\gs\8.70\bin;%Path%
GS_LIB=C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\gs\8.70\lib;C:\Programme\BatchXSLT4InDesign\BatchXSLT\Utilities\Imaging\Win\gs\8.70\fonts;
These also can be the paths to an installed version - same problem.
The strange thing is: when I do NOT pass ANY environment variables then ImageMagick starts (sure it does not work properly but the process can be initialized and ImageMagick can be loaded).
Calling an installed or uninstalled IM 6.5.x manually from the command prompt works fine.
No 6.5.x version can be called from Java. Any dll and static including the one for package distribution.
As far as I have found out until yet: all older versions (installed or package distr. at least up to 6.4.1) could be installed and/or delivered in a package and were working fine as long as the registry AND the environment variables were properly set.
Google did not really help. One discussion mentioned that evtl. mfc90.dll can not be found and loaded.
To mention again: this problem exists only on Windows with newer 6.5.x IM versions.
As all calls from Java work fine with older versions, I think that this could be a bug.
Do you have any hint for me? What am I missing?
Thank you for your help.
Andreas