[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Calling clean_up_and_exit() twice
From: |
Michael Goffioul |
Subject: |
Calling clean_up_and_exit() twice |
Date: |
Wed, 6 Apr 2011 22:21:46 +0100 |
Hi,
I'm experimenting embedding octave in a test Qt app and having trouble
linking the "quit" function to the regular QApplication::quit() method. The idea
is to be able to quit the application cleanly when typing "quit" at
octave prompt.
What I've done is to re-define octave_quit variable to my own function that
calls QApplication::quit(). The problem is that function returns normally,
while it seems octave expects it not to return at all. The sequence is the
following:
- type "quit" at octave prompt
- through octave_interrupt_exception, this calls clean_up_and_exit();
this first pass runs fine
- clean_up_and_exit() returns normally, because I redefined octave_quit
- main_loop() exist normally
- at the end of octave_main(), clean_up_and_exit() is called again
- that second pass crashes during symbol_table::cleanup(), because at
that point all_instances[xtop_scope] == NULL
So the question is: is it possible at all to do what I'm trying to do?
or do I need to set quit_allowed to false and forget about triggering
a clean app exit when typing "quit" at octave prompt?
Michael.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Calling clean_up_and_exit() twice,
Michael Goffioul <=