Handmade Hero»Episode Guide
Fixing an Event Recording Bug
?
?

Keyboard Navigation

Global Keys

[, < / ], > Jump to previous / next episode
W, K, P / S, J, N Jump to previous / next marker
t / T Toggle theatre / SUPERtheatre mode
V Revert filter to original state Y Select link (requires manual Ctrl-c)

Menu toggling

q Quotes r References f Filter y Link c Credits

In-Menu Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Filter and Link Menus

z Toggle filter / linking mode

Credits Menu

Enter Open URL (in new tab)
0:08On the headwind of live streaming
0:08On the headwind of live streaming
0:08On the headwind of live streaming
0:53It would seem that the viewers of Handmade Hero solved the bug from the last stream
0:53It would seem that the viewers of Handmade Hero solved the bug from the last stream
0:53It would seem that the viewers of Handmade Hero solved the bug from the last stream
3:01Description of the effects of the bug
3:01Description of the effects of the bug
3:01Description of the effects of the bug
4:30Even with lots experience, difficult bugs will still happen
4:30Even with lots experience, difficult bugs will still happen
4:30Even with lots experience, difficult bugs will still happen
5:48This bug was not so complicated, but its source laid outside what we considered to be the set of probable causes
5:48This bug was not so complicated, but its source laid outside what we considered to be the set of probable causes
5:48This bug was not so complicated, but its source laid outside what we considered to be the set of probable causes
8:07The bug is probably related to incorrect translation unit indices
8:07The bug is probably related to incorrect translation unit indices
8:07The bug is probably related to incorrect translation unit indices
10:02RecordDebugEvent may generate an incorrect translation unit index if it's not inlined by the compiler
10:02RecordDebugEvent may generate an incorrect translation unit index if it's not inlined by the compiler
10:02RecordDebugEvent may generate an incorrect translation unit index if it's not inlined by the compiler
12:02Checking that theory
12:02Checking that theory
12:02Checking that theory
14:01Is one of the timing functions in handmade_optimized not working properly?
14:01Is one of the timing functions in handmade_optimized not working properly?
14:01Is one of the timing functions in handmade_optimized not working properly?
14:30Disabling optimizations
14:30Disabling optimizations
14:30Disabling optimizations
15:12The bug does not reproduce in debug mode
15:12The bug does not reproduce in debug mode
15:12The bug does not reproduce in debug mode
15:56Stepping though the optimized code
15:56Stepping though the optimized code
15:56Stepping though the optimized code
18:00RecordDebugEvent is not inlined
18:00RecordDebugEvent is not inlined
18:00RecordDebugEvent is not inlined
18:55Yes. Wrong translation unit. The forum nailed it
18:55Yes. Wrong translation unit. The forum nailed it
18:55Yes. Wrong translation unit. The forum nailed it
19:31Making RecordDebugEvent a macro fixes the issue, but...
19:31Making RecordDebugEvent a macro fixes the issue, but...
19:31Making RecordDebugEvent a macro fixes the issue, but...
20:18Owl of Success Momentα
20:18Owl of Success Momentα
20:18Owl of Success Momentα
21:04... we should get rid of the code related to translation unit indices anyways; it introduces too much complexity and opens the door to subtle bugs
21:04... we should get rid of the code related to translation unit indices anyways; it introduces too much complexity and opens the door to subtle bugs
21:04... we should get rid of the code related to translation unit indices anyways; it introduces too much complexity and opens the door to subtle bugs
22:42We won't remove the translation unit indexing yet
22:42We won't remove the translation unit indexing yet
22:42We won't remove the translation unit indexing yet
24:18Back to visualization. Let's avoid producing regions that would be invisible in our debug plots
24:18Back to visualization. Let's avoid producing regions that would be invisible in our debug plots
24:18Back to visualization. Let's avoid producing regions that would be invisible in our debug plots
26:14Introducing options to compile away the profiling code
26:14Introducing options to compile away the profiling code
26:14Introducing options to compile away the profiling code
29:25According to the debug display, we should be running at a higher framerate
29:25According to the debug display, we should be running at a higher framerate
29:25According to the debug display, we should be running at a higher framerate
31:32Validating rdtsc measurements against wall clock time
31:32Validating rdtsc measurements against wall clock time
31:32Validating rdtsc measurements against wall clock time
33:30Recording the wall clock during FRAME_MARKER invocations
33:30Recording the wall clock during FRAME_MARKER invocations
33:30Recording the wall clock during FRAME_MARKER invocations
40:19Our display does not agree with the framerate because we are not taking into consideration the time it takes to collate debug records
40:19Our display does not agree with the framerate because we are not taking into consideration the time it takes to collate debug records
40:19Our display does not agree with the framerate because we are not taking into consideration the time it takes to collate debug records
41:23Selectively setting SecondsElapsed instead of ThreadId and core index
41:23Selectively setting SecondsElapsed instead of ThreadId and core index
41:23Selectively setting SecondsElapsed instead of ThreadId and core index
47:21HAL: "I'm sorry, Dave, I can't... I can't save the file"β
47:21HAL: "I'm sorry, Dave, I can't... I can't save the file"β
47:21HAL: "I'm sorry, Dave, I can't... I can't save the file"β
48:20Testing today's additions. It's odd that the time we spend inside FrameWait and FrameDisplay went up
48:20Testing today's additions. It's odd that the time we spend inside FrameWait and FrameDisplay went up
48:20Testing today's additions. It's odd that the time we spend inside FrameWait and FrameDisplay went up
50:00Adding DebugCollation counters
50:00Adding DebugCollation counters
50:00Adding DebugCollation counters
50:30DebugCollation takes a lot time
50:30DebugCollation takes a lot time
50:30DebugCollation takes a lot time
51:09Using the wall clock times to print the time it takes to draw a frame
51:09Using the wall clock times to print the time it takes to draw a frame
51:09Using the wall clock times to print the time it takes to draw a frame
54:00We're at 250 ms/frame
54:00We're at 250 ms/frame
54:00We're at 250 ms/frame
54:34Without drawing the debug rectangles, it goes down to 91 ms/frame
54:34Without drawing the debug rectangles, it goes down to 91 ms/frame
54:34Without drawing the debug rectangles, it goes down to 91 ms/frame
55:45Disabling debug event recording, we get back to our original performance
55:45Disabling debug event recording, we get back to our original performance
55:45Disabling debug event recording, we get back to our original performance
59:14Our collation of the debug records is very expensive
59:14Our collation of the debug records is very expensive
59:14Our collation of the debug records is very expensive
1:00:36Q&A
🗩
1:00:36Q&A
🗩
1:00:36Q&A
🗩
1:01:05quartertron What's your favourite bug of all time?
🗪
1:01:05quartertron What's your favourite bug of all time?
🗪
1:01:05quartertron What's your favourite bug of all time?
🗪
1:01:48serge_rgb Often when I'm debugging, I have to stop myself from changing stuff at random because of mental laziness, hoping for "an even number of sign errors". Do you ever have that urge? If so, has it diminished as you have become more experienced?1,2
🗪
1:01:48serge_rgb Often when I'm debugging, I have to stop myself from changing stuff at random because of mental laziness, hoping for "an even number of sign errors". Do you ever have that urge? If so, has it diminished as you have become more experienced?1,2
🗪
1:01:48serge_rgb Often when I'm debugging, I have to stop myself from changing stuff at random because of mental laziness, hoping for "an even number of sign errors". Do you ever have that urge? If so, has it diminished as you have become more experienced?1,2
🗪
1:05:19CaptainKraft Doesn't it go against your philosophy of "write the code as you need it" to make a debugger like this before the game needs much debugging?
🗪
1:05:19CaptainKraft Doesn't it go against your philosophy of "write the code as you need it" to make a debugger like this before the game needs much debugging?
🗪
1:05:19CaptainKraft Doesn't it go against your philosophy of "write the code as you need it" to make a debugger like this before the game needs much debugging?
🗪
1:07:21Arconyx Is there any way to keep familiar with old code or is working with it frequently the only way?
🗪
1:07:21Arconyx Is there any way to keep familiar with old code or is working with it frequently the only way?
🗪
1:07:21Arconyx Is there any way to keep familiar with old code or is working with it frequently the only way?
🗪
1:10:49aameen95 Mok actually found the bug and AndreasK actually figured why it is causing what was happening by looking at the assembly. The compiler decided to not inline the call in the constructor and inline it in the destructor so the start marker is wrong and the end marker is right
🗪
1:10:49aameen95 Mok actually found the bug and AndreasK actually figured why it is causing what was happening by looking at the assembly. The compiler decided to not inline the call in the constructor and inline it in the destructor so the start marker is wrong and the end marker is right
🗪
1:10:49aameen95 Mok actually found the bug and AndreasK actually figured why it is causing what was happening by looking at the assembly. The compiler decided to not inline the call in the constructor and inline it in the destructor so the start marker is wrong and the end marker is right
🗪
1:12:21Stephenlast It looked like that FRAME_MARKER was going past this TODO: "// TODO(casey): Move this to a global variable so that there can be timers below this one?"
🗪
1:12:21Stephenlast It looked like that FRAME_MARKER was going past this TODO: "// TODO(casey): Move this to a global variable so that there can be timers below this one?"
🗪
1:12:21Stephenlast It looked like that FRAME_MARKER was going past this TODO: "// TODO(casey): Move this to a global variable so that there can be timers below this one?"
🗪
1:13:14win32_handmade.cpp: Move that TODO down and check if GlobalDebugTable exists
1:13:14win32_handmade.cpp: Move that TODO down and check if GlobalDebugTable exists
1:13:14win32_handmade.cpp: Move that TODO down and check if GlobalDebugTable exists
1:14:07quartertron Do you really care about compilation units or just threads? Hash the thread IDs
🗪
1:14:07quartertron Do you really care about compilation units or just threads? Hash the thread IDs
🗪
1:14:07quartertron Do you really care about compilation units or just threads? Hash the thread IDs
🗪
1:14:46SedihGlow Do you write code for this project off stream, for fun or speed?
🗪
1:14:46SedihGlow Do you write code for this project off stream, for fun or speed?
🗪
1:14:46SedihGlow Do you write code for this project off stream, for fun or speed?
🗪
1:15:24slash1221 If I don't have a credit card, is there another way to buy it?
🗪
1:15:24slash1221 If I don't have a credit card, is there another way to buy it?
🗪
1:15:24slash1221 If I don't have a credit card, is there another way to buy it?
🗪
1:16:09CaptainKraft You brought up your devlog: do you think that writing a devlog is good for the writer, the readers, or both?
🗪
1:16:09CaptainKraft You brought up your devlog: do you think that writing a devlog is good for the writer, the readers, or both?
🗪
1:16:09CaptainKraft You brought up your devlog: do you think that writing a devlog is good for the writer, the readers, or both?
🗪
1:16:25CaptainKraft It sounds like the debugger is not only a tool to find out what is going wrong, but to detect when things are going to go wrong. Is that a fair assumption? I never thought of a debugger as something that keeps me "situationally aware". That sounds like a great idea
🗪
1:16:25CaptainKraft It sounds like the debugger is not only a tool to find out what is going wrong, but to detect when things are going to go wrong. Is that a fair assumption? I never thought of a debugger as something that keeps me "situationally aware". That sounds like a great idea
🗪
1:16:25CaptainKraft It sounds like the debugger is not only a tool to find out what is going wrong, but to detect when things are going to go wrong. Is that a fair assumption? I never thought of a debugger as something that keeps me "situationally aware". That sounds like a great idea
🗪
1:17:46We have come to the end of the stream
🗩
1:17:46We have come to the end of the stream
🗩
1:17:46We have come to the end of the stream
🗩