I use manual rendering because I need to take a screenshot after every couple of changes that happen in the scene.
fb_prop = FrameBufferProperties()
fb_prop.setRgbaBits(8, 8, 8, 0)
win_prop = WindowProperties.size(frame["width"], frame["height"])
window = base.graphicsEngine.makeOutput(
base.pipe, "", 0, fb_prop,
disp_region = window.makeDisplayRegion()
scr_s = window.getScreenshot()
problem is that it occasionally stops the process after an arbitrary amount of renders, with
exit code 137.
According to the internet it’s a memory issue.
It sometimes happens after
graphicsEngine.makeOutput and sometimes after
graphicsEngine.renderFrame, so I looked it up and found this:
12:32AM - 04 Apr 19 UTC
11:38AM - 05 Apr 19 UTC
Python version: 3.6.7
Panda3d version: 1.10.1
Problem: Memory leaks at a rat
I added these to the
.prc file as recommended
but it didn’t help.
Which version of Panda3D are you using? On which operating system?
Are you creating a new buffer every time you want to render something? If so, are you deleting the buffer using
I am using Panda3D version 1.10.11
Yes I am creating a new buffer for every render,
And no I am not, didn’t occur to me
I was counting on some pythonic blood magic (or garbage collector)
I’ll try that
It worked! thank you
base.graphicsEngine.removeWindow(window) at the end of my screenshot function but I’m still getting an error for some reason at
:linmath(warning): Tried to invert singular LMatrix4.
Assertion failed: has_mat() at line 461 of built1.10/include/transformState.I
AssertionError: has_mat() at line 461 of built1.10/include/transformState.I
For the record, I don’t have anything with scale 0 (saw this issue somewhere on this forum)
Could you perhaps have something that is altering the scale of an object, and that might perhaps alter it to zero? (For example, an element that causes an object to smoothly scale down over time.)
Alternatively, do you perhaps have any code that takes a scale as a parameter, and that might possibly be being passed a value of zero?
I’ve had both of those, as I recall.