Recompiled Streamline SDK/Sample runtime exception

Hi,

I’ve attempted to recompile the Streamline SDK and then use it in Streamline Sample but seem to be running in some problems when running the sample built with my own built SDK.

The application does not seem to be able to load the sl.dlss_g.dll .json data successfully as I get a exception on the following line.

Exception:

_Scary->**_Myhead** was 0xB.

Callstack

sl.common.dll!std::_Tree<std::_Tmap_traits<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,__int64,unsigned __int64,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char,std::allocator<unsigned char>>>,std::less<void>,std::allocator<std::pair<std::string const ,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,__int64,unsigned __int64,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char,std::allocator<unsigned char>>>>>,0>>::_Find_lower_bound<std::string>(const std::string & _Keyval) Line 1606
	at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\include\xtree(1606)
sl.common.dll!std::_Tree<std::_Tmap_traits<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,__int64,unsigned __int64,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char,std::allocator<unsigned char>>>,std::less<void>,std::allocator<std::pair<std::string const ,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,__int64,unsigned __int64,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char,std::allocator<unsigned char>>>>>,0>>::_Emplace<std::string,std::nullptr_t>(std::string && <_Vals_0>, void * && <_Vals_1>) Line 993
	at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\include\xtree(993)
sl.common.dll!std::_Tree<std::_Tmap_traits<std::string,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,__int64,unsigned __int64,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char,std::allocator<unsigned char>>>,std::less<void>,std::allocator<std::pair<std::string const ,nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,__int64,unsigned __int64,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char,std::allocator<unsigned char>>>>>,0>>::emplace<std::string,std::nullptr_t>(std::string && <_Vals_0>, void * && <_Vals_1>) Line 1024
	at C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.41.34120\include\xtree(1024)
sl.common.dll!nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,__int64,unsigned __int64,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char,std::allocator<unsigned char>>>::operator[](std::string key) Line 2120
	at E:\pro\Projects\dlss\Streamline\external\json\include\nlohmann\json.hpp(2120)
sl.common.dll!nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,__int64,unsigned __int64,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char,std::allocator<unsigned char>>>::operator[]<char const>(const char * key) Line 2148
	at E:\pro\Projects\dlss\Streamline\external\json\include\nlohmann\json.hpp(2148)
sl.common.dll!sl::updateCommonEmbeddedJSONConfig(void * jsonConfig, const sl::common::PluginInfo & info) Line 988
	at E:\pro\Projects\dlss\Streamline\source\plugins\sl.common\commonEntry.cpp(988)
[External Code]
sl.interposer.dll!sl::plugin_manager::PluginManager::loadPlugin(const std::filesystem::path pluginFullPath, sl::plugin_manager::PluginManager::Plugin * * ppPlugin) Line 554
	at E:\pro\Projects\dlss\Streamline\source\core\sl.plugin-manager\pluginManager.cpp(554)
sl.interposer.dll!sl::plugin_manager::PluginManager::mapPlugins(std::vector<std::wstring,std::allocator<std::wstring>> & files) Line 625
	at E:\pro\Projects\dlss\Streamline\source\core\sl.plugin-manager\pluginManager.cpp(625)
sl.interposer.dll!sl::plugin_manager::PluginManager::loadPlugins() Line 897
	at E:\pro\Projects\dlss\Streamline\source\core\sl.plugin-manager\pluginManager.cpp(897)
sl.interposer.dll!slInit::__l2::<lambda_1>::operator()() Line 206
	at E:\pro\Projects\dlss\Streamline\source\core\sl.api\sl.cpp(206)
sl.interposer.dll!slInit(const sl::Preferences & pref, unsigned __int64 sdkVersion) Line 213
	at E:\pro\Projects\dlss\Streamline\source\core\sl.api\sl.cpp(213)
StreamlineSample.exe!SLWrapper::Initialize_preDevice(nvrhi::GraphicsAPI api, const bool & checkSig, const bool & SLlog) Line 244
	at E:\pro\Projects\dlss\Streamline_Sample\src\SLWrapper.cpp(244)
StreamlineSample.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 207
	at E:\pro\Projects\dlss\Streamline_Sample\src\main.cpp(207)

The sample works fine when I use the provided binaries checked into the streamline repo.

As the failure seem to happen on sl.dlss_g.dll, which is not built by the SDK but just included, and other plugins/dlls do not throw errors when being loaded before this plugin, I suspected this is something to do with a compiler/SDK mismatch.

I’ve followed all the build instruction, tried different Windows SDK versions (the one mentioned in the readme and higher), Visual studio 2017, 2019 and 2022 but none of them seem to resolve the issue. Another developer tried to follow the steps as well and ran into the same issue.

Has anyone encountered this issue and found a solution? I believe I’ve followed everything correctly and don’t have anything setup incorrectly.

Hope someone can help solve this issue.