osgEarth crash on screenspace layouting. osgEarth master (050b17a6e51f49b13c8c9dcf029677877cd90cfd), osg 3.6.2 GLCore, VS 2017:
osg157-osgd.dll!osg::Shader::PerContextShader::compileShader(osg::State & state) Line 729 C++
osg157-osgd.dll!osg::Shader::compileShader(osg::State & state) Line 398 C++
osg157-osgd.dll!osg::Program::compileGLObjects(osg::State & state) Line 195 C++
osgEarthd.dll!osgEarth::VirtualProgram::apply(osg::State & state) Line 1488 C++
osg157-osgd.dll!osg::State::applyAttribute(const osg::StateAttribute * attribute, osg::State::AttributeStack & as) Line 1185 C++
> osg157-osgd.dll!osg::State::applyAttributeList(std::map<std::pair<enum osg::StateAttribute::Type,unsigned int>,osg::State::AttributeStack,std::less<std::pair<enum osg::StateAttribute::Type,unsigned int> >,std::allocator<std::pair<std::pair<enum osg::StateAttribute::Type,unsigned int> const ,osg::State::AttributeStack> > > & attributeMap, const std::map<std::pair<enum osg::StateAttribute::Type,unsigned int>,std::pair<osg::ref_ptr<osg::StateAttribute>,unsigned int>,std::less<std::pair<enum osg::StateAttribute::Type,unsigned int> >,std::allocator<std::pair<std::pair<enum osg::StateAttribute::Type,unsigned int> const ,std::pair<osg::ref_ptr<osg::StateAttribute>,unsigned int> > > > & attributeList) Line 1911 C++
osg157-osgd.dll!osg::State::apply(const osg::StateSet * dstate) Line 704 C++
osgEarthd.dll!`anonymous namespace'::DeclutterDraw::renderLeaf(osgUtil::RenderLeaf * leaf, osg::RenderInfo & renderInfo, osgUtil::RenderLeaf * & previous) Line 753 C++
osgEarthd.dll!`anonymous namespace'::DeclutterDraw::drawImplementation(osgUtil::RenderBin * bin, osg::RenderInfo & renderInfo, osgUtil::RenderLeaf * & previous) Line 713 C++
PerContextShader is corrupt:
| Name | Value | Type
-- | -- | -- | --
◢ | pcs | 0x000001a02261c1a0 {_shader=0xdddddddddddddddd {_type=??? _shaderFileName={...} _shaderSource={...} ...} ...} | osg::Shader::PerContextShader *
| ▶ osg::Referenced | {_observerSet={_ptr=0xdddddddddddddddd } _refCount={_value=-572662307 } } | osg::Referenced
| ▶ _shader | 0xdddddddddddddddd {_type=??? _shaderFileName={...} _shaderSource={...} ...} | const osg::Shader *
| ▶ _extensions | {_ptr=0xdddddddddddddddd {contextID=??? glVersion=??? glslLanguageVersion=??? ...} } | osg::ref_ptr<osg::GLExtensions>
| _glShaderHandle | 3722304989 | unsigned int
| ▶ _defineStr | <Error reading characters of string.> | std::basic_string<char,std::char_traits<char>,std::allocator<char> >
| _needsCompile | true (221) | bool
| _isCompiled | true (221) | bool
| _contextID | 3722304989 | const unsigned int
void Program::compileGLObjects( osg::State& state ) const
...
_shaderList[i]:
| Name | Value | Type
-- | -- | -- | --
▶ | [osg::Shader] | {_type=VERTEX (35633) _shaderFileName="" _shaderSource="#version 330\n#pragma vp_name ClipPlane.glsl\n#pragma vp_entryPoint oe_ClipPlane_VS\n#pragma vp_location vertex_view\n#pragma vp_order last\n#pragma import_defines(OE_CLIPPLANE_NUM)\nuniform ma... ...} | osgEarthd.dll!osg::Shader
▶ | osg::Object | {_name="oe_ClipPlane_VS" _dataVariance=UNSPECIFIED (2) _userDataContainer=0x0000000000000000 <NULL> } | osg::Object
| _type | VERTEX (35633) | osg::Shader::Type
▶ | _shaderFileName | "" | std::basic_string<char,std::char_traits<char>,std::allocator<char> >
▶ | _shaderSource | "#version 330\n#pragma vp_name ClipPlane.glsl\n#pragma vp_entryPoint oe_ClipPlane_VS\n#pragma vp_location vertex_view\n#pragma vp_order last\n#pragma import_defines(OE_CLIPPLANE_NUM)\nuniform ma... | std::basic_string<char,std::char_traits<char>,std::allocator<char> >
▶ | _shaderBinary | {_ptr=0x0000000000000000 <NULL> } | osg::ref_ptr<osg::ShaderBinary>
▶ | _codeInjectionMap | { size=0 } | std::multimap<float,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<float>,std::allocator<std::pair<float const ,std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > >
| _shaderDefinesMode | USE_SHADER_PRAGMA (0) | osg::Shader::ShaderDefinesMode
▶ | _shaderDefines | { size=1 } | std::set<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >
▶ | _shaderRequirements | { size=0 } | std::set<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >
▶ | _programSet | { size=12 } | std::set<osg::Program *,std::less<osg::Program *>,std::allocator<osg::Program *> >
◢ | _pcsList | {_array={ size=2 } } | osg::buffered_value<osg::ref_ptr<osg::Shader::ShaderObjects> >
| ◢ _array | { size=2 } | std::vector<osg::ref_ptr<osg::Shader::ShaderObjects>,std::allocator<osg::ref_ptr<osg::Shader::ShaderObjects> > >
| [capacity] | 2 | __int64
| ▶ [allocator] | allocator | std::_Compressed_pair<std::allocator<osg::ref_ptr<osg::Shader::ShaderObjects> >,std::_Vector_val<std::_Simple_types<osg::ref_ptr<osg::Shader::ShaderObjects> > >,1>
| ▶ [0] | {_ptr=0x0000000000000000 <NULL> } | osg::ref_ptr<osg::Shader::ShaderObjects>
| ▶ [1] | {_ptr=0x0000000000000000 <NULL> } | osg::ref_ptr<osg::Shader::ShaderObjects>
| ▶ [Raw View] | {...} | std::vector<osg::ref_ptr<osg::Shader::ShaderObjects>,std::allocator<osg::ref_ptr<osg::Shader::ShaderObjects> > >
_pcsList has entries with NULL!
I think it's the same issue on MacOSX, but different crash location: https://github.com/gwaldron/osgearth/issues/1160