Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault in vanilla compatible wad #1305

Open
kitchen-ace opened this issue Jul 8, 2020 · 4 comments · May be fixed by #1354
Open

Segfault in vanilla compatible wad #1305

kitchen-ace opened this issue Jul 8, 2020 · 4 comments · May be fixed by #1354

Comments

@kitchen-ace
Copy link
Contributor

kitchen-ace commented Jul 8, 2020

Background

Version of Chocolate Doom: 3.0.1 / git, latest commit 293b225

Operating System and version: Arch Linux 64-bit

Game: Doom 2

Any loaded WADs and mods (please include full command line): chocolate-doom -file wc_v2.wad

Bug description

Chocolate Doom segfaults when trying to play wc_v2.wad, available at https://www.doomworld.com/idgames/levels/doom2/v-z/wc_v2 . This map plays in vanilla Doom (crashes on save, but loads fine at least) and Crispy Doom. The only message given is Segmentation fault (core dumped).

It also crashes when trying to run the Windows version of Chocolate under wine with that wad.

Unsure if this is related to #1287 or not, but I thought I might as well report it.

@mfrancis95
Copy link
Contributor

mfrancis95 commented Jul 8, 2020

gdb output:

Thread 1 "chocolate-doom" received signal SIGSEGV, Segmentation fault.
0x000055555559ee2d in P_GroupLines () at p_setup.c:593
593		li->frontsector->linecount++;

li->frontsector and li->backsector are null.

@tpoppins
Copy link
Contributor

tpoppins commented Jul 9, 2020

Crispy's output:

P_SetupLevel: MAP01 (wc_v2.wad) Hard 0:00:00/0:00:00 Doom (BSP)
P_LoadLineDefs: linedef 1391 without first sidedef!
P_SpawnMapThing: Mapthing type 32000 without any skill tag at (-788, -4917)

@fabiangreffrath
Copy link
Member

That's a pretty broken map, actually. We should probably point the missing linedef front side to a dummy NULL sector.

@fabiangreffrath
Copy link
Member

fabiangreffrath commented Jul 10, 2020

Wait a minute, it's not the frontsector that's missing. it's the actual sidedef. The corresponding code in Crispy that fixes this is:

	// [crispy] substitute dummy sidedef for missing right side
	if (ld->sidenum[0] == NO_INDEX)
	{
	    ld->sidenum[0] = 0;
	    fprintf(stderr, "P_LoadLineDefs: linedef %d without first sidedef!\n", i);
	}

with NO_INDEX being -1 here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants