COM+ keeps file handles locked after work is done

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
ecosky
Posts: 2
Joined: 2011-05-14T09:58:58-07:00
Authentication code: 8675308

COM+ keeps file handles locked after work is done

Post by ecosky »

I'm using the COM+ component in C# as documented in this post http://blog.boundingboxgames.com/2011/0 ... s-xna.html to create temporary files in a game asset pipeline which are read back in after processing.

Unfortunately it appears the COM+ object keeps the file handle open until the COM+ object is finalized. This makes it impossible to use it to repeatedly to generate a temporary file that is read back in by the tool and then deleted.

Ideally the COM+ object would release file handles immediately upon completing work, or if that's not possible for some reason, provide an explicit Dispose interface to allow the caller to trigger the cleanup as needed.

Thanks
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: COM+ keeps file handles locked after work is done

Post by magick »

COM+ is a contributed project. We're primarily Linux developers and depend on the community to diagnose, repair, and enhance the COM+ project. Hopefully a user with knowledge of COM+ can help you with the file release problem.
ecosky
Posts: 2
Joined: 2011-05-14T09:58:58-07:00
Authentication code: 8675308

Re: COM+ keeps file handles locked after work is done

Post by ecosky »

Bit late on the follow up, sorry about that.

Thanks for the response. I have been using the COM+ for a while but finally switched to just starting the executable directly in order to avoid this file lock problem. I tried for a while to discover where the folks working on the COM+ module hung out, never found anything anywhere - from what I can tell it seems to be abandoned. Or perhaps my google-fu is weak today. Anyway, I figured I'd post that here just in case someone else was looking for support on the COM+ usage. I was going to try to fix the bug myself, but when I downloaded the IM source I didn't see anything in there for the COM+ object and I haven't been able to find out where the source comes from in order to fix it. No big deal, the exe does the trick well enough, the COM+ was just a convenience. Probably more trouble than it's worth, to be honest..

IM is pretty slick & I plan to continue to use it as a straight exe so thanks again for your ongoing efforts with this utility!
Post Reply