Seg fault in python API function renderdoc.ExecuteAndInject
Abdul-AZ opened this issue · comments
Description
Reproducible crash happens when calling the function renderdoc.ExecuteAndInject with the env parameter set as None.
Steps to reproduce
- Open
python interactive shell -> run script
in latest build - Execute the function with the env parameter as None. Ex:
renderdoc.ExecuteAndInject('/bin/blender', '', '', None, '', renderdoc.GetDefaultCaptureOptions(), False)
Passing an empty list avoids the crash
renderdoc.ExecuteAndInject('/bin/blender', '', '', [], '', renderdoc.GetDefaultCaptureOptions(), False)
Reproducing with gdb produces the following output
Thread 23 "Python script" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffd1e006c0 (LWP 127228)]
0x00005555560b804a in rdcarray<EnvironmentModification>::size (this=0x0)
at ../../renderdoc/api/replay/rdcarray.h:199
199 size_t size() const { return usedCount; }
(gdb)
Ran on the latest build (e249981)
Environment
- RenderDoc version: 1.31 (reproducible in source build 1.32 Unstable)
- Operating System: Arch Linux x86_64 (kernel 6.8.1-arch1-1) AMD drivers
- Graphics API: 4.6 Reproducible in various versions of OpenGL/ Likely unrelated
If you've passed a wrong parameter to the function then this isn't a bug in RenderDoc. The documentation states that this parameter should be List[EnvironmentModification]
, None
is not a valid value to pass.
I know the parameter is wrong but I just thought it should fail more gracefully (instead of instantly crashing the whole application and possibly losing data)
Apologies for the inconvenience, just thought it was something worth pointing out.