beginner needs help please: steinbergs minihost crashes with some plugins

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

I currently try to find my way through plugin development.
I used steinbergs minihost sample as a start to anaylze some things. It compiles, but:

it crashes within the checkEffectEditor.

It creates a dialog window, the EditorProc is called with msg WM_INITDIALOG, which works, but on return from the EditorProc some plugins crash.

For example Angular Momentum's "AM Freehand Free.dll"

In "proper hosts", "AM Freehand Free.dll" is working flawlessly, so I suspect the dialog window mechanism might be the culprit?

Well, I'm too new to all this, maybe anyone can shed some light on the issue for me and help me out? I want to understand the inner working of windows and plugin uis, but I simply haven't a clue where to start solving this issue.

Thank you very much!
Tab

Post

I don't think you should be working with that plugin. Get another one that doesn't hang up your program.

Post

well, I'm trying to develop a "special" host, which is to be expected working with any plugin, so I really want to understand what and why something goes wrong here...

Post

Steinberg take that word, "mini", VERY seriously.

Try compiling the VSTGUI sample program (CONTROLSGUI? Something like that) then you can debug into it and see where and why it crashes (assuming it will).

Post

I don't get it. All I want to do is loadlibrary a plugin, initialise an instance and effEditOpen the GUI, to take a window capture. The minihost seems to be perfectly simple. But it crashes with AM Freehand Free and some others, and I don't know why. I tried the whole evening creating different kind of windows, studying open source vst host cpps and such... But it seems I'm too stupid to code such a simple thing. About to give up already.

Is it a threading issue? Do some plugins rely on more than the single version HostCallback in the minihost? I could spend my whole live trying without actually understanding :(

Can somebody help, please?

Post

TabSel wrote:I don't get it. All I want to do is loadlibrary a plugin, initialise an instance and effEditOpen the GUI, to take a window capture. The minihost seems to be perfectly simple. But it crashes with AM Freehand Free...
It works. If i start the program using CTRL + F5 or double click the executable, it works. If i run the debugger (F5) it triggers a breakpoint though: "Windows has triggered a breakpoint..."

Post

You say the Steinberg minihost app shows the dialog box with the GUI of AM Freehand Free without crashing?

I have an Idea: I use ActualTools window manager. With it running I have NIs Maschine/Kore plugin rescan dialog box crashing the app. I will try it with the AWM service stopped as soon as I come home today!...

Post

No luck.

The effeditopen for am freehand free destroys the heap so the return from editproc crashes.

I wonder how every other host on the same machine works...

I tried using non-dialog windows with and without child windows, no luck.
I tried catching unhandled exceptions.

This is simply too much for a beginner like me :(

Post

TabSel wrote:No luck.

The effeditopen for am freehand free destroys the heap so the return from editproc crashes.

I wonder how every other host on the same machine works...

I tried using non-dialog windows with and without child windows, no luck.
I tried catching unhandled exceptions.

This is simply too much for a beginner like me :(
Make sure all the stuff regarding editor size is handled correctly.

And if I understand correctly and it's a plug-in you're trying to build, use real hosts to test with, not Steinberg's crap examples.

http://reaper.fm has a free unlimited demo and is a great host and very VST compliant.

Post

TabSel wrote:You say the Steinberg minihost app shows the dialog box with the GUI of AM Freehand Free without crashing?
Yes.

How do you start minihost?

Post

I compiled minihost, after I changed the filepath to my "AM Freehand Free" and double clicked the exe...

Post

If this can help you, i created a VS2008 project from scratch
around the two cpp files in the sources and set the vst path.
(sdk 2.4)

Post

as did I, in VS2010...

I'm open for everything, as I'm clueless. Good thing is, I learned a lot about windows development *g*

may I send you a .exe, so you can tell if it crashes for you, too, with "my" minihost? Maybe it's my system...?

Post

I also copied the vst2.x folder inside the project and updated the paths in the "include" directives.

But why should it be the system?

The effeditopen for am freehand free destroys the heap so the return from editproc crashes.
How did you get this error? Stepping over the source code in a debug session?

As i told you, "when i debug", i also get an error:
HEAP[MiniHost.exe]: Invalid Address specified to RtlFreeHeap( 011C0000, 01738924 )
Windows has triggered a breakpoint in MiniHost.exe.

This may be due to a corruption of the heap, which indicates a bug in MiniHost.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while MiniHost.exe has focus.

The output window may have more diagnostic information.
but it happens either after a WM_ACTIVATEAPP message or after a WM_PAINT one.

Perhaps it has something to do with the fact that there are two windows,
the console and the dialog. You might try to build the host as a windows
application project (no console) and see if it works.

Post

TabSel wrote:as did I, in VS2010...
Just a shot in the dark - are you compiling it as a Unicode executable? If so, change that to MBCS.
"Until you spread your wings, you'll have no idea how far you can walk." Image

Post Reply

Return to “DSP and Plugin Development”