TTimo / GtkRadiant

The open source, cross platform level editor for idtech games
http://icculus.org/gtkradiant/
Other
590 stars 156 forks source link

CRASH+workaround when editing/moving certain edges #679

Open wdoekes opened 2 years ago

wdoekes commented 2 years ago

Hi @TTimo,

today radiant.bin crashed from under me. I pinpointed the problem to an issue with f2 being NULL in SelectFaceEdge.

I added the following patch to my debian build: https://github.com/wdoekes/gtkradiant-deb/blob/61c8ae9571fe2c09cb352302d77a93cd7c66a8b6/patches/radiant-vertexcrash.patch

This ensures that GtkRadiant doesn't crash for this reason. But I don't know what the real cause is. In museum.map there are two (rain) brushes that trigger the WARNING: badly shaped brush warning I added, but when trying to edge-move I did not get any crashes.

Sample minimal testcase that crashes:

// entity 0
{
"classname" "worldspawn"
// brush 0
{
( -176 -8 0 ) ( -184 488 152 ) ( 184 480 152 ) common/caulk 16 16 0 0.500000 0.500000 0 0 0
( -176 -8 0 ) ( 184 -8 0 ) ( 184 504 152 ) common/caulk 16 16 0 0.500000 0.500000 0 0 0
( 184 504 152 ) ( 184 480 152 ) ( -184 488 152 ) common/caulk 16 16 0 0.500000 0.500000 0 0 0
( -184 504 152 ) ( -184 504 151 ) ( 184 504 151 ) common/caulk 16 0 0 0.500000 0.500000 0 0 0
( -184 488 152 ) ( -176 -8 0 ) ( -184 504 152 ) common/caulk -16 0 0 0.500000 0.500000 0 0 0
( -184 488 152 ) ( -184 504 151 ) ( -184 504 152 ) common/caulk -16 0 0 0.500000 0.500000 0 0 0
( 184 -8 0 ) ( -176 -8 0 ) ( 184 480 152 ) common/caulk 16 16 0 0.500000 0.500000 0 0 0
( 184 504 152 ) ( 184 -8 0 ) ( 184 480 152 ) common/caulk -16 0 0 0.500000 0.500000 0 0 0
}
}

Select item, press E, and try to move the blue dot around (0,0,0).

Do you have some insight into the deeper cause?

Cheers, Walter