x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

HLSL #include crashes in several listed scenarios

 #include "" crash no relevant log
 #include "C:/Test.ush" crash
 #include "C:\Test.ush" crash
 #include "/Engine/beyond/Test" crash 
 #include "/Engine/beyond/Test.ush" works!
 #include "/Engine/beyond/Test.usf" works
 #include "/Engine/beyond/NonExistent.ush" silently ignored
 #include "/Game/Public/Test.usf" crashes, see below
 #include (empty) the only relevant log error without a crash
 
 from inside Test.ush:
 #include "Test2.ush" works
 #include "Test2.usf" works
 #include "Test2" crash
 #include "NonExistent.ush" silently ignored

Creating an empty Shaders directory under the Project, immediately crashes the Editor upon launch. This also happens with a clean copy of PhotorealisticCharacter. It also happens even Shaders has basic Public content with a Test.ush. What is impressive however is, Generate Visual Studio files command, picks up the Shaders structure for Visual Studio, even though everything about Shaders crashes the editor upon launch.

Product Version: UE 4.17 Preview
Tags:
more ▼

asked Jul 13 '17 at 10:26 AM in Bug Reports

avatar image

Büke
72 1 6 7

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hey Buke,

Thanks for providing clear repro steps. I was able to confirm what you are reporting, and have gone ahead and entered a bug report for the issue. You can track the report following the link below on our public tracker.

UE-47193

Once the issue has been addressed by our engineers the ticket will be updated and reflected in the public tracker. Let me know if you have further questions or need additional assistance.

Cheers,

Andrew Hurley

more ▼

answered Jul 13 '17 at 04:20 PM

avatar image Büke Jul 13 '17 at 11:15 PM

Thank you Andrew!

It may be more helpful to note that the empty Shaders directory alone is a separate issue to #includes. Just creating an empty Shaders directory under a Project, will crash the editor upon launch.

Also in the above combinations of #includes, the developers may want to see them besides the first one, as they will reveal how the preprocessor path parser is failing differently in several places with the file extension, the file path root, the missing files, etc.

In 4.16,a full path (#include "C:/Test.ush") would work, and non existent files would give a compiler error as opposed to giving mysterious missing definitions. All these examples would point to several bugs in the code. I hope relaying these details are not too much trouble, but will make for a much more stable and flexible 4.17 for us shader developers.

Just copying the test lines above into the public tracker UE-47193 description would help me as a developer if I was fixing them. Also the only working examples may help other projects who may be stuck.

In the meanwhile, I am hopeful that moving our code to /Engine/beyond will allow us to migrate to 4.17.

Thank you again.

avatar image AndrewHurley Jul 14 '17 at 09:36 PM

The engineers are aware of the various other ways to make it crash, I just provided the most simple repro and they will use this post as a reference as needed for more information if necessary.

Thanks for the additional information!

avatar image Büke Jul 14 '17 at 10:10 PM

Good news Andrew,

Mr. Bunner just fixed 3 scenarios of properly emitting #include errors to avoid crashes in this commit: https://github.com/EpicGames/UnrealEngine/commit/e7d9ccd8f8b52ef4260591f6deee75c13a9f687a

Another good news is that I was able to migrate all our HLSL code to "/Engine/beyond/" virtual path and get them fully working. We are working on an ambitious realtime compositing system that is striving to match Hollywood quality.

There are a couple of remaining issues. I have not seen a commit addressing the empty Project/Shaders (next to Source directory) crashing the Editor at startup. Since now, full file paths to #includes are officially disallowed, the Shaders directory at Project and Plugin locations are the only proper methods to develop and distribute shader code. Also as another minor issue, the missing #include files are silently ignored.

Perhaps, I should wait and test Preview 2, before entering these issues on AnswerHub separately.

Thank you.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question