Comments (8)
@fabiangreffrath I implemented your fix in my source port and it works as expected.
from chocolate-doom.
WAD in question: http://www.doomworld.com/idgames/levels/doom2/deathmatch/Ports/s-u/shdwpit
from chocolate-doom.
This happens because R_CheckPlane()
does not have a check if MAXVISPLANES
is reached before making a new one and R_FindPlane()
only checks for (lastvisplane - visplanes == MAXVISPLANES)
, not >=
.
from chocolate-doom.
You can add a NULL check to the visplane in R_CheckPlane
and error out early, and this seems to catch it, but I don't think this is the most ideal way of solving the issue.
diff --git a/src/doom/r_plane.c b/src/doom/r_plane.c
index 16dde4c2..db882e57 100644
--- a/src/doom/r_plane.c
+++ b/src/doom/r_plane.c
@@ -266,7 +266,11 @@ R_CheckPlane
int unionl;
int unionh;
int x;
-
+ if (pl == NULL)
+ {
+ I_Error ("R_DrawPlanes: visplane overflow (%" PRIiPTR ")",
+ lastvisplane - visplanes);
+ }
if (start < pl->minx)
{
intrl = pl->minx;
from chocolate-doom.
A pointer pointing past the visplanes[]
array isn't necessarily a NULL
pointer.
--- a/src/doom/r_plane.c
+++ b/src/doom/r_plane.c
@@ -307,6 +307,9 @@ R_CheckPlane
lastvisplane->picnum = pl->picnum;
lastvisplane->lightlevel = pl->lightlevel;
+ if (lastvisplane - visplanes == MAXVISPLANES)
+ I_Error ("R_CheckPlane: no more visplanes");
+
pl = lastvisplane++;
pl->minx = start;
pl->maxx = stop;
from chocolate-doom.
So @fabiangreffrath could that be merged in? Is there anything else that would need to be done?
from chocolate-doom.
I expressed some objections against your approach, but have none against mine. 😉 Could you confirm that it works as expected?
from chocolate-doom.
Is something else than the VPO wrong with this map? It won't even run in Doom+. It locks up with the music playing, either there's a missing player 1 start position or there's more than 1024 visplanes. I don't have tools to check.
from chocolate-doom.
Related Issues (20)
- Commit 825f59b broke cross-compiling from mingw-w64 HOT 1
- [Question] Music Pack configs HOT 1
- Doom/Doom2: Donut line action differs from vanilla HOT 10
- Packaging on Windows doesn't work with latest MSYS2
- Please add CPack packaging for MSYS2
- No built-in config in i_musicpacks.c for Chex Quest HOT 4
- Music doesn't seem to loop properly when Fluidsynth is used HOT 5
- Chocolate Strife should support PC speaker sound effects HOT 1
- Chocolate Doom Linux Timidity .sf2 soundfonts not working HOT 1
- Linux, Native MIDI, Error loading midi: Couldn't open /tmp/timidity.cfg HOT 2
- Keyboard idiosyncrasies HOT 3
- Corners in MAP18 severe rendering bug HOT 1
- warnings and errors when running make HOT 4
- Odd, inconsistent dehacked behavior with -chex gameversion HOT 1
- No Image HOT 1
- www.chocolate-doom.org is down! HOT 2
- Have autobuilds on the release page. HOT 5
- Emulate "2s middle textures do not animate in v1.2" HOT 1
- should chocolate-strife include the original intro video ? HOT 2
- Technically incorrect comment HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chocolate-doom.