simlmx / pyvst

My attempt at loading VST libraries using python's `ctypes` standard library.
MIT License
17 stars 2 forks source link

OSError: exception: access violation reading #4

Open nyckmaia opened 2 years ago

nyckmaia commented 2 years ago

This issue is a continuation of #2

Installing the pyvst package:

cd [go to the pyvst root folder]
pip install .

Running the simple_host.py example:

python3 .\examples\simple_host.py 'C:\Program Files\Steinberg\VstPlugins\TAL-Elek7ro-II.dll'

Terminal output:

Traceback (most recent call last):
  File "C:\Users\nyck\Desktop\pyvst\examples\simple_host.py", line 37, in <module>
    main(args.vst)
  File "C:\Users\nyck\Desktop\pyvst\examples\simple_host.py", line 15, in main
    host = SimpleHost(vst_filename, sample_rate=48000.)
  File "C:\Users\nyck\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvst\host.py", line 75, in __init__
    self.load_vst(vst_filename)
  File "C:\Users\nyck\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvst\host.py", line 109, in load_vst
    self.vst.resume()
  File "C:\Users\nyck\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvst\vstplugin.py", line 57, in resume
    self._dispatch(AEffectOpcodes.effMainsChanged, value=1)
  File "C:\Users\nyck\AppData\Local\Programs\Python\Python39\lib\site-packages\pyvst\vstplugin.py", line 65, in _dispatch
    output = self._effect.dispatcher(byref(self._effect), c_int32(opcode), c_int32(index),
OSError: exception: access violation reading 0x0000000000000006

What am I doing wrong?

My system:

simlmx commented 2 years ago

There might be a bug in my code. Also I have never tried to run it on windows and I'm not sure if something needs to be treated differently there. The only thing I got working is a VST on Linux that I compiled from scratch... years ago 😬 I tried the same thing with another VST (I couldn't find the one I used last time) a couple days ago and I got a segfault so it sounds like there is a bug creeping somewhere in my codebase.

Sorry for not being more helpful!