# Tuesday, 17 February 2009

So I’ve been motivated to work on Decal lately for some reason.  Maybe it was Virindi and Flynn talking about it; maybe I was just bored with my other projects.  I spent a few days on bugs here and there, hopefully fixing the vendor bug in adapter and another one with world iterators, and decide to test some of my own plugins.  Of course the biggest one is QuickBuff, since it’s the least simple, and of course it crashes horribly whenever I click start.  It seems somewhere along the line the ‘magic’ COM-thread marshaling quit working.  I’m not sure if it’s because of Vista or a recent .NET update, but either way, QB was dead.

I knew the issue was thread marshaling because the error was obvious:  COM Interface not found.  Of course I don’t want to debug this issue because I don’t really know how Mekle fixed it in the first place.  Instead I start converting everything to use the Invoke method that was already present in my framework to move all COM calls to the main thread.  After half a day of refactoring my task class everything looks good.  Until I get around to testing things.  It looks like my Invoke method isn’t working at all.

It turned out that I didn’t do enough research when I was looking up synchronization methods.  I had found and decided on the SynchronizationContext object, but the class doesn’t actually do anything.  Apparently it’s meant to be more of an example to implement a custom sync context.  After many, many false starts and even more crashes, I eventually went back to the good old Control.Invoke method.  I wanted to avoid this to keep from having a dependency on System.Windows.Forms, but aside from implementing my own sync context, I didn’t have much choice.

All said and done, this turned out to be a great batch of work.  The plugin is way faster and smoother than it was before and seemingly more stable too.  I even went ahead and implemented the adhoc/smart buffing feature, and I’m considering going forward with rebuilding the profile editor using the current view system.

I’ll do a release after I clean up the adhoc view some more, probably this weekend.

Comments are closed.