[sword-devel] .Net Exception Odd behavior...

Wade Balzer wbalzer at newjerusalem.org
Fri Jul 31 11:44:01 MST 2009


I am working on a Bible project in C# for the web.  I am using the
SwigSword.dll wrapper.

 

When I load the manager using the default location for the modules as
provided by the SWORD_PATH environment, it words fine and the debugger exits
without a problem.

 

filterManager = new MarkupFilterMgr((char)Sword.FMT_OSIS,
(char)Sword.ENC_HTML);

manager = new SWMgr( filterManager);

 

GC.SuppressFinalize(filterManager);

 

However since this will be a web environment, I need to directly point to
the Module locations without directly pointing to my local %SWORD_PATH%
variable.

 

When I set the location of the config, and manually set the location of the
module path, everything seems to work fine until I exit the debugger.  It
CRASHES.

 

SWConfig config = new SWConfig(BaseModDir + "mods.d\\global.conf");

SWConfig sysconfig = null;

 

filterManager = new MarkupFilterMgr((char)Sword.FMT_OSIS,
(char)Sword.ENC_HTML);

//manager = new SWMgr( filterManager);

manager = new SWMgr(config, sysconfig, false, filterManager);

manager.configPath = BaseModDir + "mods.d\\";

manager.prefixPath = BaseModDir;

manager.Load();

 

manager.augmentModules(BaseModDir);

 

GC.SuppressFinalize(filterManager);

 

I am not sure why the first one works without a problem, and the second one
works, but crashes on exit.

 

HELP!!!

 

Thanks,

 

Wade

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20090731/7afc27f2/attachment.html>


More information about the sword-devel mailing list