Maniphest T67052

Camera perspective, corrupt 3D view in one workspace tab.
Closed, Archived

Assigned To
Emir Sinan Gürlek (filibis)
Authored By
CarlG (CarlG)
Jul 16 2019, 1:23 PM
Tags
  • BF Blender
  • Tracker Curfew
Subscribers
CarlG (CarlG)
Clément Foucault (fclem)
Emir Sinan Gürlek (filibis)
Jeroen Bakker (jbakker)
Philipp Oeser (lichtwerk)
Sebastian Parborg (zeddb)

Description

System Information
Operating system: Linux-4.15.0-51-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: Radeon RX Vega (VEGA10, DRM 3.23.0, 4.15.0-51-generic, LLVM 8.0.0) X.Org 4.5 (Core Profile) Mesa 19.0.2

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-11 13:50, hash: rB06312c6d2db8
Worked: (optional)

Short description of error
Sometimes a 3D view can become corrupted and can't show camera view.
The viewport will not show anything.
Rendered viewport will flip between Path Tracing Sample counts but nothing will get done.
Rendering an image from the camera will work, suggesting it's not the camera itself that is erroneous.
Switching to other tabs with a 3D view will also work fine, suggesting it's that specific 3D view that is corrupted.

Exact steps for others to reproduce the error
In provided file:

  • Observe that in Shading.002 tab, everything works - camera perspective and user perspective view, solid and rendered.
  • Switch to Shading tab and you get a gray wall in camera perspective, while user perspective view works. Switching to rendered view while in camera perspective, the sample counter will just flip between a couple of numbers rather than complete.

I've had this happen a couple of times now, for no apparent reason - I can't reproduce on demand.
Clicking the add workspace quickly fixes it, but the first time I lost hours trying to figure out what was going on.
Trying to search for bugs here, all I got was the error message:
Unhandled Exception ("PhutilAggregateException")

Note: In my startup, I am using two linked math libraries (bunch of material node groups); one with failing image texture links and one with updated texture links. In the original work file (completely stripped down here), I was using linked blend containing objects in instanced collections and objects regularly instanced. Some objects have textures on multiple UVs (incl BastioniLab human). That's about the only "special" things I can remember about the real file.

Event Timeline

CarlG (CarlG) created this task.Jul 16 2019, 1:23 PM
CarlG (CarlG) updated the task description.
Sebastian Parborg (zeddb) assigned this task to Clément Foucault (fclem).Jul 17 2019, 11:51 AM
Sebastian Parborg (zeddb) lowered the priority of this task from 90 to 80.
Sebastian Parborg (zeddb) added subscribers: Clément Foucault (fclem), Jeroen Bakker (jbakker), Sebastian Parborg (zeddb).

I'm getting and assert:

BLI_assert failed: /home/zed/prog/blender/source/blender/draw/intern/draw_manager_data.c:1264, draw_view_matrix_state_update(), at 'is_negative_m4(viewmat) == !is_negative_m4(winmat)'

And if I print the winmat, we can see that in contains nan values:

 -nan 0.000000 -nan 0.000000
0.000000 -nan -nan 0.000000
0.000000 0.000000 -1.000020 -0.002000
0.000000 0.000000 -1.000000 0.000000

@Clément Foucault (fclem) @Jeroen Bakker (jbakker) any idea what might cause this?

Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).Jul 17 2019, 12:05 PM

Probably totally unrelated, but I am getting this exact assert in T66745

Clément Foucault (fclem) lowered the priority of this task from 80 to Low.Jul 18 2019, 10:27 AM

Ok this is because the view3D is corrupted (somehow).

rv3d->camdx and rv3d->camdy are NaN in the file for this View3D leading to incorrect matrix calculation.

Workaround : The only way to reset them seems to be the "View Camera Center" operator.

Not sure how you ended up with this as theses values are clamped. Maybe zooming too much in camera view?

Not sure how to solve it either. Maybe some underflow/overflow protection at some level?

Sebastian Parborg (zeddb) added a comment.Jul 18 2019, 10:50 AM

@CarlG (CarlG) could you try to figure out what is causing this for you?
It will be quite hard for us to fix it if we do not have a way to reproduce it.

CarlG (CarlG) added a comment.Jul 18 2019, 9:50 PM

Workaround : The only way to reset them seems to be the "View Camera Center" operator.
What does the above mean? How would I execute this?

I can try zooming around, way too far and see if something happens.
Sorry, but I have no idea how it happens, and considering it only happened a couple of times I doubt it's going to be easy for me to reproduce as well.

Currently I add a new Workspace, but that ends up last and without stepwise relocating (only first and last) it's kinda annoying :)
But again, only a couple of times and not in important projects.

Clément Foucault (fclem) added a comment.Jul 19 2019, 12:55 AM

@CarlG (CarlG) "View Camera Center" is an operator. Search for it when in camera view after pressing F3 to invoke the search operator box.

CarlG (CarlG) added a comment.Jul 19 2019, 12:04 PM

Got it, thanks.

Dalai Felinto (dfelinto) removed Clément Foucault (fclem) as the assignee of this task.Dec 23 2019, 4:33 PM
Dalai Felinto (dfelinto) added a project: Tracker Curfew.
Emir Sinan Gürlek (filibis) closed this task as Archived.Jan 11 2020, 3:19 AM
Emir Sinan Gürlek (filibis) claimed this task.
Emir Sinan Gürlek (filibis) added a subscriber: Emir Sinan Gürlek (filibis).

I'm closing this as exact steps to reproduce the problem cannot be provided. Also the issue has a good workaround. Reopen if necessary.