CGCookie / retopoflow

A suite of retopology tools for Blender
2.51k stars 249 forks source link

**[BUG]** Unhandled exception #1030

Open akomili opened 3 years ago

akomili commented 3 years ago

PLEASE READ THE FOLLOWING AND USE THE TEMPLATE TO POST YOUR ISSUE

Questions not directly related to the RetopoFlow project are considered general and should be posted elsewhere (e.g. git, blender, python, etc).

Before raising the issue, please check the following first:

 

Issue Template


Please prefix your issue name with one of the following: [BUG] [PROPOSAL] [QUESTION]

Retopoflow Version: {3.2.0}

Blender Version/Hash: {2.93.1}

Platform Version/Distribution: {Window 10}

 

Issue:

{*Crash dump:

Environment:

Error Hash: 606b94b3a9efab3cd905de03ed0e9409

Trace:

{image}

 

How to Reproduce:

{attach any files needed to replicate the issue}

vxlcoder commented 3 years ago

thanks for the report, @akomili!

does RetopoFlow do this every time? I am wondering if something else happened first, then this happened.

will take a closer look.

akomili commented 3 years ago

I couldn't reproduce it in a new project with a different mesh, but in this same project yes it happens every time. I don't recall doing anything other than selecting some of the faces and grabbing them away from the hi-poly mesh but it's possible I did something without realizing. I find a lot of the time the retopoflow polys go inside the hi-poly mesh and its a pain to fix. My hacky way is to go back to edit mode, move the polys to be outside the hi-poly mesh, then go back into retopology and snap selected under target cleaning. Is there a better way to do this?

On Mon, Jul 19, 2021 at 5:09 AM Jon Denning @.***> wrote:

thanks for the report, @akomili https://github.com/akomili!

does RetopoFlow do this every time? I am wondering if something else happened first, then this happened.

will take a closer look.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CGCookie/retopoflow/issues/1030#issuecomment-882496192, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHBACR2XLIL7P7UM2VFPSTTYQIY3ANCNFSM5AS4IUFQ .

A-Lamia commented 3 years ago

I have this issue with out neededing to go through any crazy steps open blender click cube press RF: New target on active and then i get this problem.

vxlcoder commented 3 years ago

@A-Lamia, if you're running on windows, could you cause that issue, close RetopoFlow, open the system console (under window blender menu option), and copy-paste everything you see if there here. it might be kind of long.

if you're running on Linux or OSX, let me know and I can get you more detailed instructions on starting from terminal.

thank you!

A-Lamia commented 3 years ago

@vxlcoder I did a full clean install (What i should have done first) and now have no issues at all.

vxlcoder commented 3 years ago

@A-Lamia, that's great to read! thanks for the report!

i'll keep that in mind when strange issues like this shows up again.

vxlcoder commented 3 years ago

@akomili, perhaps try a fresh install of RF, too? uninstall it in Blender. restart blender. install latest version. restart blender. then, see if you still get that issue on that .blend file.

akomili commented 3 years ago

I'm still having the issue after uninstalling and reinstalling RF. I took a video so you can see if I'm doing something wrong - https://streamable.com/7uaelx

I restarted Blender at the end and checked again (not shown in the video) but no luck.

Thanks

JadeCoffee commented 3 years ago

I believe to have found the solution to this. This is indeed, a giant bug relating to symmetry that should be fixed. If uninstalling/reinstalling RF does not work, please try activating symmetry as I demonstrated in this video: https://streamable.com/3zp2v7

Beyond this however, i still would not know how to fix the issue unfortunately. The solution has only worked for me, but the problem is JUST as the same as yours @akomili

akomili commented 3 years ago

Hey @JadeCoffee, unfortunately that didn't work for me, I still get the error after going through the same steps as shown in your video. One difference I see between our models is that mine was never symmetrical to begin and already had asymmetrical polys on both sides, not sure if that might be relevant

JadeCoffee commented 3 years ago

I fear that would've been the case... In that instance, i'm afraid i'm stooped! But it's definitely a strange bug that needs to be addressed in their future update. Terribly sorry this happened to you. I would try troubleshooting it just to see what exactly makes this error come up but I'm afraid i'm only using RF solely for retopo. I do not know how to work Blender otherwise, funnily enough.

vxlcoder commented 3 years ago

thank you for the videos, @akomili and @JadeCoffee!

can both of you please do the following:

there is likely something that is causing this issue for both of you, but RetopoFlow is only reporting a different issue.

dharness commented 3 years ago

I am experiencing the same issue - here are the logs from the system console:

Read prefs: C:\Users\Dylan Harness\AppData\Roaming\Blender Foundation\Blender\2.90\config\userpref.blend
found bundled python: C:\Program Files\Blender Foundation\Blender 2.90\2.90\python
GoB Found System:  Windows
Registered MACHIN3tools 0.8.0 with 1 tool, 1 pie menu
RetopoFlow: Initial load
Addon Common: (shaders) GLSL Version: 4.50 NVIDIA
RetopoFlow Shader Info: brushStrokeShader (1)
  attribs: vPos (0), vColor (1), vDistAccum (2)
  uniforms: uMVPMatrix (0)
RetopoFlow Shader Info: edgeShortenShader (4)
  attribs: vPos (0), vFrom (1), vColor (2), vRadius (3)
  uniforms: uScreenSize (1), uMVPMatrix (0)
RetopoFlow Shader Info: arrowShader (7)
  attribs: vPos (0), vFrom (1), vInColor (2), vOutColor (3)
  uniforms: uMVPMatrix (1), uInOut (0)
RetopoFlow Shader Info: circleShader (10)
  attribs: vPos (0), vInColor (1), vOutColor (2)
  uniforms: uMVPMatrix (1), uInOut (0)
Addon Common: compiling UI shader
Addon Common: batching for shader
Addon Common: UI shader initialized
RetopoFlow git: None
RetopoFlow options path: C:\Users\Dylan Harness\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\RetopoFlow\RetopoFlow_options.json
Addon Common: (bmesh_render) GLSL Version: 4.50 NVIDIA
cgcookie updater verbose is enabled
cgcookie Updater: Read in JSON settings from file
addon_updater_demo updater verbose is enabled
addon_updater_demo Updater: Read in JSON settings from file
Read blend: C:\Users\Dylan Harness\Desktop\plant_lg_retopo.blend
Addon Common Warning: could not translate blender op "3D View | view3d.viewnumpad" to actions (3D View->3D View, view3d.viewnumpad->view3d.viewnumpad)
Addon Common Warning: could not translate blender op "3D View | view2d.ndof" to actions (3D View->3D View, view2d.ndof->view2d.ndof)
Addon Common Warning: could not translate blender op "3D View | view3d.view_center_cursor" to actions (3D View->3D View, view3d.view_center_cursor->view3d.view_center_cursor)
RetopoFlow keymaps path: C:\Users\Dylan Harness\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\RetopoFlow\RetopoFlow_keymaps.json
RetopoFlow: setting up scaling factor
Unit scaling factor: 0.19323134422302246
RetopoFlow: scaling view, sources, and target by 5.18
Addon Common: Loaded font "C:\Users\Dylan Harness\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\RetopoFlow\addon_common\common\fonts\DroidSans-Blender.ttf" as id 3
RetopoFlow: Pausing help image preloading (1627575620.2619174)
RetopoFlow: Setting up target mesh (0.005998849868774414)
RetopoFlow: Setting up source mesh(es) (0.009998321533203125)
  rfsources...
  bboxes...
  drawing...
  done!
RetopoFlow: Setting up symmetry data structures (0.012997150421142578)
RetopoFlow: Setting up rotation target (0.005002021789550781)
RetopoFlow: Setting up RetopoFlow states (0.009999990463256836)
RetopoFlow: Setting up RetopoFlow tools (0.02799701690673828)
RetopoFlow: Setting up grease marks (0.03300023078918457)
RetopoFlow: Setting up visualizations (0.04500007629394531)
RetopoFlow: Setting up user interface (0.017000675201416016)
Caught exception when trying to bind to variable
exception: 'keyboard repeat delay'
globals: None
locals: None
____________________________________________________________________________________________________
Exception Info
- Time: 2021-07-29 12:20:25.382919
- Count: 1
- Hash: c85fb986290c3142536ffdc6628119f2
- Info:
  - EXCEPTION (<class 'AssertionError'>): BoundVar: value string ("options['keyboard repeat delay']") must be a valid variable!
  -     .../common\boundvar.py
  - 000 0047:__init__() assert False, f'BoundVar: value string ("{value_str}") must be a valid variable!'
  - 001 0197:__init__() super().__init__(value_str, frame_depth=frame_depth, **kwargs)
  -     <string>
  - 002 0001:<module>()
  -     .../common\ui_elements.py
  - 003 0312:get_next_tag() elif m_bound:                v = eval(v, f_globals, f_locals)
  - 004 0349:process() tag = get_next_tag(html, ui_cur, tab, hierarchy)
  - 005 0402:process() children, html = process(tag.post_html, ui_new, hierarchy+[tag.tname])
  - 006 0402:process() children, html = process(tag.post_html, ui_new, hierarchy+[tag.tname])
  - 007 0402:process() children, html = process(tag.post_html, ui_new, hierarchy+[tag.tname])
  - 008 0402:process() children, html = process(tag.post_html, ui_new, hierarchy+[tag.tname])
  - 009 0402:process() children, html = process(tag.post_html, ui_new, hierarchy+[tag.tname])
  - 010 0402:process() children, html = process(tag.post_html, ui_new, hierarchy+[tag.tname])
  - 011 0402:process() children, html = process(tag.post_html, ui_new, hierarchy+[tag.tname])
  - 012 0402:process() children, html = process(tag.post_html, ui_new, hierarchy+[tag.tname])
  - 013 0402:process() children, html = process(tag.post_html, ui_new, hierarchy+[tag.tname])
  - 014 0413:fromHTML() lui,rest = process(html, None)
  - 015 0213:fromHTMLFile() return cls.fromHTML(html, frame_depth=frame_depth+1, f_globals=f_globals, f_locals=f_locals)
  -     C:\Users\Dylan Harness\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\RetopoFlow\retopoflow\rf\rf_ui.py
  - 016 0332:setup_options() self.document.body.append_children(UI_Element.fromHTMLFile(abspath('options_dialog.html')))
  - 017 0410:setup_ui() setup_options()
  -     C:\Users\Dylan Harness\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\RetopoFlow\retopoflow\retopoflow.py
  - 018 0206:setup_next_stage() stage_fn()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Caught exception in function "setup_next_stage" (state:"loading", substate:"main")
____________________________________________________________________________________________________
Exception Info
- Time: 2021-07-29 12:20:25.387918
- Count: 2
- Hash: 7219be82d192c7240b189b71f56843f5
- Info:
  - EXCEPTION (<class 'AssertionError'>):
  -     C:\Users\Dylan Harness\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\RetopoFlow\retopoflow\retopoflow.py
  - 000 0209:setup_next_stage() assert False
  -     .../common\fsm.py
  - 001 0058:run() return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

CookieCutter_Exceptions._callback_exception_callbacks:
RF_UI.handle_exception
Addon Common: Loaded font "C:\Users\Dylan Harness\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\RetopoFlow\addon_common\common\fonts\DejaVuSansMono.ttf" as id 4
CookieCutter caught exception while calling back exception callbacks: handle_exception
____________________________________________________________________________________________________
Exception Info
- Time: 2021-07-29 12:20:25.711919
- Count: 3
- Hash: a63590c9a767d41cb6801afc93e2ef5a
- Info:
  - EXCEPTION (<class 'AttributeError'>): 'NoneType' object has no attribute '_reset'
  -     C:\Users\Dylan Harness\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\RetopoFlow\retopoflow\rf\rf_ui.py
  - 000 0066:handle_exception() self.rftool._reset()
  -     .../cookiecutter\cookiecutter_exceptions.py
  - 001 0044:_callback_exception_callbacks() fn(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Caught exception in state ("loading__main")
____________________________________________________________________________________________________
Exception Info
- Time: 2021-07-29 12:20:25.716919
- Count: 4
- Hash: 606b94b3a9efab3cd905de03ed0e9409
- Info:
  - EXCEPTION (<class 'AttributeError'>): 'FSM' object has no attribute '_reset_state'
  -     .../common\fsm.py
  - 000 0066:run() fsm.force_set_state(fsm._reset_state, call_exit=False, call_enter=True)
  - 001 0123:_call() return self._fsm_states[s](self._obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
CookieCutter_Exceptions._callback_exception_callbacks: 'FSM' object has no attribute '_reset_state'
RF_UI.handle_exception 'FSM' object has no attribute '_reset_state'
CookieCutter caught exception while calling back exception callbacks: handle_exception
____________________________________________________________________________________________________
Exception Info
- Time: 2021-07-29 12:20:25.807918
- Count: 5
- Hash: a63590c9a767d41cb6801afc93e2ef5a
- Info:
  - EXCEPTION (<class 'AttributeError'>): 'NoneType' object has no attribute '_reset'
  -     C:\Users\Dylan Harness\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\RetopoFlow\retopoflow\rf\rf_ui.py
  - 000 0066:handle_exception() self.rftool._reset()
  -     .../cookiecutter\cookiecutter_exceptions.py
  - 001 0044:_callback_exception_callbacks() fn(e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
GitHub: Not reported, yet
GitHub: Already reported!
vxlcoder commented 3 years ago

thanks for the details, @dharness!

the keyboard repeat delay option has been recently removed (in v3.2.0), but all references should have been removed, too. which version are you using here? did you use the RF updater to update? what was the previous version that you had installed prior to install? I'm wondering if the update didn't work completely...

Have you tried: uninstall RF, restart Blender, install latest RF, restart Blender?

dharness commented 3 years ago

Ah, yeah I've definitely got a few of these floating around in there. Looks like it was an issue with the updater (I believe I was on 3.1.0) - those are usually to good to be true :p

Manual reinstall of 3.2.0 fixes the issue

vxlcoder commented 3 years ago

thanks for the update, @dharness!

i'll poke around the updater to see if something seems amiss, but glad that a reinstall fixed the issue.

Framehacker commented 3 years ago

Hello, I run in to this issue too.

so i give my observation on this issue

It happens when i was working on the body of a character and it seams like miss with a tweak brush and unlucky hit the arm, what results in pushing some vertices so far away that blender, retopoflow or both freaks out and result in the shown above crash. I couldnt event select this broken vertices or faces and the mess was also only visible in top/side view but not if i free moved around. I only could fix that broken mesh after box select every Vertices not broken, duplicate, separate and than continue working on the separation.

akomili commented 3 years ago

Hi Jon

Sorry for the delay, here is the output from my System Console when that error occurs:

Read prefs: C:\Users\amy_o\AppData\Roaming\Blender Foundation\Blender\2.93\config\userpref.blend Registered Hair Tool RetopoFlow: Initial load Addon Common: (shaders) GLSL Version: 4.50 NVIDIA RetopoFlow Shader Info: brushStrokeShader (19) attribs: vPos (0), vColor (1), vDistAccum (2) uniforms: uMVPMatrix (0) RetopoFlow Shader Info: edgeShortenShader (22) attribs: vPos (0), vFrom (1), vColor (2), vRadius (3) uniforms: uScreenSize (1), uMVPMatrix (0) RetopoFlow Shader Info: arrowShader (25) attribs: vPos (0), vFrom (1), vInColor (2), vOutColor (3) uniforms: uMVPMatrix (1), uInOut (0) RetopoFlow Shader Info: circleShader (28) attribs: vPos (0), vInColor (1), vOutColor (2) uniforms: uMVPMatrix (1), uInOut (0) Addon Common: compiling UI shader Addon Common: batching for shader Addon Common: UI shader initialized RetopoFlow git: None RetopoFlow options path: C:\Users\amy_o\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\RetopoFlow\RetopoFlow_options.json No options file Addon Common: (bmesh_render) GLSL Version: 4.50 NVIDIA cgcookie updater verbose is enabled cgcookie Updater: Read in JSON settings from file DEBUG:root: restart_nodes() handler Read blend: E:\Blender\My 3D Models 2020\Feudal-SerfWorks Studios\Horses\Horse Armor Tier1\Amy_ArmoredHorse_Tier1.blend DEBUG:root: restart_nodes() handler Addon Common Warning: could not translate blender op "3D View | view3d.viewnumpad" to actions (3D View->3D View, view3d.viewnumpad->view3d.viewnumpad) Addon Common Warning: could not translate blender op "3D View | view2d.ndof" to actions (3D View->3D View, view2d.ndof->view2d.ndof) Addon Common Warning: could not translate blender op "3D View | view3d.view_center_cursor" to actions (3D View->3D View, view3d.view_center_cursor->view3d.view_center_cursor) RetopoFlow keymaps path: C:\Users\amy_o\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\RetopoFlow\RetopoFlow_keymaps.json RetopoFlow: setting up scaling factor Unit scaling factor: 2.6502683884610295e+37 RetopoFlow: scaling view, sources, and target by 0.00 Addon Common: Loaded font "C:\Users\amy_o\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\RetopoFlow\addon_common\common\fonts\DroidSans-Blender.ttf" as id 3 RetopoFlow: Pausing help image preloading (1628120242.8547776) RetopoFlow: Setting up target mesh (0.019004106521606445)


Exception Info

CookieCutter_Exceptions._callback_exception_callbacks: RF_UI.handle_exception Addon Common: Loaded font "C:\Users\amy_o\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\RetopoFlow\addon_common\common\fonts\DejaVuSansMono.ttf" as id 4 CookieCutter caught exception while calling back exception callbacks: handle_exception


Exception Info

On Fri, Jul 30, 2021 at 2:34 AM Framehacker @.***> wrote:

Hello, I run in to this issue too.

so i give my observation on this issue

It happens when i was working on the body of a character and it seams like miss with a tweak brush and unlucky hit the arm, what results in pushing some vertices so far away that blender, retopoflow or both freaks out and result in the shown above crash. I couldnt event select this broken vertices or faces and the mess was also only visible in top/side view but not if i free moved around. I only could fix that broken mesh after box select every Vertices not broken, duplicate, separate and than continue working on the separation.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CGCookie/retopoflow/issues/1030#issuecomment-889769176, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHBACXGB3HTRBPN67CQOZLT2JW3JANCNFSM5AS4IUFQ .

vxlcoder commented 3 years ago

Sorry for my extremely late reply, @akomili!

The very first report there (EXCEPTION (<class 'ValueError'>): Matrix.invert(ed): matrix does not have an inverse) should only occur if the target has a non-invertible transformation matrix (ex: one of the scale values is set to 0).

image

(note: this could potentially happen if a source object has a "bad" matrix too)

I can reproduce this error doing so, but that's a strange case for your target to be in. Can you verify what the transformation matrix looks like (or just a screenshot of the Transform panel like above)?

I will add a checker for such bad matrices..

vxlcoder commented 3 years ago

@JadeCoffee, your mirroring issue is separate from this particular issue. I'm not entirely sure yet what is causing it, but I have a pretty good idea. Can you share that blend file from your video with us so I can run a test? you can email it to retopoflow@cgcookie.com to keep it private.

vxlcoder commented 3 years ago

@akomili, commit 0b613ba adds warnings to the RF menu if an object has a non-invertible matrix, and it will gracefully allow you to start RF (but with undefined behaivor) if this warning shows.

akomili commented 3 years ago

Hi Jon

I just got around to checking the scale. Look at this! The left is the hi-poly mesh and the right is the retopoflow mesh.

On Thu, Aug 19, 2021 at 8:05 AM Jon Denning @.***> wrote:

Sorry for my extremely late reply, @akomili https://github.com/akomili!

The very first report there (EXCEPTION (<class 'ValueError'>): Matrix.invert(ed): matrix does not have an inverse) should only occur if the target has a non-invertible transformation matrix (ex: one of the scale values is set to 0).

[image: image] https://user-images.githubusercontent.com/3790699/130092355-3c6189e9-942c-4b77-82c7-7543c5bc8487.png

(note: this could potentially happen if a source object has a "bad" matrix too)

I can reproduce this error doing so, but that's a strange case for your target to be in. Can you verify what the transformation matrix looks like (or just a screenshot of the Transform panel like above)?

I will add a checker for such bad matrices..

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CGCookie/retopoflow/issues/1030#issuecomment-901992506, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHBACVWBLBBZHDL4NYEHU3T5UMSPANCNFSM5AS4IUFQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

vxlcoder commented 3 years ago

@akomili, did you want to add images?

akomili commented 3 years ago

Retopoflow dimensions

Oops yes.. You should be able to see it now