Spoiler:And this is what gdb reports:Code: Select all
==28064== Conditional jump or move depends on uninitialised value(s) ==28064== at 0xA3D208: FPNGTexture::MakeTexture() (pngtexture.cpp:605) ==28064== by 0xA3C9A0: FPNGTexture::GetPixels() (pngtexture.cpp:447) ==28064== by 0x8F59A2: FFontChar1::MakeTexture() (v_font.cpp:1580) ==28064== by 0x8F5A75: FFontChar1::GetColumn(unsigned int, FTexture::Span const**) (v_font.cpp:1605) ==28064== by 0x8F2A9E: RecordTextureColors(FTexture*, unsigned char*) (v_font.cpp:544) ==28064== by 0x8F682A: FSpecialFont::LoadTranslations() (v_font.cpp:1981) ==28064== by 0x8F670C: FSpecialFont::FSpecialFont(char const*, int, int, FTexture**, bool const*, int) (v_font.cpp:1955) ==28064== by 0x8F72FE: V_InitCustomFonts() (v_font.cpp:2207) ==28064== by 0x8F835F: V_InitFonts() (v_font.cpp:2573) ==28064== by 0x8C3ED9: R_Init() (r_utility.cpp:339) ==28064== by 0x6EB93F: D_DoomMain() (d_main.cpp:2461) ==28064== by 0x5B718A: main (i_main.cpp:306) ==28064== Uninitialised value was created by a heap allocation ==28064== at 0x4C2E0EF: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==28064== by 0xA3BAC5: PNGTexture_TryCreate(FileReader&, int) (pngtexture.cpp:151) ==28064== by 0xA3E4A2: FTexture::CreateTexture(int, int) (texture.cpp:108) ==28064== by 0xA4278B: FTextureManager::AddTexturesForWad(int) (texturemanager.cpp:891) ==28064== by 0xA42BF4: FTextureManager::Init() (texturemanager.cpp:985) ==28064== by 0x6EB86A: D_DoomMain() (d_main.cpp:2435) ==28064== by 0x5B718A: main (i_main.cpp:306) ==28064==
Spoiler:The uninitialized value is 'FPNGTexture::fr'.Code: Select all
#0 0x0000000000a3d208 in FPNGTexture::MakeTexture (this=0xdbb0b00) at /home/edward-san/zdoom/trunk/src/textures/pngtexture.cpp:605 lump = 0xddff260 #1 0x0000000000a3c9a1 in FPNGTexture::GetPixels (this=0xdbb0b00) at /home/edward-san/zdoom/trunk/src/textures/pngtexture.cpp:447 No locals. #2 0x00000000008f59a3 in FFontChar1::MakeTexture (this=0xfc39bf0) at /home/edward-san/zdoom/trunk/src/v_font.cpp:1580 pix = 0xffeffdf40 "" #3 0x00000000008f5a76 in FFontChar1::GetColumn (this=0xfc39bf0, column=3, spans_out=0xffeffddd0) at /home/edward-san/zdoom/trunk/src/v_font.cpp:1605 No locals. #4 0x00000000008f2a9f in RecordTextureColors (pic=0xfc39bf0, usedcolors=0xffeffde40 "") at /home/edward-san/zdoom/trunk/src/v_font.cpp:544 spans = 0xffeffddf0 column = 0x0 x = 3 #5 0x00000000008f682b in FSpecialFont::LoadTranslations (this=0xfc34880) at /home/edward-san/zdoom/trunk/src/v_font.cpp:1981 pic = 0xfc39bf0 count = 10 usedcolors = '\000' <repeats 255 times> identity = "\000\367-\275,\274\273\272\271\270\267\266\265\264\263\262\261fedb`_^\\ZYXVSRP\004m\377\376\017\000\000\000\377H\255\000\000\000\000\000(\000\000\000\000\000\000\000\000\312\374\f\000\000\000\000\240\337\377\376\017\000\000\000\200\025\355\000\000\000\000\000\260\337\377\376\017\000\000\000\233\026\255\000\000\000\000\000\020\340\377\376\017\000\000\000(\364\214\016\000\000\000\000\340\337\377\376\017\000\000\000\200\025\355\000\000\000\000\000\340\337\377\376\017\000\000\000\364\032\255", '\000' <repeats 11 times>, "\360?\020\340\377\376\017\000\000\000\060\340\377\376\017\000\000\000\071\350\243\000\000\000\000\000\002\021\000\000\000\000\000\000\300\020\005\070\377\377\377\377\300\330\335\r\000\000\000\000"... luminosity = 0xe7f8a30 TotalColors = 1 i = 0 j = 34 #6 0x00000000008f670d in FSpecialFont::FSpecialFont (this=0xfc34880, name=0xfbd7e4c "INDEXFONT_DOOM", first=48, count=10, lumplist=0xffeffe4d0, notranslate=0xffeffe250, lump=205) at /home/edward-san/zdoom/trunk/src/v_font.cpp:1955 i = 10 charlumps = 0xdb21690 maxyoffs = 0 pic = 0xdddd8b0 #7 0x00000000008f72ff in V_InitCustomFonts () at /home/edward-san/zdoom/trunk/src/v_font.cpp:2207 fnt = 0xfc327b0 sc = {String = 0xffeffe1a8 "}", StringLen = 1, TokenType = 15, Number = 0, Float = 109, Name = {Index = 0, static NameData = {Blocks = 0x10af0e60, NameArray = 0x10844da0, NumNames = 5431, MaxNames = 5473, Buckets = {5111, 4726, 5326, 5005, 2504, 4740, 3610, 5019, 5098, 5185, 4575, 4221, 4892, 5263, 4598, -1, 3562, 5035, 4997, 5133, 5207, 5280, 4247, 3034, 3664, 4311, 4626, 4093, 5225, 5012, 4589, 3546, 5093, 5351, 4554, 2860, 5194, 5387, 4914, 4812, 3966, 5320, 5226, 3771, 4946, 4117, -1, 3642, 5307, 4515, 5400, 3245, 4982, 4239, 2795, 5403, 3607, 4588, 4980, 4820, 4033, 5007, 5073, 4865, 4077, 5148, 2090, 4725, 4144, 3153, 5139, 4984, 4141, 5106, 3519, 2223, 4692, 4130, 5090, 3682, 3347, 4690, 4234, 3353, 496, 5088, 5382, 5018, 4724, 5052, 4502, 4818, 5319, 4478, 2239, 2390, 5406, 4955, 5311, 3025, 5294, 4364, 4586, 5346, 4283, 3698, 4204, 5301, 3159, 4122, 4872, 5192, 4719, 4497, 3410, 4403, 5199, 5070, 3855, 5091, 5417, 2164, 4619, 4233, 4978, 4906, 3161, 5300, 4031, 4703, 5340, 4893, 4412, 4581, 4661, 4890, 4433, 5365, 2949, 4346, 3235, 5064, 5114, 3484, 5285, 2835, 4495, 4952, 5056, 4167, 4455, 5210, 1070, 5010, 3222, 5150, 4416, 2642, 3322, 3905, 5418, 4477, 5274, 5336, 3536, 3319, 3313, 4020, 4912, 4257, 4754, 5279, 5370, 4928, 4612, 3804, 4307, 4995, 4353, 5212, 4351, 5177, 5173, 5266, 2728, 3371, 3612, 5372, 3611, 5002, 855, 5140, 4682, 4034, 2554, 3915, 4457, 4811, 5353, 3854...}, static Inited = true}}, Line = 62, End = false, Crossed = true, LumpNum = 205, ScriptName = {Chars = 0xcfc9ffc "zdoom.pk3:fontdefs.txt", static NullString = {Len = 0, AllocLen = 2, RefCount = 16788, Nothing = "\000"}}, static MAX_STRING_SIZE = 128, ScriptOpen = true, ScriptBuffer = {Chars = 0xdb0d7ec "\n// Fonts used by the alternative HUD\n\nHUDFONT_DOOM\n{\n\t- STTMINUS\n\t% STTPRCNT\n\t0 STTNUM0\n\t1 STTNUM1\n\t2 STTNUM2\n\t3 STTNUM3\n\t4 STTNUM4\n\t5 STTNUM5\n\t6 STTNUM6\n\t7 STTNUM7\n\t8 STTNUM8\n\t9 STTNUM9\n\tNOTRANSLATI"..., static NullString = {Len = 0, AllocLen = 2, RefCount = 16788, Nothing = "\000"}}, ScriptPtr = 0xdb0da81 "\n\n\n// Doom and Chex intermissions use special text glyphs. The Raven and Strife\n// games just use the standard big font.\n\nIntermissionFont_Doom\n{\n\t% WIPCNT\n\t: WICOLON\n\t0 WINUM0\n\t1 WINUM1\n\t2 WINUM2\n\t3 "..., ScriptEndPtr = 0xdb0dba5 "܇g\372\026\346\003}\306\347\317\001", StringBuffer = "}\000YSNUM9\000_DOOM\000\000\243\342p\000\000\000\000\000@\342\377\376\017\000\000\000\060\342\377\376\017\000\000\000\000\342\377\376\017\000\000\000\065\250_\000\000\000\000\000\340\000\000\000\017\000\000\000@\342\377\376\017\000\000\000\020\342\377\376\017\000\000\000d\266_\000\000\000\000\000@\342\377\376\017\000\000\000?\342\377\376\017\000\000\000`\342\377\376\017\000\000\000\243\342p\000\000\000\000\000\240\342\377\376\017\000\000", BigStringBuffer = {Chars = 0xed158c <FString::NullString+12> "", static NullString = {Len = 0, AllocLen = 2, RefCount = 16788, Nothing = "\000"}}, AlreadyGot = false, AlreadyGotLine = 60, LastGotToken = false, LastGotPtr = 0xdb0da7f "\n}\n\n\n// Doom and Chex intermissions use special text glyphs. The Raven and Strife\n// games just use the standard big font.\n\nIntermissionFont_Doom\n{\n\t% WIPCNT\n\t: WICOLON\n\t0 WINUM0\n\t1 WINUM1\n\t2 WINUM2\n\t"..., LastGotLine = 61, CMode = false, StateMode = 0 '\000', StateOptions = false, Escape = true} lumplist = {0x0 <repeats 48 times>, 0xdbb0b00, 0xdbb0cc0, 0xe53a1b0, 0xe53a370, 0xdcaa4f0, 0xdcaa6b0, 0xdcaa870, 0xdddd520, 0xdddd6e0, 0xdddd8b0, 0x0 <repeats 198 times>} notranslate = {false <repeats 256 times>} namebuffer = {Chars = 0xfbd7e4c "INDEXFONT_DOOM", static NullString = {Len = 0, AllocLen = 2, RefCount = 16788, Nothing = "\000"}} templatebuf = {Chars = 0xed158c <FString::NullString+12> "", static NullString = {Len = 0, AllocLen = 2, RefCount = 16788, Nothing = "\000"}} i = 57 llump = 205 lastlump = 206 format = 2 start = 33 first = 48 count = 10 spacewidth = -1 cursor = 95 '_' #8 0x00000000008f8360 in V_InitFonts () at /home/edward-san/zdoom/trunk/src/v_font.cpp:2573 No locals. #9 0x00000000008c3eda in R_Init () at /home/edward-san/zdoom/trunk/src/r_utility.cpp:339 No locals.
It happens in both master and zscript.
