Freestyle rendering, Rendering time infinite and total drain PC resources. #51048

Closed
opened 2017-03-24 13:40:16 +01:00 by Paolo Furani · 17 comments

System Information
Lubuntu 16.04 Intel HD 5500
Ram 4GB

Blender Version
Broken: ( 2.78c e92f235283, 2.78.4 253281f9d6)
Worked: (none)

Short description of error

Exact steps for others to reproduce the error
When I try to render the file attached to the message, Blender renders, but hangs when calculating the second part made by Freestyle. Drains every resource of the PC becomes impossible to manage, I waited some time the term but never got to see the rendering completed.
freestyle_bug_infinte_time.blend

**System Information** Lubuntu 16.04 Intel HD 5500 Ram 4GB **Blender Version** Broken: ( 2.78c e92f2352830, 2.78.4 253281f9d6) Worked: (none) **Short description of error** **Exact steps for others to reproduce the error** When I try to render the file attached to the message, Blender renders, but hangs when calculating the second part made by Freestyle. Drains every resource of the PC becomes impossible to manage, I waited some time the term but never got to see the rendering completed. [freestyle_bug_infinte_time.blend](https://archive.blender.org/developer/F521563/freestyle_bug_infinte_time.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @pafurijaz-4

Added subscriber: @pafurijaz-4

Added subscriber: @bigbad

Added subscriber: @bigbad

Works in Windows 10 home edition. This was on 4.2Ghz 6-core CPU 5820k. Freestyle is single threaded, so it's interesting why your whole computer slowed down.

Works in Windows 10 home edition. This was on 4.2Ghz 6-core CPU 5820k. Freestyle is single threaded, so it's interesting why your whole computer slowed down.
Paolo Furani changed title from Freestyle rendering, Rendering time infinity and total drain PC resources. to Freestyle rendering, Rendering time infinite and total drain PC resources. 2017-03-25 02:20:54 +01:00
Author

Hi, I tried again today but to no avail, Blender runs out of resources of my PC, the cursor does not move, nothing works not even the esc key to stop,

Hi, I tried again today but to no avail, Blender runs out of resources of my PC, the cursor does not move, nothing works not even the esc key to stop,
Author

Good morning, I wanted to add some more information.

This is where hangs in the rendering process.

===  Dimensions of the 2D image coordinate system  ===
Width  : 773
Height : 211
Unit line thickness : 0.5 pixel(s)
Evaluate all animation - 1.000000
	No Actions, so no animation needs to be evaluated...
DAG_id_tag_update_ex: id=OBCamera flag=1

----------------------------------------------------------
|  Scene|RenderLayer
| -- | -- |
----------------------------------------------------------

===  Importing triangular meshes into Blender  ===
Scene loaded
Mesh cleaning    : 12.702910
View map cache   : disabled
Skipping auto-save, modal operator running, retrying in ten seconds...
Skipping auto-save, modal operator running, retrying in ten seconds...
Skipping auto-save, modal operator running, retrying in ten seconds...
Skipping auto-save, modal operator running, retrying in ten seconds...
Skipping auto-save, modal operator running, retrying in ten seconds...
Skipping auto-save, modal operator running, retrying in ten seconds...

While below the system totally blocked by Blender.
FreeStyle_bug.png

Good morning, I wanted to add some more information. This is where hangs in the rendering process. ``` === Dimensions of the 2D image coordinate system === Width : 773 Height : 211 Unit line thickness : 0.5 pixel(s) Evaluate all animation - 1.000000 No Actions, so no animation needs to be evaluated... DAG_id_tag_update_ex: id=OBCamera flag=1 ---------------------------------------------------------- | Scene|RenderLayer | -- | -- | ---------------------------------------------------------- === Importing triangular meshes into Blender === Scene loaded Mesh cleaning : 12.702910 View map cache : disabled Skipping auto-save, modal operator running, retrying in ten seconds... Skipping auto-save, modal operator running, retrying in ten seconds... Skipping auto-save, modal operator running, retrying in ten seconds... Skipping auto-save, modal operator running, retrying in ten seconds... Skipping auto-save, modal operator running, retrying in ten seconds... Skipping auto-save, modal operator running, retrying in ten seconds... ``` While below the system totally blocked by Blender. ![FreeStyle_bug.png](https://archive.blender.org/developer/F536331/FreeStyle_bug.png)
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Aaron Carlisle self-assigned this 2017-04-05 19:38:34 +02:00
Member

Freestyle is highly un-optimized for me Blender drained 10gb of ram because you only have 4gb it is quite apparent why Blender would hang.

Anyway... No bug here, while freestyle can be improved in the future this is more of a general known todo and does not need a task.

Closing.

Freestyle is highly un-optimized for me Blender drained 10gb of ram because you only have 4gb it is quite apparent why Blender would hang. Anyway... No bug here, while freestyle can be improved in the future this is more of a general known todo and does not need a task. Closing.
Author

Hello, I am not very much agree with your assessment, the attached file is only 281KB with some modifiers, and in my case locks the PC, while this sub is a rendering in Freestyle that runs in just over three minutes, and it is more 103MiB

838050025.png

838050025-b.png

Hello, I am not very much agree with your assessment, the attached file is only 281KB with some modifiers, and in my case locks the PC, while this sub is a rendering in Freestyle that runs in just over three minutes, and it is more 103MiB ![838050025.png](https://archive.blender.org/developer/F536871/838050025.png) ![838050025-b.png](https://archive.blender.org/developer/F536872/838050025-b.png)
Author

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'
Member

File size is not the same as ram.

File size is not the same as ram.
Author

OK, I understand well the difference between ram and size, and I understand also that a very small file may generate abnormal memory consumption, but believe me when I tell you that this is an inherent problem with modifiers, and covers even groups and instances, said this today I'll do some tests on a different PC with less RAM,
This is a long period of time I use freestyle to generate 2D views and I use it daily, and I found other problems caused by other problems of various kinds.

OK, I understand well the difference between ram and size, and I understand also that a very small file may generate abnormal memory consumption, but believe me when I tell you that this is an inherent problem with modifiers, and covers even groups and instances, said this today I'll do some tests on a different PC with less RAM, This is a long period of time I use freestyle to generate 2D views and I use it daily, and I found other problems caused by other problems of various kinds.
Author

Hello again, I did some tests and verified that the problem of the total drainage of resources and the block of my PC with 4 GB of RAM, occurs only when the active modifier bevel in horizontal bars, none of the other modifiers I take issue, I think the problem is very unusual, as well as being definitely caused by a failure of NPR engine optimization.

Hello again, I did some tests and verified that the problem of the total drainage of resources and the block of my PC with 4 GB of RAM, occurs only when the active modifier bevel in horizontal bars, none of the other modifiers I take issue, I think the problem is very unusual, as well as being definitely caused by a failure of NPR engine optimization.
Author

Hello, today I downloaded the latest version and the file caused the crash Blender, below the file generated by debugging.

# Blender 2.78 (sub 4), Commit date: 2017-04-06 15:20, Hash d426c335c5
bpy.ops.wm.open_mainfile(filepath="/home/pafurijaz/Scrivania/freestyle_bug_infinte_time.blend", load_ui=True, use_scripts=False)  # Operator
bpy.context.space_data.context = 'WORLD'  # Property
bpy.ops.file.highlight()  # Operator
bpy.ops.file.highlight()  # Operator
bpy.ops.file.highlight()  # Operator
bpy.ops.file.highlight()  # Operator
bpy.ops.file.select()  # Operator
bpy.ops.file.highlight()  # Operator
bpy.ops.file.execute()  # Operator
bpy.ops.image.open(filepath="//textures/kiara_interior_1k.hdr", directory="/home/pafurijaz/Scrivania/textures/", files=[{"name":"kiara_interior_1k.hdr", "name":"kiara_interior_1k.hdr"}], relative_path=True, show_multiview=False)  # Operator
bpy.ops.view2d.scroll_right(deltax=20, deltay=0)  # Operator
bpy.ops.view2d.scroll_right(deltax=20, deltay=0)  # Operator
bpy.context.space_data.context = 'MATERIAL'  # Property
bpy.ops.view2d.scroll_left(deltax=-20, deltay=0)  # Operator
bpy.context.space_data.context = 'RENDER'  # Property
bpy.ops.view3d.select(extend=False, deselect=False, toggle=False, center=False, enumerate=False, object=False, location=(442, 292))  # Operator
bpy.context.space_data.context = 'MATERIAL'  # Property
bpy.context.space_data.context = 'MODIFIER'  # Property
bpy.ops.view2d.scroll_down(deltax=0, deltay=-40)  # Operator
bpy.ops.view2d.scroll_down(deltax=0, deltay=-40)  # Operator
bpy.ops.view2d.scroll_down(deltax=0, deltay=-40)  # Operator
bpy.ops.view2d.scroll_down(deltax=0, deltay=-40)  # Operator
bpy.ops.view2d.scroll_down(deltax=0, deltay=-40)  # Operator
bpy.ops.view2d.scroll_down(deltax=0, deltay=-40)  # Operator
bpy.ops.view2d.scroll_up(deltax=0, deltay=40)  # Operator
bpy.ops.view2d.scroll_up(deltax=0, deltay=40)  # Operator
bpy.ops.view2d.scroll_up(deltax=0, deltay=40)  # Operator
bpy.ops.view2d.scroll_up(deltax=0, deltay=40)  # Operator
bpy.ops.view2d.scroll_up(deltax=0, deltay=40)  # Operator
bpy.ops.view2d.scroll_up(deltax=0, deltay=40)  # Operator
bpy.ops.view2d.scroll_up(deltax=0, deltay=40)  # Operator
bpy.ops.view2d.scroll_up(deltax=0, deltay=40)  # Operator
bpy.context.space_data.context = 'RENDER'  # Property
bpy.context.space_data.context = 'MODIFIER'  # Property
bpy.context.space_data.context = 'RENDER'  # Property

# backtrace
/home/pafurijaz/Software/blender-daily/blender(BLI_system_backtrace+0x28) [0x95a8e78]
/home/pafurijaz/Software/blender-daily/blender() [0x8b84eb8]
[0xf7712bc0]
/home/pafurijaz/Software/blender-daily/blender(rtbuild_heuristic_object_split+0x4ce) [0x8f6140e]
/home/pafurijaz/Software/blender-daily/blender(_ZN15BuildBinaryVBVHI9OVBVHNodeE10_transformEP9RTBuilder+0x2eb) [0x8f5c8bb]
/home/pafurijaz/Software/blender-daily/blender(_ZN15BuildBinaryVBVHI9OVBVHNodeE10_transformEP9RTBuilder+0x343) [0x8f5c913]
/home/pafurijaz/Software/blender-daily/blender() [0x8f5a544]
/home/pafurijaz/Software/blender-daily/blender(makeraytree+0x356) [0x8f10fe6]
/home/pafurijaz/Software/blender-daily/blender(RE_Database_Preprocess+0x1b6) [0x8ef20d6]
/home/pafurijaz/Software/blender-daily/blender(RE_RenderFreestyleExternal+0x7d) [0x8f07a8d]
/home/pafurijaz/Software/blender-daily/blender(RE_engine_render+0x408) [0x8ef6318]
/home/pafurijaz/Software/blender-daily/blender() [0x8f07170]
/home/pafurijaz/Software/blender-daily/blender() [0x8f07775]
/home/pafurijaz/Software/blender-daily/blender() [0x8f0a596]
/home/pafurijaz/Software/blender-daily/blender(RE_BlenderFrame+0xf0) [0x8f0b130]
/home/pafurijaz/Software/blender-daily/blender() [0x8e5076f]
/home/pafurijaz/Software/blender-daily/blender() [0x8b9593d]
/lib/i386-linux-gnu/libpthread.so.0(+0x62c5) [0xf76112c5]
/lib/i386-linux-gnu/libc.so.6(clone+0x6e) [0xf72d9eee]

And with my little GTX750Ti it runs out of memory

Generate:            0.000012
Total:               0.000013
I0407 18:41:28.820195  3377 device_cuda.cpp:596] Texture allocate: __svm_nodes, 3,552 bytes. (3.47K)
I0407 18:41:28.820415  3377 device_cuda.cpp:596] Texture allocate: __shader_flag, 320 bytes. (320)
I0407 18:41:28.820683  3377 svm.cpp:144] Shader manager updated 16 shaders in 0.00157399 seconds.
I0407 18:41:28.820734  3377 object.cpp:541] Total 16 objects.
I0407 18:41:28.911334  3377 device_cuda.cpp:596] Texture allocate: __objects, 3,072 bytes. (3.00K)
I0407 18:41:28.933198  3377 mesh.cpp:1964] Total 16 meshes.
I0407 18:41:29.360957  3377 device_cuda.cpp:596] Texture allocate: __attributes_map, 2,304 bytes. (2.25K)
I0407 18:41:29.361093  3377 device_cuda.cpp:596] Texture allocate: __attributes_float3, 448 bytes. (448)
I0407 18:41:29.384938  3377 mesh.cpp:2108] Objects BVH build pool statistics:
Total time:    0.023776
Tasks handled: 16
I0407 18:41:29.385016  3377 mesh.cpp:1817] Using regular BVH optimization structure
aligned_malloc returns null: len=346467744 in Cycles Alloc, total 480761720
Error: run out of memory!
I0407 18:41:29.385350  3366 blender_session.cpp:566] Total render time: 5.73006
I0407 18:41:29.385382  3366 blender_session.cpp:567] Render time (without synchronization): 0.000196218
Job 'Render' finished in 6.004031 seconds
Hello, today I downloaded the latest version and the file caused the crash Blender, below the file generated by debugging. ``` # Blender 2.78 (sub 4), Commit date: 2017-04-06 15:20, Hash d426c335c5 bpy.ops.wm.open_mainfile(filepath="/home/pafurijaz/Scrivania/freestyle_bug_infinte_time.blend", load_ui=True, use_scripts=False) # Operator bpy.context.space_data.context = 'WORLD' # Property bpy.ops.file.highlight() # Operator bpy.ops.file.highlight() # Operator bpy.ops.file.highlight() # Operator bpy.ops.file.highlight() # Operator bpy.ops.file.select() # Operator bpy.ops.file.highlight() # Operator bpy.ops.file.execute() # Operator bpy.ops.image.open(filepath="//textures/kiara_interior_1k.hdr", directory="/home/pafurijaz/Scrivania/textures/", files=[{"name":"kiara_interior_1k.hdr", "name":"kiara_interior_1k.hdr"}], relative_path=True, show_multiview=False) # Operator bpy.ops.view2d.scroll_right(deltax=20, deltay=0) # Operator bpy.ops.view2d.scroll_right(deltax=20, deltay=0) # Operator bpy.context.space_data.context = 'MATERIAL' # Property bpy.ops.view2d.scroll_left(deltax=-20, deltay=0) # Operator bpy.context.space_data.context = 'RENDER' # Property bpy.ops.view3d.select(extend=False, deselect=False, toggle=False, center=False, enumerate=False, object=False, location=(442, 292)) # Operator bpy.context.space_data.context = 'MATERIAL' # Property bpy.context.space_data.context = 'MODIFIER' # Property bpy.ops.view2d.scroll_down(deltax=0, deltay=-40) # Operator bpy.ops.view2d.scroll_down(deltax=0, deltay=-40) # Operator bpy.ops.view2d.scroll_down(deltax=0, deltay=-40) # Operator bpy.ops.view2d.scroll_down(deltax=0, deltay=-40) # Operator bpy.ops.view2d.scroll_down(deltax=0, deltay=-40) # Operator bpy.ops.view2d.scroll_down(deltax=0, deltay=-40) # Operator bpy.ops.view2d.scroll_up(deltax=0, deltay=40) # Operator bpy.ops.view2d.scroll_up(deltax=0, deltay=40) # Operator bpy.ops.view2d.scroll_up(deltax=0, deltay=40) # Operator bpy.ops.view2d.scroll_up(deltax=0, deltay=40) # Operator bpy.ops.view2d.scroll_up(deltax=0, deltay=40) # Operator bpy.ops.view2d.scroll_up(deltax=0, deltay=40) # Operator bpy.ops.view2d.scroll_up(deltax=0, deltay=40) # Operator bpy.ops.view2d.scroll_up(deltax=0, deltay=40) # Operator bpy.context.space_data.context = 'RENDER' # Property bpy.context.space_data.context = 'MODIFIER' # Property bpy.context.space_data.context = 'RENDER' # Property # backtrace /home/pafurijaz/Software/blender-daily/blender(BLI_system_backtrace+0x28) [0x95a8e78] /home/pafurijaz/Software/blender-daily/blender() [0x8b84eb8] [0xf7712bc0] /home/pafurijaz/Software/blender-daily/blender(rtbuild_heuristic_object_split+0x4ce) [0x8f6140e] /home/pafurijaz/Software/blender-daily/blender(_ZN15BuildBinaryVBVHI9OVBVHNodeE10_transformEP9RTBuilder+0x2eb) [0x8f5c8bb] /home/pafurijaz/Software/blender-daily/blender(_ZN15BuildBinaryVBVHI9OVBVHNodeE10_transformEP9RTBuilder+0x343) [0x8f5c913] /home/pafurijaz/Software/blender-daily/blender() [0x8f5a544] /home/pafurijaz/Software/blender-daily/blender(makeraytree+0x356) [0x8f10fe6] /home/pafurijaz/Software/blender-daily/blender(RE_Database_Preprocess+0x1b6) [0x8ef20d6] /home/pafurijaz/Software/blender-daily/blender(RE_RenderFreestyleExternal+0x7d) [0x8f07a8d] /home/pafurijaz/Software/blender-daily/blender(RE_engine_render+0x408) [0x8ef6318] /home/pafurijaz/Software/blender-daily/blender() [0x8f07170] /home/pafurijaz/Software/blender-daily/blender() [0x8f07775] /home/pafurijaz/Software/blender-daily/blender() [0x8f0a596] /home/pafurijaz/Software/blender-daily/blender(RE_BlenderFrame+0xf0) [0x8f0b130] /home/pafurijaz/Software/blender-daily/blender() [0x8e5076f] /home/pafurijaz/Software/blender-daily/blender() [0x8b9593d] /lib/i386-linux-gnu/libpthread.so.0(+0x62c5) [0xf76112c5] /lib/i386-linux-gnu/libc.so.6(clone+0x6e) [0xf72d9eee] ``` And with my little GTX750Ti it runs out of memory ``` Generate: 0.000012 Total: 0.000013 I0407 18:41:28.820195 3377 device_cuda.cpp:596] Texture allocate: __svm_nodes, 3,552 bytes. (3.47K) I0407 18:41:28.820415 3377 device_cuda.cpp:596] Texture allocate: __shader_flag, 320 bytes. (320) I0407 18:41:28.820683 3377 svm.cpp:144] Shader manager updated 16 shaders in 0.00157399 seconds. I0407 18:41:28.820734 3377 object.cpp:541] Total 16 objects. I0407 18:41:28.911334 3377 device_cuda.cpp:596] Texture allocate: __objects, 3,072 bytes. (3.00K) I0407 18:41:28.933198 3377 mesh.cpp:1964] Total 16 meshes. I0407 18:41:29.360957 3377 device_cuda.cpp:596] Texture allocate: __attributes_map, 2,304 bytes. (2.25K) I0407 18:41:29.361093 3377 device_cuda.cpp:596] Texture allocate: __attributes_float3, 448 bytes. (448) I0407 18:41:29.384938 3377 mesh.cpp:2108] Objects BVH build pool statistics: Total time: 0.023776 Tasks handled: 16 I0407 18:41:29.385016 3377 mesh.cpp:1817] Using regular BVH optimization structure aligned_malloc returns null: len=346467744 in Cycles Alloc, total 480761720 Error: run out of memory! I0407 18:41:29.385350 3366 blender_session.cpp:566] Total render time: 5.73006 I0407 18:41:29.385382 3366 blender_session.cpp:567] Render time (without synchronization): 0.000196218 Job 'Render' finished in 6.004031 seconds ```
Aaron Carlisle removed their assignment 2017-04-13 07:22:39 +02:00
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Aaron Carlisle self-assigned this 2017-04-15 01:08:58 +02:00
Member

The issue here is not the bevel modifier but just exponential growth. ((You have the horizontal edges (8 * 6 * 16) * subdivisions + other geometry 10 ) = 7680 This number is reported in Blender. You then factor in the modifiers: 7680 * (2 solidify) * (7.3 bevel) * (23.3 subsurf) = 1,794,048 worth of edges for that object (way more than you need, try decrease the subsurf to see if it works) Anyway, no bug here.

The issue here is not the bevel modifier but just exponential growth. ((You have the horizontal edges (8 * 6 * 16) * subdivisions + other geometry 10 ) = 7680 This number is reported in Blender. You then factor in the modifiers: 7680 * (2 solidify) * (7.3 bevel) * (23.3 subsurf) = 1,794,048 worth of edges for that object (way more than you need, try decrease the subsurf to see if it works) Anyway, no bug here.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#51048
No description provided.