informa
/
2 MIN READ
Blogs

Newsletter #50 - Debugged Lists

Problems with std::list, new sketches, and a community spotlight article.


News

No news to report this week.


From the Programmer
Written by Invisible

I ran into a rather odd problem this week. I was creating the workbench for the rendering system, which seemed to be working fine... Until I ran it in debug mode and it crashed.

After poking around in the code for a bit, I found out that the crash was being caused by attempting to iterate through an std::list. However, I was unable to recreate the bug in a testbed project. Out of ideas, I was about to quit for the day when I had a sudden inspiration: The rendering system's workbench was being ran in debug mode, but the static libraries that it used were compiled in release mode. Sure enough, after using debug versions of the static libraries, the program ran perfectly fine.

Curious to know exactly what was causing the problem, I made a copy of the workbench and the libraries that it used and slowly stripped away code that wasn't affecting the crash. Here is the code that I was left with: http://codepad.org/ibTVTcOv

Line #29 interests me in particular. Since that if statement should never be entered, you would think that lstList->begin(); would have no affect on anything. However, if that is changed to lstList->size(); or simply removed, the problem does not occur. The only explanation I can think of is that std::list::begin() is inline, which must somehow escape the if statement or cause corruption of the code. A debug version of std::list is being placed into a release version on line #26, but since only a pointer is assigned, std::list should be none the wiser.


Artist's Easel
Written by GreyKnight

iScribble Sketches #8

(Click to enlarge)

(Click to enlarge)

 


Community Spotlight
Written by Invisible

Jaythemage has released another community spotlight video. Check it out here: http://www.youtube.com/watch?v=gniKypFQLUA

Latest Jobs

IO Interactive

Hybrid (Malmö, Sweden)
3.02.23
Gameplay Director (Project Fantasy)

Arizona State University

Los Angeles, CA, USA
2.27.23
Assistant Professor of XR Technologies

IO Interactive

Hybrid (Copenhagen, Denmark)
3.02.23
Animation Tech Programmer

Purdue University

West Lafayette, IN, USA
3.02.23
Assistant Professor in Game Design and Development
More Jobs   

CONNECT WITH US

Explore the
Advertise with
Follow us

Game Developer Job Board

Game Developer

@gamedevdotcom

Explore the

Game Developer Job Board

Browse open positions across the game industry or recruit new talent for your studio

Browse
Advertise with

Game Developer

Engage game professionals and drive sales using an array of Game Developer media solutions to meet your objectives.

Learn More
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more