Author Topic: [SOLVED] sbscooker occasionally runs multiple threads using 8+ GB of RAM each  (Read 780 times)

I've been noticing this for a month or two now. While working in Substance Designer, suddenly my system will seem to start locking up. Sometimes I'm able to open Task Manager and see what's going on, and it will show me that multiple sbscooker processes are running, each using somewhere around 8 GB of RAM. This cripples the system, since it starts swapping to disk.

This has occurred sometimes within 30 seconds of just starting a new, empty substance, and it doesn't seem correlated to any particular SBS I'm working on. It just seems to happen at random while I'm using Substance Designer.

I'm on 2020.1.3, and I don't see anyone else complaining about this on the forums. How can I provide some useful information so you can figure out what's happening here? Again, this can happen on a brand new file, which I haven't even saved yet, but it's not something I can reliably reproduce. Is there a log file I can look at the next time this happens, which I could provide? Or is this perhaps already a known issue?
Last Edit: September 11, 2020, 09:19:38 am

Hello,

Thank you for bringing this issue to our attention.

The high SBSCooker activity may be caused by the rendering of the Library thumbnails, which require rendering the source content they represent. The rendering is also triggered if this content is displayed in the Node menu – the one opened with the Spacebar key – while searching for a node or resource.

Do you have custom content in your Library which includes complex graphs which are intensive to render, and/or high resolution bitmaps?

Best regards,
Luca
QA Analyst
Substance Designer Team

Thanks for the reply. I wasn't aware that I had any particular complex content in my Library. It's basically just full of SBS and SBSARs that I've downloaded from Substance Source. However, it seems I can reproduce this issue easily by filtering the library on some very inclusive filter (such as the letter "e") and scrolling down through the results.

I then noticed the log file was complaining about a couple of SBS:

Code: [Select]
[ERROR][Thumbnails Generator ] launch application:
   D:/Programs/Substance Designer/sbscooker.exe --inputs C:/Users/Dan/Documents/GitHub/Gravia/Assets/Materials/Substance/Gravia/Detail/SBS/DirtDetails.sbs --alias sbs://D:\Programs\Substance Designer\resources\packages --alias sd-3dview-maps://D:/Programs/Substance Designer/resources/view3d/maps --alias sd-3dview-shapes://D:/Programs/Substance Designer/resources/view3d/shapes --alias sd-3dview-shaders://D:/Programs/Substance Designer/resources/view3d/shaders --output-path C:/Users/Dan/AppData/Local/Temp/Allegorithmic/Substance Designer/thumbs --output-name ZpaAFY_tmp --expose-output-size 1 --expose-random-seed 1 --expose-pixel-size 1 --size-limit 7 --compression-mode 2 --no-optimization
Execution failed ! (Exit Code: 1)
[ERROR][Thumbnails Generator ] launch application:
   D:/Programs/Substance Designer/sbscooker.exe --inputs C:/Users/Dan/Documents/GitHub/Gravia/Assets/Materials/Substance/Gravia/Detail/SBS/DirtDetails.sbs --alias sbs://D:\Programs\Substance Designer\resources\packages --alias sd-3dview-maps://D:/Programs/Substance Designer/resources/view3d/maps --alias sd-3dview-shapes://D:/Programs/Substance Designer/resources/view3d/shapes --alias sd-3dview-shaders://D:/Programs/Substance Designer/resources/view3d/shaders --output-path C:/Users/Dan/AppData/Local/Temp/Allegorithmic/Substance Designer/thumbs --output-name ApPODt_tmp --expose-output-size 1 --expose-random-seed 1 --expose-pixel-size 1 --size-limit 7 --compression-mode 2 --no-optimization
