[Mono-list] Failed to create shadow copy (CopyFile) exception
Francis Brosnan Blazquez
francis at aspl.es
Thu Oct 16 05:04:46 EDT 2008
Hi,
We are working on a project that loads a set of assemblies from
different directories starting from a base directory. It is fully
functional on Linux (not tested yet on Mac) but on Windows we receive a
"Failed to create shadow copy (CopyFile)" exception just after starting
the app.
Let me describe a bit the application startup. It is a single executable
that loads assemblies found on directories starting from the base path:
c:\application\app.exe
c:\application\Common\skelwindow\skelwindow.dll
c:\application\Common\plugins\plugins.dll
...(and so on)
That is, once app.exe starts, he looks inside Common directory to load
assemblies matching the pattern NAME\NAME.dll
Tracking the problem down to mono/metadata/appdomain.c file, it seems
the function that is failing is get_shadow_assembly_location.
This is because the following call:
dyn_base = mono_string_to_utf8 (domain->setup->dynamic_base);
..which returns NULL because domain->setup->dynamic_base is also NULL.
This causes the following g_build_filename to also return NULL, making
the caller to fail on CopyFile function (because he tries to copy our
assembly to a NULL location).
We've tried to check which value should have domain->setup->dynamic_base
and why it is NULL, but this goes beyond our knowledge about mono
internals...
At this point we're not sure if this "shadow copy" should happen (since
we don't reload or update those dll on-the-fly).
Any clue or comment on which direction to go would be *really*
appreciated. Thanks for your fantastic job. Cheers!
PD: All tests are done with mono 2.0 sources, under windows XP
professional with all updates included. I'm also attaching differences
applied to appdomain.c and output produced by them.
--
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: appdomain.diff
Type: text/x-patch
Size: 526 bytes
Desc:
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20081016/97bfcad7/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.log
Type: text/x-log
Size: 409 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20081016/97bfcad7/attachment-0001.bin
More information about the Mono-list
mailing list