INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: C++ Visualization API  (Read 2426 times)

paul1970

  • Junior Woodchuck
  • **
  • Posts: 66
  • Fractious Ingrate
C++ Visualization API
« on: July 21, 2013, 08:21:53 am »

Using the C++, when the user presses the 'Stop' button the destructor of my IJRVisualization is called so I take that as my cue to do all of my cleanup, destroying and deleting. So, that last thing I do is DestroyWindow the HWND that I returned from the call to IJRVisualization::Create. Shortly after exiting my destructor and unloading my DLL MC18 exits/crashes. Nothing useful appears in the Output and I haven't the first clue how to go about debugging the cause of this. I'd be grateful for any help at all as this is a show-stopper for me right now.
Logged
Heaven: The nicest speakers I can afford (set up with attention paid to room interactions) and an amp that can power them adequately. Plus any old competently designed cables, DAC and a bit-perfect source

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41948
  • Shoes gone again!
Re: C++ Visualization API
« Reply #1 on: July 21, 2013, 08:52:05 am »

Cleanup in the destructor is correct.

Is it possible you have a dangling thread or reference somewhere?

I'm not sure if the framework will have already destroyed your window or not, but I can tell you next week.  Or you could do ::IsWindow(m_hWnd) in the destructor and check.

Logged
Matt Ashland, JRiver Media Center

paul1970

  • Junior Woodchuck
  • **
  • Posts: 66
  • Fractious Ingrate
Re: C++ Visualization API
« Reply #2 on: July 21, 2013, 12:44:14 pm »

Hi and thanks.
I know the Window is still valid at that point because the WM_DESTROY code in my window proc is getting executed. Having said that, I should be doing that check anyway.

I've stripped the plugin right back, so my rendering thread and calls to JR automation are all commented out. The only thing I hold on to is a static HWND pointing to MC's parent window (from the Create call). I create a child window and DX9 context in it and then clean all that stuff up in my destructor. Any more light you can shed would help.
(As a last resort is there a possibility you might look at the code in a debugger at your end? Cheeky, I know)
Logged
Heaven: The nicest speakers I can afford (set up with attention paid to room interactions) and an amp that can power them adequately. Plus any old competently designed cables, DAC and a bit-perfect source

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 41948
  • Shoes gone again!
Re: C++ Visualization API
« Reply #3 on: July 21, 2013, 08:52:47 pm »

(As a last resort is there a possibility you might look at the code in a debugger at your end? Cheeky, I know)

Sure.

I'm matt _at_ jriver [dot] com.
Logged
Matt Ashland, JRiver Media Center

paul1970

  • Junior Woodchuck
  • **
  • Posts: 66
  • Fractious Ingrate
Re: C++ Visualization API
« Reply #4 on: July 22, 2013, 11:02:32 am »

Well thanks.
Email sent.
Logged
Heaven: The nicest speakers I can afford (set up with attention paid to room interactions) and an amp that can power them adequately. Plus any old competently designed cables, DAC and a bit-perfect source
Pages: [1]   Go Up