adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Re: Python error at exit


From: Kai Sterker
Subject: [Adonthell-devel] Re: Python error at exit
Date: Sun, 21 Mar 2010 13:57:50 +0100

On Thu, Mar 18, 2010 at 8:53 PM, Kai Sterker <address@hidden> wrote:
> Seen this a few times, but didn't really look into it:
>
> Fatal Python error: PyThreadState_Get: no current thread
[...]
> Mapview is the culprit! Will take a look at that eventually, unless
> somebody else is faster ...

Just looked into this. The actual issue is world::area_manager, which
is a static class which happens to have the mapview instance as a
member. Obviously, static classes are destroyed last, so by that time,
we've already shut down Python in main::adonthell::cleanup().

Not quite sure what the best solution is. Never shutting down Python
ourselves might be one way. Manually cleaning up the mapview before
shutting down Python another.

I fear that in the first case, we're still at the mercy of the C++
runtime, as that might destroy the two in any order. So the second
alternative sounds like it would be the safer route.

There's alread a world::cleanup() function that gets called in
main::adonthell::cleanup(). We'd only have to propagate that call to a
mapview::cleanup() that would at least destruct all the Python stuff
the mapview contains.

Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]