Page MenuHome

Crashes on first click on model
Closed, ResolvedPublic

Description

Blender Version
Broken: 2019-06-01 22:51 079c7f918c81

Exact steps for others to reproduce the error

  • Select Cube, go to Edit mode
  • Change the active object - open a Python console editor: C.view_layer.objects.active = D.objects['Camera']
  • Save and re-open file
  • Click on the cube

Simplified file (just open and select the cube):

Original Report

Click on arm. blender crashes to desktop.

Event Timeline

matc (matc) triaged this task as Confirmed, Medium priority.

Crash happens in stats_object_edit(Object *obedit, SceneStats *stats) where BKE_editmesh_from_object(obedit) returns NULL. Selecting "StickHandRD" in the Outliner has the same effect.

Selecting another Object ("SickLU") and switching to edit mode causes a crash in undomesh_from_editmesh where the edit mesh is NULL for "StickHandRD".

From the Data API it looks like "StickHandRD" is already in edit mode, without being selected. This is the only difference between "StickHandRD" and "StickHandLD" that I was able to spot (both have the same number of vertices etc.).

Chris Wedgwood (OXO) raised the priority of this task from Confirmed, Medium to Confirmed, High.Jun 6 2019, 9:10 AM

I should like to escalate this one because its preventing me from continuing with testing 2.8

Brecht Van Lommel (brecht) lowered the priority of this task from Confirmed, High to Confirmed, Medium.

We define the priority.

@matc (matc) normally when we developers set a bug to confirm, it should be assigned to a developer immediately. Otherwise it's looks as if it's been triaged but none of the developers have assessed what kind of priority it has and who should look into it. If you don't know who to assign it to, just leave as Needs Triage.

Brecht Van Lommel (brecht) raised the priority of this task from Confirmed, Medium to Confirmed, High.Jun 6 2019, 1:05 PM

This may be related to T62450: Undo crash after hiding object in edit mode in some way.

The issue on stat info, looking into it.

//source/blender/editors/space_info/info_stats.c:212:25: runtime error: member access within null pointer of type 'struct BMEditMesh'
Full backtrace: P999

@Chris Wedgwood (OXO) do you have instructions on how to reproduce this from scratch? Or any clues on which steps you did, what you were trying?

The issue here is that after selecting the object it becomes active, but for some reason the object is in edit mode ((ob)->mode & OB_MODE_EDIT) yet BKE_editmesh_from_object( ) returns NULL.

@Campbell Barton (campbellbarton) you may want to take a look at this?

And even if we were to ignore this will break later down the line for the same reason.
And for the records, it was not introduced on db67a17d17e39905271fe09d7814b028db9aef38.

And slightly simplified file:

(removed the other objects and the other view layers)

I can't say what caused this. The model was originally a wings3d file, which was imported to blender via wavefront obj import.

Then later another obj import with the offending Arm part was done.

I then worked on the modelling for some days, and out of the blue after duplicating the arm, it showed this issue.

Alright, managed to reproduce from scratch:

  • Select Cube, go to Edit mode
  • Change the active object - open a Python console editor: C.view_layer.objects.active = D.objects['Camera']
  • Save and re-open file
  • Click on the cube

Simplified file (just open and select the cube):

The issue is that ED_editors_init() doesn't initialize the object, nor clear its ob->mode flag (to remove OB_MODE_EDIT).

@matc (matc) normally when we developers set a bug to confirm, it should be assigned to a developer immediately. Otherwise it's looks as if it's been triaged but none of the developers have assessed what kind of priority it has and who should look into it. If you don't know who to assign it to, just leave as Needs Triage.

I think https://wiki.blender.org/wiki/Process/Help_Triaging_Bugs should be more clear about that.

Needs Triage by Developer

  • ...
  • If you can reproduce the bug in the newest version, set the priority to Confirmed, Medium (a developer can change it to Low or High later on if appropriate).

Thanks for pointing that out, I've updated the page now.