Note that there are some explanatory texts on larger screens.

plurals
  1. POProgram Doesn't Terminate Correctly
    primarykey
    data
    text
    <p>I'm writing a computer vision app (C++ and OpenCV). I am creating a GUI for it with wxWidgets - this is very simple; a button-press event calls the tracker app to begin.</p> <p>My call to terminate the app (i.e. on clicking to close button) is as follows:</p> <pre><code>// Exiting the App void MyFrame::OnQuit(wxCommandEvent&amp; WXUNUSED(event)) { // true is to force the frame to close Close(true); } </code></pre> <p>This usually works with more trivial GUI apps. However, on this occasion, the frame disappears yet, in the task manager, the process seems to continue running and holding memory. It's very annoying because if I run or debug the application and later make some changes and try to run again, without manually terminating the process beforehand, the compiler throws a link error because the .exe is</p> <blockquote> <p>not found or not built by the last incremental link.</p> </blockquote> <p>Tried inserting a brute force exit(1); in the onQuit method but it causes the app to crash.</p> <p>I'm not sure what it is.. when running without the GUI, the app runs and terminates fine (albeit it is called slightly differently - from the main() function instead of from a button-press event handler which calls an abstract base class).</p> <p>Is it possible that it is because a class is being declared with global scope? As in, in one file I have an instance of a class declared outside of any class method? Perhaps wxWidgets can't handle this?</p> <p><em>To clarify:</em></p> <p>The frame I'm closing is a top level frame. I had no problems with the exact same GUI code when it does not call the computer vision methods.</p> <p>I haven't specifically coded any multi-threading but to begin with, I was getting an error that said "Error: Cannot initialize OLE". To fix this, I had to set wxUSE_DRAG_AND_DROP, wxUSE_CLIPBOARD, wxUSE_OLE and wxUSE_OLE_AUTOMATION to 0 (instead of 1) and then (re)compile wxWidgets.</p> <p>Just wondering, is there some kind of threading going on with HighGUI that is inconsistent with WxWidgets? Has anybody else encountered similar problems?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload