[SOLVED] Some VST2 plugins crash in my own host

I’m writing my own 32bit VST2 host in C++ on Windows. Most VST plugins work now, but some crash inside processReplacing(). I have no idea how to debug this kind of thing since I don’t have the source to any of those VSTs. The error I get on crash is this:

Access violation writing location 0xabababab.

That particular magic number is apparently “Used by Microsoft’s HeapAlloc() to mark “no man’s land” guard bytes after allocated heap memory”.

The plugins that crash have extra files besides their own DLL file. Might this have to do anything with the crashes? Is there anything a VST host needs to do to provide plugins with their additional files, or are VSTs supposed to read those themselves?

A few examples of plugins that crash are Line of Legends, MT Power Drum Kit 2 and LINN LM-1. Examples of plugins that work fine in my own VST host are tb_tapeworm_2_1, 4FrontRhode and ersdrums. All of the crashing ones are drums, but some drums do work (like ersdrums). Maybe it has something to do with the multi channel output that many drum computers seem to have?

I only implement a few host callbacks, but all the ones that these plugins call are implemented (I checked with the debugger). Here’s the implementation of my host callback: VstIntPtr VSTCALLBACK hostCallback(AEffect* effect, VstInt32 opcode, VstInt32... - e0db5653

Any tips on how to approach this to find the cause?

I’ve been stuck on this for ages and one hour after typing this questions I figure it out…

The problem was that I assumed 2 outputs, but these drum plugins will happily have a lot more. So I passed the wrong number of buffers to processReplacing.