"UMAPINFO" discussion

Apologies for the double-post, but I managed to get a build of the current git repository made. See, for some reason my INI-format UMAPINFO lump stopped getting parsed by GLBoom+ (according to Task Manager it'd open, do nothing visible to the end user, and then silently close itself, but would stop doing that if I deleted the UMAPINFO lump - hell if I know) which gave me the impetus to get my compile of the curly-brace-format EXE working. Fortunately, I was able to figure out what was going on this time (two instances of "uint64_t" when VS2017 wanted "uint_64_t", and having to rename "pcre.lib" and "pcreposix.lib" to "pcre3.lib" and "pcreposix3.lib", respectively) and get a build compiled.

 

I guess that makes the first question moot for now, though answers for the other three questions in my previous post would still be appreciated.

 

But, while we're mostly hunky-dory there, there's still a problem - and since this is based on the current code, I figure @Graf Zahl might appreciate the bug report: for some reason, if a map entry's InterText gets too long, the program crashes on start-up with this error message:

 

Quote

 

Microsoft Visual C++ Runtime Library

 

Debug Error!

 

Program: D:\DOOM\prboom-plus-2.5.1.4um\prboom-plus (Curly Brace).exe

 

HEAP CORRUPTION DETECTED: after Normal block (#4301) at 0x00DC3C18.

CRT detected that the application wrote to memory after end of heap buffer.

 

(Press Retry to debug the application)

 

Abort/Retry/Ignore

 

Removing some lines from InterText lets it boot, but then the InterText obviously isn't as long as it needs to be. Seemingly, only line count matters, not line length; shortening the last line to an empty string still throws the error.

 

Example WAD here. Trimmed out all the other fluff from the mod I'm making to one UMAPINFO lump with a single map entry for MAP01; with my build, at least, it still consistently breaks in the above fashion, though the Normal block number and the pointer changes with each run (as you'd expect).

Edited by Shadow Hog

Posted (edited)

Share this post


Link to post

Slight bumpo, since this thread's more relevant than the other one.

 

Is there a reference example of a UMAPINFO lump in curly-brace format somewhere? Someone was asking about it earlier in Discord-land and I'm having trouble finding one.

 

[EDIT] I should clarify I'm seeking something comprehensive. The post above is a start, but it's just a small subset.

Edited by Xaser

Share this post


Link to post

I suppose I can try and port NERVE.WAD's entry in ZMAPINFO to UMAPINFO and see where that gets us? It'd be something immediately usable with PrBoom+2.5.1.4u, at least.

Share this post


Link to post

Double post for new content. While it turns out PrBoom+ already handles NERVE.WAD just fine and didn't need a UMAPINFO lump in the first place, I still went ahead and made one just to illustrate how it'd look:

 

Spoiler

// No Rest for the Living
MAP MAP01
{
	LevelName = "the earth base"
	LevelPic = "CWILV00"
	Next = "MAP02"
	NextSecret = "MAP09"
	SkyTexture = "SKY1"
	ParTime = 75
	Music = "D_MESSAG"
}

MAP MAP02
{
	LevelName = "the pain labs"
	LevelPic = "CWILV01"
	Next = "MAP03"
	NextSecret = "MAP09"
	SkyTexture = "SKY1"
	ParTime = 105
	Music = "D_DDTBLU"
}

MAP MAP03
{
	LevelName = "canyon of the dead"
	LevelPic = "CWILV02"
	Next = "MAP04"
	NextSecret = "MAP09"
	SkyTexture = "SKY1"
	ParTime = 120
	Music = "D_DOOM"
}

map MAP04
{
	LevelName = "hell mountain"
	LevelPic = "CWILV03"
	Next = "MAP05"
	NextSecret = "MAP09"
	SkyTexture = "SKY1"
	ParTime = 105
	Music = "D_SHAWN"
}

map MAP05
{
	LevelName = "vivisection"
	LevelPic = "CWILV04"
	Next = "MAP06"
	NextSecret = "MAP09"
	SkyTexture = "SKY1"
	ParTime = 210
	Music = "D_IN_CIT"
}

map MAP06
{
	LevelName = "inferno of blood"
	LevelPic = "CWILV05"
	Next = "MAP07"
	NextSecret = "MAP09"
	SkyTexture = "SKY1"
	ParTime = 105
	Music = "D_THE_DA"
	InterText = clear
}

map MAP07
{
	LevelName = "baron's banquet"
	LevelPic = "CWILV06"
	Next = "MAP08"
	NextSecret = "MAP09"
	SkyTexture = "SKY1"
	ParTime = 165
	Music = "D_IN_CIT"
	BossAction = Fatso, 23, 666
	BossAction = Arachnotron, 30, 667
}

map MAP08
{
	LevelName = "tomb of malevolence"
	LevelPic = "CWILV07"
	EndCast = true
	SkyTexture = "SKY1"
	ParTime = 105
	Music = "D_SHAWN"
	InterText = "TROUBLE WAS BREWING AGAIN IN YOUR FAVORITE",
				"VACATION SPOT... HELL. SOME CYBERDEMON",
				"PUNK THOUGHT HE COULD TURN HELL INTO A",
				"PERSONAL AMUSEMENT PARK, AND MAKE EARTH",
				"THE TICKET BOOTH.",
				"",
				"WELL THAT HALF-ROBOT FREAK SHOW DIDN'T",
				"KNOW WHO WAS COMING TO THE FAIR. THERE'S",
				"NOTHING LIKE A SHOOTING GALLERY FULL OF",
				"HELLSPAWN TO GET THE BLOOD PUMPING...",
				"",
				"NOW THE WALLS OF THE DEMON'S LABYRINTH",
				"ECHO WITH THE SOUND OF HIS METALLIC LIMBS",
				"HITTING THE FLOOR. HIS DEATH MOAN GURGLES",
				"OUT THROUGH THE MESS YOU LEFT OF HIS FACE.",
				"",
				"THIS RIDE IS CLOSED."
	InterBackdrop = "SLIME16"
	InterMusic = "D_READ_M"
}

map MAP09
{
	LevelName = "march of the demons"
	LevelPic = "CWILV08"
	Next = "MAP05"
	NextSecret = "MAP05"
	SkyTexture = "SKY1"
	ParTime = 135
	Music = "D_DDTBLU"
}

 

A few notes:

  • I'm pretty sure that commented-out line works.
  • MAP07 has Map07Special defined in gzdoom.pk3's internal MAPINFO lump, even though, as far as I can tell, no tags 666 or 667 are present in the map. Nevertheless, I tried to replicate the general effect, just to show off how that works. (I've used this feature in a few maps now, and yeah, that's what it looks like. ZDoom monster name, Boom line special number, and sector tag number, in that order.)
  • This actually doesn't appear to run on my compiled build of Graf's repo, for much the same reason that my own UMAPINFO adventures don't - InterText seems to be kind of broken for some reason. I have a stack trace, though! I'll toss it in a spoiler tag.

Was there anything else you wanted to know?

 

(That stack trace:)

Spoiler

 	Doom.exe!free_dbg_nolock(void * const block, const int block_use) Line 940
 	Doom.exe!_free_dbg(void * block, int block_use) Line 1011
>	Doom.exe!free(void * block) Line 16
 	Doom.exe!Z_Free(void * p, const char * file, int line) Line 516	C
 	Doom.exe!Z_Realloc(void * ptr, unsigned int n, int tag, void * * user, const char * file, int line) Line 653
 	Doom.exe!ParseMultiString(Scanner & scanner, int error) Line 112
 	Doom.exe!ParseStandardProperty(Scanner & scanner, MapEntry * mape) Line 235
 	Doom.exe!ParseMapEntry(Scanner & scanner, MapEntry * val) Line 345
 	Doom.exe!ParseUMapInfo(const unsigned char * buffer, unsigned int length, void(*)(const char *) err) Line 367
 	Doom.exe!D_DoomMainSetup() Line 1844
 	Doom.exe!D_DoomMain() Line 1995
 	Doom.exe!SDL_main(int argc, char * * argv) Line 577
 	Doom.exe!main_utf8(int argc, char * * argv) Line 127
 	Doom.exe!WinMain(HINSTANCE__ * hInst, HINSTANCE__ * hPrev, char * szCmdLine, int sw) Line 190
 	[External Code]
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
Edited by Shadow Hog
NWILV## -> CWILV##; forgot that was another ZDoom-specific internal rename
1 person likes this

Share this post


Link to post

I will have to check InterText. It never crashed with my test UMAPINFO.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now