Maniphest T48412

Blender 2.77a crashes on Undo in some specific multi-level linked libraries cases
Closed, Resolved

Assigned To
Bastien Montagne (mont29)
Authored By
Bernard Etiennot (beti001)
May 12 2016, 10:37 AM
Tags
  • BF Blender
Subscribers
Aaron Carlisle (Blendify)
Bastien Montagne (mont29)
Bernard Etiennot (beti001)
Campbell Barton (campbellbarton)
Estefania (estefania)
Francesco Siddi (fsiddi)
Sergey Sharybin (sergey)
Vuk Gardašević (lijenstina)
Tokens
"Like" token, awarded by fsiddi.

Description

System Information

Blender Version
Broken: 2.77a abf6f08.

Short description of error
Blender unexpectedly close after CTRL-Z

Exact steps for others to reproduce the error
Opened up file created with a previous version of Blender.
Added PLANE / SCALED DOWN / ROTATED 90° along Y axis and saved it -> file uploaded herewith :

Open attached file;
Move along Z and/or Y axis;
Undo last action by CTRL-Z cause Blender to unexpectedly close

Good Luck !

Blender is really an awesome piece of software !!!

Hope everything is correctly filled in as this is first time I report a "bug".

Revisions and Commits

rB Blender

Related Objects

Mentioned In
T48682: Crash after undo with linked scene
Mentioned Here
rB6d3fdccbd580: Squashed commit of id-remap branch.
rBe0db647d35cd: Fix region_2d_to_origin_3d not working with ortho view
P365 Possible fix for T48412
rB29a17d54da1f: Fix CUDA MEMCPY condition, it should only copy 3D, 2D or 1D.

Event Timeline

Bernard Etiennot (beti001) created this task.May 12 2016, 10:37 AM
Bernard Etiennot (beti001) raised the priority of this task from to 90.
Bernard Etiennot (beti001) updated the task description.
Bernard Etiennot (beti001) added a project: BF Blender.
Bernard Etiennot (beti001) edited a custom field.
Bernard Etiennot (beti001) added a subscriber: Bernard Etiennot (beti001).
Bernard Etiennot (beti001) added a comment.May 12 2016, 12:19 PM

Just re-tested with Blender 2.76b and problem don't appear.

Aaron Carlisle (Blendify) added a subscriber: Estefania (estefania).
Sergey Sharybin (sergey) lowered the priority of this task from 90 to 30.May 17 2016, 11:16 AM
Sergey Sharybin (sergey) added a subscriber: Sergey Sharybin (sergey).

I can not reproduce the issue. Some questions

  • Does it happen with latest builds from builder.blender.org?
  • Try using opengl32.dll from ftp://ftp.blender.org/sergey/softwaregl/ and put it next to blender.exe. This will switch Blender to fully software OpenGL mode, which is slower but will eliminate possible interference with broken OpenGL drivers (which could be a case here).
Bernard Etiennot (beti001) added a comment.May 17 2016, 12:28 PM

Hello Sergey,

Thanks for having a look at this :-)

  • Does it happen with latest builds from builder.blender.org?

I didn't give a try but will do for sure.
I had to de-install 2.77a as it caused problems (at least for me) and switched back to 2.76b.
I will test with last build anyway.

  • Try using opengl32.dll from ftp://ftp.blender.org/sergey/softwaregl/ and put it next to blender.exe. This will switch Blender to fully software OpenGL mode, which is slower but will eliminate possible interference with broken OpenGL drivers (which could be a case here).

Ok. What I also noticed is that I have quite regularly problems after "minimizing" the Blender windows : it doesn't re-open correctly and application needs to be closed down and restarted. Maybe an OpenGL issue indeed...

Bernard Etiennot (beti001) added a comment.May 17 2016, 2:17 PM

Ok, gave a try with blender-2.77.0-git.29a17d5-AMD64

Problem still persists even when opengl32.dll in folder and running in software mode.

Tried to "debug" but I'm not too familiar with all the Windows debug tools (WER ?)

Is there a way I could help you out any further ?

Bernard Etiennot (beti001) added a comment.May 26 2016, 9:39 AM

Hello Sergey,

