baldurk / renderdoc

RenderDoc is a stand-alone graphics debugging tool.
https://renderdoc.org
MIT License
8.62k stars 1.3k forks source link

Seg fault in python API function renderdoc.ExecuteAndInject #3274

Closed Abdul-AZ closed 3 months ago

Abdul-AZ commented 3 months ago

Description

Reproducible crash happens when calling the function renderdoc.ExecuteAndInject with the env parameter set as None.

Steps to reproduce

Passing an empty list avoids the crash

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

baldurk commented 3 months ago

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.

Abdul-AZ commented 3 months ago

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.