diff options
author | David Robillard <d@drobilla.net> | 2013-12-30 21:46:21 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-12-30 21:46:21 +0000 |
commit | f76b94c277c34855579486851517d03c314c8fde (patch) | |
tree | 86bcd909290b39ced56132332edf2e738d964418 /src | |
parent | d88c1ffb6a725ba66ca85ad2410e4f45ddb7afbc (diff) | |
download | ingen-f76b94c277c34855579486851517d03c314c8fde.tar.gz ingen-f76b94c277c34855579486851517d03c314c8fde.tar.bz2 ingen-f76b94c277c34855579486851517d03c314c8fde.zip |
Fix occasional crashes and deadlocks on exit.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5229 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/World.cpp | 3 | ||||
-rw-r--r-- | src/server/Engine.cpp | 11 | ||||
-rw-r--r-- | src/server/events/SetPortValue.hpp | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/src/World.cpp b/src/World.cpp index 1e0f82c0..c91724a6 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -165,13 +165,12 @@ public: serialiser.reset(); parser.reset(); interface.reset(); - store.reset(); engine.reset(); + store.reset(); interface_factories.clear(); script_runners.clear(); - delete rdf_world; delete lv2_features; delete uris; diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index a7d77736..1f6fd70c 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -16,6 +16,8 @@ #include <sys/mman.h> +#include <limits> + #include "lv2/lv2plug.in/ns/ext/buf-size/buf-size.h" #include "events/CreatePort.hpp" @@ -95,6 +97,13 @@ Engine::~Engine() _root_graph = NULL; deactivate(); + // Process all pending events + const FrameTime end = std::numeric_limits<FrameTime>::max(); + _process_context.locate(_process_context.end(), end - _process_context.end()); + _post_processor->set_end_time(end); + _pre_processor->process(_process_context, *_post_processor, false); + _post_processor->process(); + const SPtr<Store> store = this->store(); if (store) { for (auto& s : *store.get()) { @@ -107,7 +116,6 @@ Engine::~Engine() _world->set_store(SPtr<Ingen::Store>()); - delete _maid; delete _pre_processor; delete _post_processor; delete _block_factory; @@ -115,6 +123,7 @@ Engine::~Engine() delete _broadcaster; delete _event_writer; delete _worker; + delete _maid; _driver.reset(); diff --git a/src/server/events/SetPortValue.hpp b/src/server/events/SetPortValue.hpp index 0c4e8b11..852c694e 100644 --- a/src/server/events/SetPortValue.hpp +++ b/src/server/events/SetPortValue.hpp @@ -54,7 +54,7 @@ private: void apply(Context& context); PortImpl* _port; - const Atom _value; + const Atom _value; ControlBindings::Key _binding; }; |