Skip to content

w3dview texture crash #1131

@xezon

Description

@xezon

Easiest Repro:

  • happens very often when loading and viewing cbngovbuil models.

When selecting loaded model:

 	vcruntime140.dll!memcpy(unsigned char * dst, unsigned char * src, unsigned long count) Line 319	Unknown
 	w3dview.exe!DDSFileClass::Copy_Level_To_Surface(unsigned int level, WW3DFormat dst_format, unsigned int dst_width, unsigned int dst_height, unsigned char * dst_surface, unsigned int dst_pitch, const Vector3 & color_shift) Line 228	C++
>	w3dview.exe!TextureLoadTaskClass::Load_Compressed_Mipmap() Line 351	C++
 	w3dview.exe!TextureLoadTaskClass::Load() Line 600	C++
 	w3dview.exe!LoaderThreadClass::Thread_Function() Line 89	C++
 	w3dview.exe!ThreadClass::Internal_Thread_Function(void * params) Line 99	C++
 	[External Code]	
 	[Frames below may be incorrect and/or missing, no symbols loaded for ucrtbase.dll]	

DDSFileClass

  Name Value Type
this 0x0e00fd18 {m_width=256 m_height=256 m_depth=0 ...} DDSFileClass *
  m_width 256 unsigned int
  m_height 256 unsigned int
  m_depth 0 unsigned int
  m_maxWidth 256 unsigned int
  m_maxHeight 256 unsigned int
  m_maxDepth 0 unsigned int
  m_mipLevels 7 unsigned int
  m_time 1660749779 __int64
  m_reductionFactor 0 unsigned int
  ▶ m_DDSMemory 0x11cbc9d4 "\x1" unsigned char *
  m_format WW3D_FORMAT_DXT1 (20) WW3DFormat
  m_textureType 0 unsigned int
  ▶ m_levelSizes 0x030378cc {32768} unsigned int *
  ▶ m_levelOffsets 0x030378f8 {16} unsigned int *
  m_totalSizeMaybe 0 unsigned int
  ▶ m_fileHeader {dwSize=124 dwFlags=659463 dwHeight=256 ...} DDSHeader
  ▶ m_name 0x0e00fdd8 "cbh2oplnt_ng.dds" char[256]

Watch

Name Value Type
m_mipLevelCount 7 unsigned int
level 2 unsigned int
m_levelOffsets[2] 1937076072 unsigned int
m_DDSMemory[m_levelOffsets[2]] Unable to read memory -
m_levelSizes[2] 2048 unsigned int
dst_surface 0x11f0e320 "" unsigned char *
m_DDSMemory 0x11cbc9d4 "\x1" unsigned char *
m_levelOffsets,7 0x030378f8 {16, 15, 1937076072, 1819239269, 775058031, 7562340, 43680} unsigned int[7]
[0] 16 unsigned int
[1] 15 unsigned int
[2] 1937076072 unsigned int
[3] 1819239269 unsigned int
[4] 775058031 unsigned int
[5] 7562340 unsigned int
[6] 43680 unsigned int
m_levelSizes,7 0x030378cc {32768, 8192, 2048, 512, 128, 32, 8} unsigned int[7]
[0] 32768 unsigned int
[1] 8192 unsigned int
[2] 2048 unsigned int
[3] 512 unsigned int
[4] 128 unsigned int
[5] 32 unsigned int
[6] 8 unsigned int
m_mipLevels 7 unsigned int

m_levelOffsets at index 2 has garbage value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions