Crash updating grease pencil material preview #57896

Closed
opened 2018-11-17 19:46:11 +01:00 by Antonio Vazquez · 13 comments

Last Daily Build and tested with last source code
Windows 10 64 bits

Since several days, if you add a grease pencil object and select the material tab, get a segment fault.

The grease pencil code has not been changed in last days and the error looks related to BKE_material_copy_data() function.

It looks the material->gp_style get damaged and set to NaN. The NaN value of this variable can produce crashes in lot of places. I think the task #57867 is related to this too.

To reproduce:

  • Start Blender with General template
  • Add GP object->Stroke
  • Select material tab
  • Crash

The crash also happens adding a material.

This is the crash log:

memcpy() Line 408	Unknown
MEM_lockfree_dupallocN(const void * vmemh) Line 190
BKE_material_copy_data(Main * bmain, Material * ma_dst, const Material * ma_src, const int flag) Line 210
BKE_id_copy_ex(Main * bmain, const ID * id, ID * * r_newid, const int flag, const bool test) Line 586
DEG::anonymous namespace'::id_copy_inplace_no_main(const ID * id, ID * newid) Line 280
DEG::deg_expand_copy_on_write_datablock(const DEG::Depsgraph * depsgraph, const DEG::IDDepsNode * id_node, DEG::DepsgraphNodeBuilder * node_builder, bool create_placeholders) Line 731
DEG::deg_update_copy_on_write_datablock(const DEG::Depsgraph * depsgraph, const DEG::IDDepsNode * id_node) Line 945
DEG::deg_evaluate_copy_on_write(Depsgraph * graph, const DEG::IDDepsNode * id_node) Line 1096

@lichtwerk Could you take a look? it looks the problem is not the grease pencil code, but some change done in how the objects are duplicated.

Last Daily Build and tested with last source code Windows 10 64 bits Since several days, if you add a grease pencil object and select the material tab, get a segment fault. The grease pencil code has not been changed in last days and the error looks related to BKE_material_copy_data() function. It looks the material->gp_style get damaged and set to NaN. The NaN value of this variable can produce crashes in lot of places. I think the task #57867 is related to this too. **To reproduce:** * Start Blender with General template * Add GP object->Stroke * Select material tab * Crash The crash also happens adding a material. This is the crash log: ``` memcpy() Line 408 Unknown MEM_lockfree_dupallocN(const void * vmemh) Line 190 BKE_material_copy_data(Main * bmain, Material * ma_dst, const Material * ma_src, const int flag) Line 210 BKE_id_copy_ex(Main * bmain, const ID * id, ID * * r_newid, const int flag, const bool test) Line 586 DEG::anonymous namespace'::id_copy_inplace_no_main(const ID * id, ID * newid) Line 280 DEG::deg_expand_copy_on_write_datablock(const DEG::Depsgraph * depsgraph, const DEG::IDDepsNode * id_node, DEG::DepsgraphNodeBuilder * node_builder, bool create_placeholders) Line 731 DEG::deg_update_copy_on_write_datablock(const DEG::Depsgraph * depsgraph, const DEG::IDDepsNode * id_node) Line 945 DEG::deg_evaluate_copy_on_write(Depsgraph * graph, const DEG::IDDepsNode * id_node) Line 1096 ``` @lichtwerk Could you take a look? it looks the problem is not the grease pencil code, but some change done in how the objects are duplicated.
Author
Member

Added subscribers: @lichtwerk, @antoniov

Added subscribers: @lichtwerk, @antoniov

#57920 was marked as duplicate of this issue

#57920 was marked as duplicate of this issue

#57910 was marked as duplicate of this issue

#57910 was marked as duplicate of this issue

#57911 was marked as duplicate of this issue

#57911 was marked as duplicate of this issue

#57909 was marked as duplicate of this issue

#57909 was marked as duplicate of this issue
Author
Member

I think #57877 is related to this too.

I think #57877 is related to this too.
Antonio Vazquez changed title from Segment Fault when select tab materialss to Segment Fault when select tab materials 2018-11-17 20:08:51 +01:00
Sergey Sharybin was assigned by Brecht Van Lommel 2018-11-18 12:40:01 +01:00

Added subscriber: @brecht

Added subscriber: @brecht

This is one for Sergey who recently did changes in this code.

This is one for Sergey who recently did changes in this code.

Added subscriber: @smaples1326

Added subscriber: @smaples1326

Added subscriber: @user1

Added subscriber: @user1
Brecht Van Lommel changed title from Segment Fault when select tab materials to Crash updating grease pencil material preview 2018-11-18 15:35:52 +01:00

This issue was referenced by 5e61fd7c23

This issue was referenced by 5e61fd7c232ac2ece94c57ca74bebd2c91102f13

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscriber: @Aslan3D.com

Added subscriber: @Aslan3D.com
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
4 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#57896
No description provided.