adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] [PATCH] Ported worldtest.py to C++, and called it


From: Kai Sterker
Subject: Re: [Adonthell-devel] [PATCH] Ported worldtest.py to C++, and called it smallworld.cc
Date: Sun, 5 Oct 2008 11:19:39 +0200

On Sun, Oct 5, 2008 at 9:38 AM, Chris Frey <address@hidden> wrote:

> For some reason, worldtest.py segfaulted on me with I turned on
> DEBUG_COLLISION, and the core dump was useless to me... so I ported it
> to C++ in the hopes that it would make debugging easier, but the C++
> version doesn't crash... :-)

The DEBUG_COLLISION flag turned out to be somewhat painful. I have a
suspicion that it is causing a stack corruption if not everything is
compiled correctly. Since then I removed it from the header files
which should have eased things a bit, but there might be some more
unforeseen issues. Generally, it worked when setting it for the python
world module (inside src/py-wrappers/adonthell), the c++ world module
(src/world) and worldtest itself.

Even then, it's use is quite limited since the mapview has been added,
since the graphical debug aids are now no longer aligned with what's
on the screen. It's all a big construction site, it seems :-/.


> I thought I'd pass this patch along in case anyone else wanted to share it.
> You don't have to add it to CVS if you think it will clutter things up.

There shouldn't be any harm in adding it. It could even be helpful for
people to see the same program in Python and C++. A lot of the code
that has to be written yet will be in Python, so it'll be good to see
how the C++ interfaces translate to Python.

Kai




reply via email to

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