tgjones / HlslTools

A Visual Studio extension that provides enhanced support for editing High Level Shading Language (HLSL) files
http://timjones.io/blog/archive/2016/04/25/hlsl-tools-for-visual-studio-v1.0-released
Other
568 stars 98 forks source link

Visual Studio crashes when HLSL file is opened, v1.0.144 #52

Closed OndrejPetrzilka closed 7 years ago

OndrejPetrzilka commented 7 years ago

Visual Studio crashes when HLSL file is opened, v1.0.144

VS2015 Community, Update 3, Win7 x64 SP1.

Download and open project Open test.hlsl file in root Crash

Stack trace: https://paste2.org/VjeC5OGw

Project: https://1drv.ms/u/s!AiK6FU3sliYQeVuCfpzX5ixZbO8

EDIT: 1.0.133 does not crash

EDIT 2: Crash is here: https://github.com/tgjones/HlslTools/blob/28a40505106128d1ff6350daf4639372557b1aa9/src/ShaderTools/Core/Options/ConfigFileLoader.cs#L31 NullReferenceException, configFile.HlslPreprocessorDefinitions can be null

OndrejPetrzilka commented 7 years ago

Got some more information, stack trace: https://paste2.org/8JeCGYW3

Failed to create semantic model: System.NullReferenceException: Object reference not set to an instance of an object. at ShaderTools.Core.Options.ConfigFileLoader.LoadAndMergeConfigFile(String directory)

tgjones commented 7 years ago

Fixed, thanks for letting me know about this.