Running a CMake'd debug version of 2.5 is a trip to hell

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
Stukfruit
Posts: 0
Joined: Sun Nov 04, 2007 8:56 am

Running a CMake'd debug version of 2.5 is a trip to hell

Post by Stukfruit » Mon Jun 08, 2009 4:02 am

I'm trying to run a debug build of Blender 2.5 here, but it's not easy...

First off, I've build the whole thing with CMake and MSVC 2008 (Vista). There were some initial issues because the CMake files were linking to both python25.lib and python25_d.lib in debug mode, but that was easily fixed by removing the reference to python25.lib (if anyone could do the same in the CMakefile's @ svn, thank you!).

Now I can finally run the debug version of Blender 2.5.. right?

Well, no. You see, every time I try to run the program, it crashes when trying to access any member from the "event" class that's passed on through GHOST_EventPrinter::processEvent(GHOST_IEvent* event).

But the pointer is very valid, and whatever I try, it's not possible to access any of its member variables or functions. However, I *am* able to see the values of the variables in the debugger and the function entries point to valid locations as well...

I'm pulling my hair here. Did someone else ever have these kind of issues with GHOST?

I could really use some help here. Did anyone else already try to build the debug version of the 2.5 branch with CMake/MSVC? Did it work?

btw. I'm not going to use Scons, it's too slow on my system.
(just saying, because some developers here seem to have this strange urge to recommend people to use Scons instead ;) )

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv » Mon Jun 08, 2009 10:03 am

(just saying, because some developers here seem to have this strange urge to recommend people to use Scons instead )
Yeah, some people have this strange fascination with stuff that is actively maintained and pretty much works right out of the box. Go figure!

Given your determination not to use a solution known to work, there is probably no point in mentioning the tweaks for speeding it up.

Stukfruit
Posts: 0
Joined: Sun Nov 04, 2007 8:56 am

Post by Stukfruit » Mon Jun 08, 2009 11:57 am

That was certainly a useful reply, but it doesn't solve my problem.

Anyone else?

Stukfruit
Posts: 0
Joined: Sun Nov 04, 2007 8:56 am

Post by Stukfruit » Mon Jun 08, 2009 4:50 pm

Well, I've somehow solved it by disabling the GHOST_DEBUG definition in GHOST_debug.h, which disables the usage of a GHOST_EventPrinter.

I still don't know why the event printer crashes on valid pointers, but at least it works this way :)

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv » Mon Jun 08, 2009 8:04 pm

CMake is our least supported build system - as you might have noticed. If you are capable of submitting a patch, consider doing so.

As for 'crashes on valid pointers', that is a bit of an oxymoron. It suggests that what you think is happening is not what is really going on. If I had to guess, I'd say you still have linking issues.

Version 2.50 is a development version which means pretty much anyone working on it is running a debug build. This suggests that your problems are local to either your platform or your box.

Stukfruit
Posts: 0
Joined: Sun Nov 04, 2007 8:56 am

Post by Stukfruit » Mon Jun 08, 2009 8:25 pm

Yeah, it doesn't really crash on the pointer, it just appears to be doing that :) (according to the debugger).

I'll check my local settings, libraries and whatever else for potential issues and will probably send a patch to fix the python thing as well.

Post Reply