I'm very much afraid that at the time I opened up this thread, I actually didn't feed you with enough material to test :-{
I do have to apology as the file in question has multiple dependancies to other linked files and I mistankently overlooked a bit this point...

So, I have now made a .zip file hopefully containing all the material to simulate :

As in previous posts, with 2.77a (or even latest build), making any change to the file and un-doing it (CTRL-Z or via "history") cause Blender to unexpectedly close. This phenomenon do not appear with 2.76b.
This has also apparently nothing to do with an OpenGL issue.

Thanks a lot for your help and support,

Bernard

Sergey Sharybin (sergey) added a comment.May 27 2016, 9:20 AM

Don't really have time right now to investigate, but thanks for additional information. We'll check it shortly!

Bernard Etiennot (beti001) added a comment.May 27 2016, 9:30 AM

Ok Sergey,

Let me know if I could be of further help anyway.

Thanks for your time and efforts.

BRGDS,

Bernard

Campbell Barton (campbellbarton) added subscribers: Bastien Montagne (mont29), Campbell Barton (campbellbarton).Jun 6 2016, 11:26 AM

Was looking into this bugs, seems it's caused by create_placeholder in readfile.c

This creates a place-holder on file read, however its lost on undo, (seems like this is caused by the library data being reloaded but not the placeholder).
Which is freed from setup_app_data, but kept in the .

Looking into some possible fixes (either create new placeholders, or move them out of Main so they're not freed).

@Bastien Montagne (mont29), any insights here?

Campbell Barton (campbellbarton) raised the priority of this task from 30 to 50.Jun 6 2016, 11:28 AM
Campbell Barton (campbellbarton) added a comment.Jun 6 2016, 11:54 AM

This fixes the bug, but seems a bit hackish - P365

Bastien Montagne (mont29) claimed this task.Jun 6 2016, 5:49 PM

I’m not convinced missing libs (i.e. placeholders) are the issue here actually… I see no reason to have different behavior here with indirect placeholders than with 'real' indirect datablocks - in both cases, those ID_ID are not written in .blend, which means they are supposed to be re-linked on read time, have the feeling this is true for any kind of indirect ID.

So, question @Bernard Etiennot (beti001): do you have missing libraries in your own local setup, when you get the undo crash?

I’m trying to recreate that issue with a simpler setup, e.g. a single (missing/placeholder) indirectly linked material does not make things crash here.

Bastien Montagne (mont29) lowered the priority of this task from 50 to 30.Jun 6 2016, 6:00 PM
Bernard Etiennot (beti001) added a comment.Jun 7 2016, 5:27 PM

Hello Bastien, Campbell,

To answer your question: not that I'm aware of (meaning I have checked everything to the best of my knowledge).

Everything links correctly, even multi-dependencies objects (e.g. the camera - the illustrated object - is made up of multiple parts which are located in the "G3_Parts" folder).

My local setup is exactly similar to the one I have enclosed fro reference (Blender_Crash.zip).

What I was thinking of doing is to "depopulate" the scene from its objects one by one up to a point where - hopefully - the problem doesn't appear anaymore... Is it worth a try ?

Let me know If I get your point wrong or if I messed up with something.

Looking forward to hearing from you guys, and anyway : fantastic job !!!

BRGDS,

Bernard

Bastien Montagne (mont29) raised the priority of this task from 30 to 50.Jun 7 2016, 7:56 PM

@Bernard Etiennot (beti001) we are missing a lot of libraries in given .zip (or I should rather say, paths of indirect libraries are stored absolute in direct libs, which means we cannot access them, not without editing all lib's path to make them relative…).

Anyway, think this confirms issue is not with placeholders (missing linked data), but with undo & multi-level linking, but this is not triggered in all cases, I tried to reproduce this with some simple setup, with no luck so far.

So yes, removing everything and adding it back until you can reproduce the issue is a very good next step in investigation. :)

Bastien Montagne (mont29) renamed this task from Blender 2.77a unexpectedly close after CTRL-Z to Blender 2.77a crashes on Undo in some specific multi-level linked libraries cases .Jun 7 2016, 7:57 PM
Bernard Etiennot (beti001) added a comment.Jun 9 2016, 3:51 PM

Hello Bastien,

I'll further investigate and hopefully provide you with a much simpler setup to test with.

Up until know, I could indeed isolate the object that causes Blender to crash.
This might have indeed something to do with the multi-level linking as this object has multiple dependencies but which all seem beeing correctly resolved.

I keep you posted anyway.

BRGDS,

Bernard

Bernard Etiennot (beti001) added a comment.Jun 16 2016, 12:44 PM

Hello Bastien (& other followers),

Sorry, but it took me some time to nail down the issue in a simplified set-up.

Please find herewith a file that would allow you to reproduce the problem :

In short, it goes over linking a group of linked objects (themselves being a group of object).
Maybe a bit hard to explain but the file exemple is pretty straightforward.

Hope it helps,

Bernard

Bastien Montagne (mont29) added a comment.Jun 16 2016, 3:00 PM

Hey @Bernard Etiennot (beti001), thanks for the file, but it’s not crashing at all here, tried several actions & multiple undo, nothing wrong :|

Vuk Gardašević (lijenstina) added a subscriber: Vuk Gardašević (lijenstina).EditedJun 16 2016, 4:08 PM

I can recreate the crash on AMD X3 455, r7 360, loaded factory settings:

Opening _Linked_Component, moving it it and then making an undo will crash Blender.
Sometimes two objects disappear after the first undo and after the next one there is a crash.

Win 7:

Blender versions:
hash: 049f715, e0db647, b567835, rB6d3fdccbd580

The cmd doesn't say much:

ED_undo_push: Translate
undo Translate
Error: EXCEPTION_ACCESS_VIOLATION

Linux:
Xubuntu 15.10
Blender version: a58a8eb

The terminal
Segmentation fault (core dumped)

However, here is the crash dump:

Estefania (estefania) added a comment.Jun 16 2016, 7:30 PM

Hi, this is Estefania, the person who reported the bug. I would like to clarify that my crash happened with 2.76b. I was not aware 2.77a version existed when it happened.
I am sorry I did not clarify it earlier, but I am not an engineer/computer scientist so I was a little intimidated by the email updates and I did not notice the report had been titled: Blender 2.77a crashes ... Anyway, I suppose you might not be able to crash 2.77a with multiple Undo commands if the bug happened in 2.76b.
Sorry for the misunderstanding. I have learned to read the reports and to log in here to look up for "my" case to offer my thoughts. Hope I will be more useful in the future.
Best regards.

Bernard Etiennot (beti001) added a comment.Jun 16 2016, 10:00 PM

@Bastien Montagne (mont29) Hello Bastien, my mistake not having given any indication about how to reproduce the issue with the simplified setup. Entry point is indeed the _Linked_component file which just contains a link to a group made up of two other linked groups (still difficult to formulate indeed). Undoing any cmd lke e.g. move or rotate is just crashing Blender 2.77a while this behaviour doen't happen with 2.76b.
This particular phenomenon was indeed well described by @Vuk Gardašević (lijenstina), thanks for this.
Hope you will be able to reproduce.

To @Estefania (estefania), thanks for your feedback and comment which are of course welcome. Just one point that I noticed though is that - at least as far as I could test - the specific problem that I reported is not appearing with 2.76b.
So I'm just wondering if the root cause of your issue would be exactly the same as the one reported here (although software bugs may sometimes lead to strange side effects).

Looking forward to your inputs,

BRGDS,

Bernard

Bastien Montagne (mont29) added a comment.Jun 16 2016, 10:20 PM

Ah yes, now can reproduce indeed. Thanks, will try to investigate this one next week…

Vuk Gardašević (lijenstina) mentioned this in T48682: Crash after undo with linked scene.Jun 19 2016, 6:57 PM
Francesco Siddi (fsiddi) added a subscriber: Francesco Siddi (fsiddi).Jun 19 2016, 7:01 PM
Bastien Montagne (mont29) merged a task: T48682: Crash after undo with linked scene.Jun 21 2016, 4:15 PM
Bastien Montagne (mont29) changed the task status from Unknown Status to Resolved by committing rBe34ade4eb3b2: Fix T48412: Blender 2.77a crashes on Undo in some specific multi-level linked….Jun 21 2016, 4:22 PM
Bastien Montagne (mont29) added a commit: rBe34ade4eb3b2: Fix T48412: Blender 2.77a crashes on Undo in some specific multi-level linked….
Francesco Siddi (fsiddi) awarded a token.Jun 21 2016, 4:26 PM
Bernard Etiennot (beti001) added a comment.Jun 21 2016, 9:12 PM

Well done Bastien !
I will give a try. Is your fix going to be available through the next night build ?

Thanks a lot for your efforts & involvement. Errors are only made by those who dare to act and make things moving... ; -)

Bernard

Aaron Carlisle (Blendify) added a subscriber: Aaron Carlisle (Blendify).Jun 21 2016, 9:41 PM

@Bernard Etiennot (beti001) Yes

Bernard Etiennot (beti001) added a comment.Jun 21 2016, 9:44 PM

@Aaron Carlisle (Blendify) Thanks Aaron.