Comments (4)
I suspect a reference counting issue.
If one tell me how to rebuild pstats with debug symbols without rebuilding the whole Panda3D source I will provide a more useful stack trace.
With makepanda, you can just delete the files containing "pstatserver" as well as "pstats_composite1.o" in built/tmp (don't delete the client related files) and then rebuild with export CXXFLAGS=-ggdb
set.
from panda3d.
With makepanda, you can just delete the files containing "pstatserver" as well as "pstats_composite1.o" in built/tmp (don't delete the client related files) and then rebuild with
export CXXFLAGS=-ggdb
set.
Thanks, it's much faster using that !
I suspect a reference counting issue.
With the debugger I see the code crashes when the first label is removed from the _status_bar
container :
But the widget instance seems still referenced :
(gdb) p *label $5 = {parent_instance = {g_type_instance = {Python Exception No type named TypeNode.: g_class = }, ref_count = 1, qdata = 0x555555cc7300}, priv = 0x555555891970}
I also noticed a log error when the "Wating for connection" label is removed :
(pstats:38272): GLib-CRITICAL **: 21:53:56.852: g_sequence_remove: assertion 'iter != NULL' failed
Digging a bit, it seems this is a bug in GTK, see https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2029, but Ubuntu 20.04 is still shipping with version 3.24.20-0ubuntu1.1 which does not include it.
from panda3d.
So, could we work around it by retaining a reference ourselves? That means, whenever we add it to _status_bar_labels
, we do this:
_status_bar_labels.push_back(label);
g_object_ref(label);
And then, in the destructor:
for (GtkWidget *label : _status_bar_labels) {
gtk_container_remove(GTK_CONTAINER(_status_bar), label);
g_object_unref(label);
}
Could you try this?
from panda3d.
It does not work directly as GtkFlowBox
can not contain GtkWidget
but only GtkFlowBoxChild
instances. If one call gtk_container_add
on a GtkFlowBox
instance, it will creates a hidden instance of GtkFlowBoxChild
and add the received widget as child (See https://docs.gtk.org/gtk3/class.FlowBox.html)
So I have modified the code to explicitly create a GtkFlowBoxChild
instance for each label created and increased the ref count as you suggested and it worked :)
I'm cleaning up the code and will submit a PR shortly.
from panda3d.
Related Issues (20)
- Reimplement core functionality of DIRECT in C++ codebase HOT 1
- Cppparser preprocessor do not expand macros with arguments correctly HOT 94
- bam_model_extensions changes external path references in distributions
- FSM object has no attribute 'notifier' in requestNext/requestPrev
- Importing Pyrender with Panda3D results in the code not processing HOT 1
- Triangulator running out of memory HOT 1
- Interrogate limitations
- PandAI website link in the manual is broken, navmesh converter source "BlenderMeshGen.py" is lost. HOT 1
- DirectEntry with both backgroundFocus=1 and overflow=1 leave hanging events after being destroyed, causing a segmentation fault HOT 2
- Generated interrogate wrapper is not deterministic on macOS HOT 1
- PNMImage.flip() documentation doesn't match method, can't transpose with x/y mirror HOT 2
- Type Definition for functions and methods HOT 2
- Actor Animation Problem HOT 2
- Bam cache should remember loader used
- PStats: Scrubbing Through Flame-Charts
- Implement Khronos' reference PBR tone mapping operator HOT 3
- `Python 3.12.3`: No found distribution for panda3d HOT 3
- More Filters in Common Filters
- Issues using makewheel with CMake
- Is this license a BSD one or a different one? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from panda3d.