PDA

View Full Version : Need help tracking down a bug


merlinn31
27th September 2009, 04:41
So basically, I wrote a plugin that draws some stuff on a frame and returns the frame. The idea is that I take a tga with alpha channel, use ImageSource to repeat it to a desired length, then pass that to ScriptClip which then calls my function.

It runs flawlessly on my development machine. The development machine is a Centrino2, XP x86 with all updates. I used MS Visual C++ 2008 Express Edition to write/compile it.

I copied the plugin to a render box running Vista x64 w/ all updates, Intel Quad-core cpu, and the same versions of Avisynth and Virtualdub. Running the Avisynth script on this box results in:

AviSynth read error: CAVIStreamSynth: System exception - Access Violation at 0x7778f897, reading from 0xfe7d6071

The weird thing, is that it seems to only throw this error when I draw to the section of the frame where the Alpha layer = 255. If I draw to the other section where the Alpha layer = 0, it works fine.

Again, this works flawlessly on my development machine, so I don't think this is some sort of fundamental coding issue like not manipulating individual pixels correctly, but I'm still open to the suggestion. Also, I realize that I haven't given a whole lot to work with, but I'm not sure what someone else would need to know to help come up with a fix.

I'd appreciate any ideas you guys might have.

neuron2
27th September 2009, 04:49
You can start by posting your source code and script.

merlinn31
27th September 2009, 05:24
Just the C++ function? Or the source for the whole dll?

Would it be better/possible to PM/email it with the .avs instead?

Gavino
27th September 2009, 12:16
As a minimum, post here the script and the source code of your plugin class. If there is additional code called by your plugin that may be relevant, and it's too big to post directly, put that in a zip archive and add as an attachment (or upload to a filesharing site).

SEt
27th September 2009, 15:25
Call stack for the crash is also preferred to abstract address somewhere in system dll.

merlinn31
27th September 2009, 21:15
Thanks guys for trying to help me out. I figured it out though.

I wrote several plugins for a project I was working on, and this was one of the first that I wrote. Looking back on the source, I can tell :)

The issue was because of something that I've been warned about through forum posts and filter development tutorials a few times: using multiple write pointers. As soon as I rewrote that part of the filter without them, everything worked.

Thanks again. For future reference, I've read how to debug filter dlls with VS2005, but not 2008. Can anyone point me in the right direction?