Results 1 to 3 of 3

Thread: Running without debugger hides drawing

  1. #1
    Join Date
    May 2008

    Default Running without debugger hides drawing


    I just wanted to check if anybody here has ever seen something alike. When i debug my game, it works fine. But when I run my game without the debugger, it won't show any images.

    I confirmed through other means that the CL_Surface draw function is called and that CL_Surface contains a valid image. All the other stuff like flip and keepalive is also going well (it works in the debugger, so this should be fine). I'm not running multi threaded, so it couldn't be a timing problem?

    The only thing I got showing on the screen at the moment, is the color of the CL_Display->clear(CL_Color) function.

    Has anybody seen this before? I'm using clanlib 0.8

  2. #2
    Master Sorcerer
    Join Date
    Sep 2006


    This is most likely caused by an uninitialized variable or a race condition.

    If a variable is not initialized, it gets whatever value was already in memory at the position the object was allocated. For debug builds on Windows, the C++ runtime library clears all newly allocated memory with 0xcd, which could cause a program to work always in debug builds but then fail on release builds.

    If it is a race condition there has to be multiple threads in the system, or some other timing issue that affects the program. If your application does not use multiple threads the issue must be an uninitialized variable somewhere.

  3. #3
    Join Date
    May 2008


    The uninitialized variable was indeed the problem. Thanks a lot!

    It was not in the builds however, the difference was wheter I ran my program from windows explorer or through gdb. In gdb the variable would have a more sensible value.

    Apparently my game doesn't like it if an object is going through the level with speed (1663984740.38792, 293987390827,928374)

Similar Threads

  1. Running Dink under Wine
    By notbert in forum Dink Smallwood HD
    Replies: 4
    Last Post: 12-07-2007, 09:52 AM
  2. Redirect GUI drawing?
    By madmark in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 10-06-2007, 04:25 AM
  3. Is FileSponge running slow today
    By Grumpychumps in forum Funeral Quest
    Replies: 2
    Last Post: 05-03-2007, 05:12 AM
  4. Questions about running my own server
    By in forum Funeral Quest
    Replies: 3
    Last Post: 07-30-2005, 05:49 PM
  5. Replies: 4
    Last Post: 10-15-2003, 04:29 PM



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts