Chapter 3.5 Debugging Games

Slides:



Advertisements
Similar presentations
Extreme Programming Alexander Kanavin Lappeenranta University of Technology.
Advertisements

Project leaders will keep track of team progress using an A3 Report.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Debugging Mohammad Zikky, M.T. 2 Debugging Introduction (1 of 2)  Debugging is methodical process for removing mistakes in a program  So important,
Programming Types of Testing.
IMGD 1001: Debugging. 2 Debugging Introduction (1 of 2)  Debugging is methodical process for removing mistakes in a program  So important, whole set.
Interactive Media and Game Development Debugging.
Interactive Media and Game Development Debugging.
CSCE 590E Spring 2007 Game Programming By Jijun Tang.
IMGD 1001: Debugging by Mark Claypool Robert W. Lindeman
Interactive Media and Game Development Debugging.
Debugging CPSC 315 – Programming Studio Fall 2008.
Interactive Media and Game Development Debugging.
Program Development and Programming Languages
Gearbox Software PRODUCTION PIPELINE – JOBS TITLES – JOB DESCRIPTIONS.
 Knowledge and use of tools and resources in a system: standard libraries, system calls, debuggers, the shell environment, system programs and scripting.
Your Interactive Guide to the Digital World Discovering Computers 2012.
Testing and Playtesting
Chapter Languages, Programming and Architecture.
Unit Testing & Defensive Programming. F-22 Raptor Fighter.
P51UST: Unix and Software Tools Unix and Software Tools (P51UST) Compilers, Interpreters and Debuggers Ruibin Bai (Room AB326) Division of Computer Science.
CSE 486/586 CSE 486/586 Distributed Systems PA Best Practices Steve Ko Computer Sciences and Engineering University at Buffalo.
Chapter 5: Control Structures II (Repetition)
CHAPTER 5: CONTROL STRUCTURES II INSTRUCTOR: MOHAMMAD MOJADDAM.
EGR 2261 Unit 5 Control Structures II: Repetition  Read Malik, Chapter 5.  Homework #5 and Lab #5 due next week.  Quiz next week.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
1 Software Development Configuration management. \ 2 Software Configuration  Items that comprise all information produced as part of the software development.
Computer Security and Penetration Testing
1 CSC 221: Computer Programming I Spring 2010 interaction & design  modular design: roulette game  constants, static fields  % operator, string equals.
Design and Programming Chapter 7 Applied Software Project Management, Stellman & Greene See also:
Programming Concepts Chapter 3.
CS 1308 Computer Literacy and The Internet Software.
Chapter 14 Part II: Architectural Adaptation BY: AARON MCKAY.
1.2 METHODS IN BIOLOGY SCIENTIFIC METHODS.
DEBUGGING. BUG A software bug is an error, flaw, failure, or fault in a computer program or system that causes it to produce an incorrect or unexpected.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
COMP 121 Week 1: Testing and Debugging. Testing Program testing can be used to show the presence of bugs, but never to show their absence! ~ Edsger Dijkstra.
Chapter 22 Developer testing Peter J. Lane. Testing can be difficult for developers to follow  Testing’s goal runs counter to the goals of the other.
Replay Compilation: Improving Debuggability of a Just-in Time Complier Presenter: Jun Tao.
Testing and Debugging Session 9 LBSC 790 / INFM 718B Building the Human-Computer Interface.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 6 Using Methods.
Well-behaved objects Main concepts to be covered Testing Debugging Test automation Writing for maintainability Objects First with Java - A Practical.
Making Good Code AKA: So, You Wrote Some Code. Now What? Ray Haggerty July 23, 2015.
Chapter 5: Control Structures II (Repetition). Objectives In this chapter, you will: – Learn about repetition (looping) control structures – Learn how.
Building More Reliable And Better Performing Web Applications With Visual Studio 2005 Team System Gabriel Marius TLN312 Program Manager Microsoft Corporation.
What is Testing? Testing is the process of finding errors in the system implementation. –The intent of testing is to find problems with the system.
Design - programming Cmpe 450 Fall Dynamic Analysis Software quality Design carefully from the start Simple and clean Fewer errors Finding errors.
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec11- 1 Lecture 11: Debugging & Defensive Programming Terminology.
Debugging Threaded Applications By Andrew Binstock CMPS Parallel.
Objects First With Java A Practical Introduction Using BlueJ Well-behaved objects 2.1.
Test Plan: Introduction o Primary focus: developer testing –Implementation phase –Release testing –Maintenance and enhancement o Secondary focus: formal.
The Process From bare bones to finished product. The Steps Programming Debugging Performance Tuning Optimization.
The single most important skill for a computer programmer is problem solving Problem solving means the ability to formulate problems, think creatively.
5.3. S ECTION R OUNDUP Exploration of project hand-in and section roundup.
Programming Logic and Design Fifth Edition, Comprehensive Chapter 6 Arrays.
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Configuration Management
14 Compilers, Interpreters and Debuggers
Debugging Intermittent Issues
Lecture 1 Introduction Richard Gesick.
Lecture 1: Introduction to JAVA
Libraries and Debugging
CSCE 315 – Programming Studio, Fall 2017 Tanzir Ahmed
Complete CompTIA A+ Guide to PCs, 6e
The lifespan of a variable
Version Control CS169 Lecture 7 Prof. Aiken CS 169 Lecture 7 1.
An Introduction to Debugging
The Troubleshooting theory
Software Testing Strategies
Presentation transcript:

