Added simple test scripts and packaging information, as well as

debugging tips.
This commit is contained in:
Markus Rosenstihl
2026-03-09 13:58:07 +01:00
parent 8e1245e0f0
commit 2fa5f5aa64
7 changed files with 70 additions and 34 deletions
+12
View File
@@ -0,0 +1,12 @@
# 1. disable any possible re-launch
GIO_USE_VFS=local # stop gvfs daemonising
GSETTINGS_BACKEND=memory # dont spawn dconf-service
# 2. ask glib to abort on the first warning so nothing can “eat” it
G_DEBUG=fatal-warnings # or =fatal-criticals
# 3. turn on *all* debug domains
G_MESSAGES_DEBUG=all
# 4. run inside gdb so we can see the exact line that fails
gdb -ex run --args python3 src/gui/DamarisGUI.py
+8
View File
@@ -0,0 +1,8 @@
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
print("GTK imported successfully")
win = Gtk.Window()
win.connect("destroy", Gtk.main_quit)
win.show_all()
Gtk.main()
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env python3
import os
import sys
# 1) force GTK3 backend *before* pyplot is imported
os.environ['MPLBACKEND'] = 'GTK3Agg' # or GTK3Cairo
# 2) turn on every debug message GLib/GTK will give us
os.environ['G_MESSAGES_DEBUG'] = 'all'
os.environ['GTK_DEBUG'] = 'interactive' # also enables Ctrl-Shift-I inspector
import matplotlib
matplotlib.use('GTK3Agg') # belt-and-braces: make sure
import matplotlib.pyplot as plt
print('GTK3Agg backend loaded, creating figure…')
fig, ax = plt.subplots()
ax.plot([0, 1], [0, 1])
ax.set_title('GTK3-Matplotlib window close it to finish')
print('Showing figure…')
plt.show()
print('plt.show() returned script ends')
View File
View File