Execution failed ! (Exit Code: 1)
[ERROR][Thumbnails Generator ] launch application:
   D:/Programs/Substance Designer/sbscooker.exe --inputs C:/Users/Dan/Documents/GitHub/Gravia/Assets/Materials/Substance/Gravia/Decals/DecalPaint/DecalPaint.sbs --alias sbs://D:\Programs\Substance Designer\resources\packages --alias sd-3dview-maps://D:/Programs/Substance Designer/resources/view3d/maps --alias sd-3dview-shapes://D:/Programs/Substance Designer/resources/view3d/shapes --alias sd-3dview-shaders://D:/Programs/Substance Designer/resources/view3d/shaders --output-path C:/Users/Dan/AppData/Local/Temp/Allegorithmic/Substance Designer/thumbs --output-name wFjxHa_tmp --expose-output-size 1 --expose-random-seed 1 --expose-pixel-size 1 --size-limit 7 --compression-mode 2 --no-optimization
Execution failed ! (Exit Code: 1)
[ERROR][Thumbnails Generator ] launch application:
   D:/Programs/Substance Designer/sbscooker.exe --inputs C:/Users/Dan/Documents/GitHub/Gravia/Assets/Materials/Substance/Gravia/Decals/Dirt/DirtDecals.sbs --alias sbs://D:\Programs\Substance Designer\resources\packages --alias sd-3dview-maps://D:/Programs/Substance Designer/resources/view3d/maps --alias sd-3dview-shapes://D:/Programs/Substance Designer/resources/view3d/shapes --alias sd-3dview-shaders://D:/Programs/Substance Designer/resources/view3d/shaders --output-path C:/Users/Dan/AppData/Local/Temp/Allegorithmic/Substance Designer/thumbs --output-name jreNAH_tmp --expose-output-size 1 --expose-random-seed 1 --expose-pixel-size 1 --size-limit 7 --compression-mode 2 --no-optimization
Execution failed ! (Exit Code: 1)
[ERROR][Thumbnails Generator ] launch application:
   D:/Programs/Substance Designer/sbscooker.exe --inputs C:/Users/Dan/Documents/GitHub/Gravia/Assets/Materials/Substance/Gravia/Detail/SBS/DirtDetails.sbs --alias sbs://D:\Programs\Substance Designer\resources\packages --alias sd-3dview-maps://D:/Programs/Substance Designer/resources/view3d/maps --alias sd-3dview-shapes://D:/Programs/Substance Designer/resources/view3d/shapes --alias sd-3dview-shaders://D:/Programs/Substance Designer/resources/view3d/shaders --output-path C:/Users/Dan/AppData/Local/Temp/Allegorithmic/Substance Designer/thumbs --output-name nTgDMp_tmp --expose-output-size 1 --expose-random-seed 1 --expose-pixel-size 1 --size-limit 7 --compression-mode 2 --no-optimization
Execution failed ! (Exit Code: 1)


Error:
[WARNING][SBSCooker]Size out of bounds:

   Size: 256x256

   From Graph: pkg:///GrungeGenerator?dependency=1319742106

   ... (repeated 54 more times)

So I guess that's something to go on. I'll have to figure out why those are causing memory issues when generating thumbnails. Maybe there's some way to disable thumbnail generation for specific items known to have issues? Or is there some other way to avoid this kind of thing happening in general?

Just to close things up here, I've tracked it down to a single SBS that was being used by a large number of other SBSs: A "grunge" picker SBS, which I've attached. It included 23 "Grunge Map" bitmaps, along with a selector to choose one based on a parameter. It seems that in generating thumbnails, each SBS Cooker process probably has to load all of those images into memory. This SBS is design to allow easy selection of different Grunge maps via a slider, but I'll look at changing my approach there.

Hello,

Thank you for following up on this issue, with very helpful details!

When the thumbnails has been generated the first time, they are reused for all future sessions if their source content has not changed since.

You can create a Library Filter which will include all items – i.e. a filter with empty filtering criteria. At this point, you can take some time and let all thumbnails render. When this is done, the filter can be deleted as it has served its purpose.
Barring any changes to the content down the line, you should not experience slowdowns anymore when displaying the Node menu or browsing the Library.

I am glad this exchange was helpful! Feel free to get back to us if you need further assistance.

Best regards,
Luca
QA Analyst
Substance Designer Team