Chapter 3.5 Debugging Games

The Five Step Debugging Process 1. Reproduce the problem consistently 2. Collect clues 3. Pinpoint the error 4. Repair the problem 5. Test the solution

Step 1: Reproduce the Problem Consistently Sample repro steps: 1. Start a single player game 2. Choose Skirmish on map 44 3. Find the enemy camp 4. From a distance, use projectile weapons to attack the enemies at the camp 5. Result: 90 percent of the time the game crashes

Step 2: Collect Clues Each clue a chance to rule out a cause Each clue a chance to narrow down the list of suspects Realize that some clues can be misleading and should be ignored

Step 3: Pinpoint the Error Two main methods: 1. Propose a Hypothesis You have an idea what is causing the bug Design tests to prove or disprove your hypothesis 2. Divide and Conquer Narrow down what could be causing the bug Eliminate possibilities from the top down or Backtrack from the point of failure upward

Step 4: Repair the Problem Propose solution Consider implications at point in project Programmer who wrote the code should ideally fix the problem (or at least be consulted) Explore other ways the bug could occur Ensure underlying problem fixed and not just a symptom of the problem

Step 5: Test the Solution Verify the bug was fixed Check original repro steps Ideally have someone else independently verify the fix Make sure no new bugs were introduced At the very end of the project, have other programmers review the fix

Expert Debugging Tips Question assumptions Minimize interactions and interference Minimize randomness Break complex calculations into steps Check boundary conditions Disrupt parallel computations Exploit tools in the debugger Check code that has recently changed Explain the bug to someone else Debug with a partner Take a break from the problem Get outside help

Tough Debugging Scenarios Bug exists in Release but not Debug Uninitialized data or optimization issue Bug exists on final hardware, not dev-kit Find out how they differ – usually memory size or disc emulation Bug disappears when changing something innocuous Timing or memory overwrite problem Intermittent problems Record as much info when it does happen Unexplainable behavior Retry, Rebuild, Reboot, Reinstall Internal compiler errors Full rebuild, divide and conquer, try other machines Suspect it’s not your code Check for patches, updates, or reported bugs Contact console maker, library maker, or compiler maker

Understanding the Underlying System Knowing prog. language not enough Know how the compiler implements code Know the details of your hardware Especially important for console development Know how assembly works and be able to read it Helps with optimization bugs or compiler issues Might mean bytecode instruction set or interpreter internals

Adding Infrastructure to Assist in Debugging Alter game variables during gameplay Visual AI diagnostics Logging capability Recording and playback capability Track memory allocation Print as much information as possible on a crash Educate your entire team testers, artists, designers, producers

Prevention of Bugs Set compiler to highest warning level Set compiler warnings to be errors Compiler on multiple compilers Write your own memory manager Use asserts to verify assumptions Initialize variables when they are declared Bracket loops and if statements Use cognitively different variable names Avoid identical code in multiple places Avoid magic (hardcoded) numbers Verify code coverage when testing