Skip to content

fix: Fixes message in the console when clearing a session#1177

Open
mcoliver wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
mcoliver:fix-cleanup-session-error-message-when-clearing-scene
Open

fix: Fixes message in the console when clearing a session#1177
mcoliver wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
mcoliver:fix-cleanup-session-error-message-when-clearing-scene

Conversation

@mcoliver
Copy link
Contributor

@mcoliver mcoliver commented Mar 3, 2026

Not sure why I was not seeing this before because it looks like the code has been in there a while, however with a clean build of RV I was seeing these things in the RV Console. This fix ensures it's in a try loop so those things don't appear.

File "/Users/moliver/dev/_openrv/OpenRV/_build/stage/app/RV.app/Contents/PlugIns/Python/multiple_source_media_rep.py", line 506, in _on_force_update_media_info
   self._update_media_info(event)
 File "/Users/moliver/dev/_openrv/OpenRV/_build/stage/app/RV.app/Contents/PlugIns/Python/multiple_source_media_rep.py", line 444, in _update_media_info
   sources = rvc.sourcesAtFrame(rvc.frame())
                                ^^^^^^^^^^^
Exception: Exception thrown while calling commands.frame -- exception: "nil argument to function" Traceback (most recent call last):
 File "/Users/moliver/dev/_openrv/OpenRV/_build/stage/app/RV.app/Contents/PlugIns/Python/multiple_source_media_rep.py", line 506, in _on_force_update_media_info
   self._update_media_info(event)
 File "/Users/moliver/dev/_openrv/OpenRV/_build/stage/app/RV.app/Contents/PlugIns/Python/multiple_source_media_rep.py", line 444, in _update_media_info
   sources = rvc.sourcesAtFrame(rvc.frame())
                                ^^^^^^^^^^^
Exception: Exception thrown while calling commands.frame -- exception: "nil argument to function"

Linked issues

Summarize your change.

Describe the reason for the change.

Describe what you have tested and on which operating system.

Add a list of changes, and note any that might need special attention during the review.

If possible, provide screenshots.

@mcoliver mcoliver marked this pull request as ready for review March 3, 2026 21:42
- Resolves 'nil argument to function' exceptions in lambdas bound to
  before/after-graph-view-change events in mode_manager.mu, wipes.mu,
  and transform_manip.mu.
- Fixes rvc.frame() throwing exceptions on an empty session in
  multiple_source_media_rep.py and its utilities.
Signed-off-by: Michael Oliver <mcoliver@gmail.com>
@mcoliver mcoliver force-pushed the fix-cleanup-session-error-message-when-clearing-scene branch from d1ba536 to 152da1c Compare March 3, 2026 22:20
@mcoliver
Copy link
Contributor Author

mcoliver commented Mar 4, 2026

@bernie-laberge I think this should do the trick on clearing those messages and errors when clearing a session

mcoliver referenced this pull request Mar 4, 2026
#1185)

### Revert fix: Fix crashes when calling sourcesAtFrame when clearing

### Linked issues
NA

### Summarize your change.

Reverted this commit to fix regression:

02a537b

### Describe the reason for the change.

The commit that is being reverted in this commit caused a regression.
The following errors when clearing an RV session:
```
ERROR: event = before-graph-view-change
ERROR: function = __lambdac96 (void; Event event)
ERROR: Exception Value: exception: "nil argument to function"
ERROR: event = after-graph-view-change
ERROR: function = __lambdadd8 (void; Event event)
ERROR: Exception Value: exception: "nil argument to function"
ERROR: event = graph-node-inputs-changed
ERROR: function = __lambdadd9 (void; Event event)
ERROR: Exception Value: exception: "nil argument to function"
Traceback (most recent call last):
 File "/private/var/folders/10/sd1gk1s527bfkdmmlbg7352c0000gn/T/AppTranslocation/919C640B-34AC-4B5F-A9AE-D30F60636CDB/d/RV.app/Contents/PlugIns/Python/source_setup.py", line 505, in checkForDisplayGroup
   if commands.nodeType(event.contents()) == "RVDisplayGroup":
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception: Exception thrown while calling commands.nodeType -- exception: "nil argument to function"
Traceback (most recent call last):
 File "/private/var/folders/10/sd1gk1s527bfkdmmlbg7352c0000gn/T/AppTranslocation/919C640B-34AC-4B5F-A9AE-D30F60636CDB/d/RV.app/Contents/PlugIns/Python/source_setup.py", line 505, in checkForDisplayGroup
   if commands.nodeType(event.contents()) == "RVDisplayGroup":
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception: Exception thrown while calling commands.nodeType -- exception: "nil argument to function"
```

### Describe what you have tested and on which operating system.
Successfully tested on macOS 

### Add a list of changes, and note any that might need special
attention during the review.

### If possible, provide screenshots.

Signed-off-by: Bernard Laberge <bernard.laberge@autodesk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant