User forums > Help

Run Button in C::B different than Running From OS

<< < (2/2)

Sqeaky:
I sent the "LD_LIBRARY_PATH:" and then etenv("LD_LIBRARY_PATH") to the logger. The logger handles multi-threading issues, adds a time stamp then adds one line to log file with the requested data. It was about 3:00pm local time when I ran this hence the 15:00:XX

From the OS command line:
dev@dev-laptop:~$ echo $LD_LIBRARY_PATH

dev@dev-laptop:~$
Nothing, just a blank line

When run from the OS I get this in the log file:
15:00:43: LD_LIBRARY_PATH:
15:00:43: .:

When running from Code::Blocks using run button, I get this in the log file:
15:04:14: LD_LIBRARY_PATH:
15:04:14: .:/home/dev/physgame/EngineDemo/bin/LinuxDebug:/home/dev/physgame/EngineDemo/.:

When running from Code::Blocks using Debug button it didn't get to the main of application where we could use getenv at. So I changed where I was doing the logging to be closer to the beginning of execution and I got this result I get in the log file:
15:13:14: LD_LIBRARY_PATH:
15:13:14: .:/home/dev/physgame/EngineDemo/bin/LinuxDebug:/home/dev/physgame/EngineDemo/.:

So there is a difference but is it significant? Could having extra search directories in the path cause a problem?


Edit: I more clearly described where I found each result.

Sqeaky:
Sorry for the triple post, but the content really doesn't seem to belong in the same post.

For reference the application I am working on is 3d game and game library. It is split up into 3 Code::Blocks projects. "Physgame" is the library, "EngineDemo" is a unit test and place try all the features of Physgame, and "Catch!" is the actual game. Right now I am working in the EngineDemo to test some new functionality we just added to Physgame. EngineDemo and Catch! both link to Physgame and not much else, and Physgame links to several external libraries and provides a single interface to the required functionality of Ogre3d, bullet3d, ticpp/tinyxml, Boost, SDL and certain OS dependent functionality.

Currently Physgame is single threaded, but Ogre3d and Bullet both spawn separate threads to perform some of all of the work they do. These are both well tested, and the issue I am having has existed before and after having changed library version. For example When we moved from Ogre 1.7.0 to 1.7.1 the issue still existed, it would simply pause somewhere else.

I would also like to note that sometimes, the issues simply does not occur. After certain major code changes the run and debug buttons would work, other times only one or the other would work. Right now neither work. When using the Debugger is pauses when I am initializing the Logger, sometimes after Ogre has finished it's initialization and sometimes not. When using the run button currently it is pausing just after the window and 3d rendering canvas are displayed, but before anything is rendered.

Edit: While writing this it occurred to me that this could be some kind of Race condition that the extra overhead of having and IDE could cause. I thought maybe physgame is trying to call on Ogre or Bullet Components before that have finished initialising. I tested this by putting a 1.5 second delay in between initializing Ogre and when it is first called, and it still crashes in the exact same place when both debugging and running it. I will try playing with LD_LIBRARY_PATH next.

Sqeaky:
This has been resolved. I have been able to debug in CodeBlocks consistently for about the past week.

Two relevant things have changed since I last attempted this. Our project now uses cmake to create build files (which I sometimes use to make Code::Blocks files). Right now I am using version SVN 6862. I don't know which one fixed the issue.

Navigation

[0] Message Index

[*] Previous page

Go to full version