-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This should fix very rare but possible silent crashes.
- Loading branch information
1 parent
ae15a35
commit ae638e6
Showing
2 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ae638e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, excuse my ignorance, but isn't this just a different way of writing the exact same code again?
ae638e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really no idea what's going on. I was able to record demo with crash scene, and after this fallback to original code crash is no longer happening. Another fun thing is - getting crash on "debug" build was barely possible, though in "release" it was happing normally. Some kind of devilry. 👿
ae638e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a red herring. Sometimes debug builds seem to allocate a bit more memory for (global? stack?) arrays. For example, I was unable to reproduce the crash in the demo linked here with a debug build, though it's clearly an array bounds violation:
fabiangreffrath/woof#1221
ae638e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, good to know, thanks! Plus OS dependency, Medusa bug in Chocolate Doom's Windows vs Linux comes to mind.
I deffinitly need to play around with this revert more, because I swear - it was able to fix recorded silent crash! I wasn't even drunk, since quit drinking enterely almost for year now. I've also go vegan, but oops, that another story. 🤭
ae638e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, the video record. I'm making first three demo runs with reverted, un-simplified approach, and no problem. Then I change code to simplified approach and make another three runs, and all of them causing a silent crash (program quits before demo actually ends): https://youtu.be/CaFYNh1yUYg
Not sure, but could it be related to missing
if (index >= MAXLIGHTZ )
condition.Edit: testing demo - crash.zip (requires Alien Vendetta WAD).
ae638e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible you have messed up the
u
andx
parts in theBETWEEN(l,u,x)
macro?international-doom/src/m_fixed.h
Line 46 in c94fe76
ae638e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really no idea, it's "technically" working with both placements. But what is really crazy about this one - I can't reproduce it on my day job machine with Windows 10, no single crash in about 100 demo runs on same config. Must be a real case, where "if unsure, revert back to original code" fits just perfect, which is working fine.
ae638e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The question was rhetoric. 😉
I think you had
where it was meant to be
ae638e6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks for explanation! Still, better I'll leave original code, otherwise I will need some heart pills soon. ☠️