Your message dated Mon, 02 Jun 2025 17:22:20 +0000
with message-id <e1um8rc-003ydy...@respighi.debian.org>
and subject line unblock dia
has caused the Debian Bug report #1106773,
regarding unblock: dia/0.98+git20250126-2
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
1106773: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1106773
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Control: affects -1 + src:dia
X-Debbugs-Cc: d...@packages.debian.org
User: release.debian....@packages.debian.org
Usertags: unblock
Severity: normal
Please unblock package dia
[ Reason ]
Upstream accepted recently two patches which fix bugs reported via BTS:
- Improve antialiasing of PNG export
(https://gitlab.gnome.org/GNOME/dia/-/merge_requests/138,
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1101347)
- Fix crash when launching Dia with PYTHONDEVMODE=1
(https://gitlab.gnome.org/GNOME/dia/-/merge_requests/137,
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1101349)
[ Impact ]
If the unblock isn't granted, PNG export will be lacking antialiasing
during the next Debian release cycle, and Dia will continue crashing
when PYTHONDEVMODE=1 is set (the latter being less critical IMHO).
[ Tests ]
Unfortunately, dia doesn't provide tests and there are no autopkgtests.
I tested manually the changes in a clean Debian unstable VM.
The corresponding pipeline in Salsa is successful:
https://salsa.debian.org/debian/dia/-/pipelines/871718
[ Risks ]
Code changes for these two fixes are small, written by me (package
maintainer), tested in a clean Debian unstable VM, and are approved and
merged upstream by upstream maintainer. Hence, I'm quite confident these
changes should not introduce (more important) bugs.
Dia is (almost) a leaf package and has relatively small popcon, so the
impact of introducing new bugs will be minor.
[ Checklist ]
[x] all changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in testing
[ Other info ]
This is the first time I request an unblock for a package during a
freeze, I hope I didn't do any mistake.
Upstream hasn't published new releases for a long time, so I regularly
update the Debian package to the most recent upstream commit. I didn't
proceed this way for this (pending) upload, since upstream Git has
additional commits unrelated to the targeted bugs.
I'm waiting for your approval to upload the changes to unstable,
meanwhile the changes are in the debian/trixie branch of the Salsa
repository: https://salsa.debian.org/debian/dia/-/commits/debian/trixie.
Thanks for considering and for your work,
Philippe.
unblock dia/0.98+git20250126-2
diff -Nru dia-0.98+git20250126/debian/changelog
dia-0.98+git20250126/debian/changelog
--- dia-0.98+git20250126/debian/changelog 2025-02-04 22:34:03.000000000
+0100
+++ dia-0.98+git20250126/debian/changelog 2025-05-29 14:32:30.000000000
+0200
@@ -1,3 +1,10 @@
+dia (0.98+git20250126-2) unstable; urgency=medium
+
+ * Add upstream patch to fix crash with PYTHONDEVMODE=1 Closes: #1101349
+ * Add upstream patch to improve antialiasing for PNG export Closes: #1101347
+
+ -- Philippe SWARTVAGHER <phil.sw...@gmx.fr> Thu, 29 May 2025 14:32:30 +0200
+
dia (0.98+git20250126-1) unstable; urgency=medium
* New upstream snapshot
diff -Nru dia-0.98+git20250126/debian/patches/fix-pythondevmode-crash.patch
dia-0.98+git20250126/debian/patches/fix-pythondevmode-crash.patch
--- dia-0.98+git20250126/debian/patches/fix-pythondevmode-crash.patch
1970-01-01 01:00:00.000000000 +0100
+++ dia-0.98+git20250126/debian/patches/fix-pythondevmode-crash.patch
2025-05-29 14:31:40.000000000 +0200
@@ -0,0 +1,78 @@
+From 2b86bfc8428d541427b419fb9b0c9187bad00fea Mon Sep 17 00:00:00 2001
+From: Philippe SWARTVAGHER <phil.sw...@gmx.fr>
+Date: Sat, 29 Mar 2025 19:03:05 +0100
+Subject: [PATCH] Fix crash with PYTHONDEVMODE=1
+Forwarded: https://gitlab.gnome.org/GNOME/dia/-/merge_requests/137
+
+`PYTHONDEVMODE=1 ./dia` segfaults between splash screen and main window:
+```
+Debug memory block at address p=0x55ca41354dd0: API '!'
+ 0 bytes originally requested
+ The 7 pad bytes at p-7 are not all FORBIDDENBYTE (0xfd):
+ at p-7: 0x00 *** OUCH
+ at p-6: 0x00 *** OUCH
+ at p-5: 0x00 *** OUCH
+ at p-4: 0x00 *** OUCH
+ at p-3: 0x00 *** OUCH
+ at p-2: 0x00 *** OUCH
+ at p-1: 0x00 *** OUCH
+ Because memory is corrupted at the start, the count of bytes requested
+ may be bogus, and checking the trailing pad bytes may segfault.
+ The 8 pad bytes at tail=0x55ca41354dd0 are not all FORBIDDENBYTE (0xfd):
+ at tail+0: 0x64 *** OUCH
+ at tail+1: 0x00 *** OUCH
+ at tail+2: 0x00 *** OUCH
+ at tail+3: 0x00 *** OUCH
+ at tail+4: 0x69 *** OUCH
+ at tail+5: 0x00 *** OUCH
+ at tail+6: 0x00 *** OUCH
+ at tail+7: 0x00 *** OUCH
+
+Enable tracemalloc to get the memory block allocation traceback
+
+Fatal Python error: _PyMem_DebugRawFree: bad ID: Allocated using API '!',
verified using API 'r'
+Python runtime state: initialized
+
+Current thread 0x00007faee96adac0 (most recent call first):
+ <no Python frame>
+zsh: IOT instruction env PYTHONDEVMODE=1 dia
+```
+
+This change mimics more what is done in the documentation
+(https://docs.python.org/3/c-api/init_config.html#initialization-with-pyconfig)
+and fixes the crash.
+
+Original bug report: https://bugs.debian.org/1101349
+---
+ plug-ins/python/python.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/plug-ins/python/python.c b/plug-ins/python/python.c
+index 236ab7349..bfb921850 100644
+--- a/plug-ins/python/python.c
++++ b/plug-ins/python/python.c
+@@ -85,7 +85,6 @@ dia_py_plugin_unload (PluginInfo *info)
+ PluginInitResult
+ dia_plugin_init (PluginInfo *info)
+ {
+- wchar_t name[] = L"dia\0";
+ char *python_argv[] = { "dia-python", NULL };
+ char *startup_file;
+ FILE *fp;
+@@ -109,8 +108,11 @@ dia_plugin_init (PluginInfo *info)
+ PyImport_AppendInittab ("dia", &PyInit_dia);
+
+ PyConfig_InitPythonConfig (&config);
+- config.program_name = malloc (sizeof (name));
+- memcpy (config.program_name, &name, sizeof (name));
++
++ status = PyConfig_SetString(&config, &config.program_name, L"dia");
++ if (PyStatus_Exception (status)) {
++ goto failed;
++ }
+
+ status = PyConfig_SetBytesArgv (&config, 1, python_argv);
+ if (PyStatus_Exception (status)) {
+--
+GitLab
+
diff -Nru dia-0.98+git20250126/debian/patches/series
dia-0.98+git20250126/debian/patches/series
--- dia-0.98+git20250126/debian/patches/series 2025-02-03 23:23:10.000000000
+0100
+++ dia-0.98+git20250126/debian/patches/series 2025-05-29 14:32:30.000000000
+0200
@@ -4,3 +4,5 @@
fix-libdia-install-dir.patch
revert_xpm_loader_replacement.patch
use-gtkfontbutton.patch
+fix-pythondevmode-crash.patch
+use-png-antialiasing.patch
diff -Nru dia-0.98+git20250126/debian/patches/use-png-antialiasing.patch
dia-0.98+git20250126/debian/patches/use-png-antialiasing.patch
--- dia-0.98+git20250126/debian/patches/use-png-antialiasing.patch
1970-01-01 01:00:00.000000000 +0100
+++ dia-0.98+git20250126/debian/patches/use-png-antialiasing.patch
2025-05-29 14:29:30.000000000 +0200
@@ -0,0 +1,36 @@
+From 7464514c3bcc10313b8febebcd8d91d5f0acb207 Mon Sep 17 00:00:00 2001
+From: Philippe SWARTVAGHER <phil.sw...@gmx.fr>
+Date: Thu, 15 May 2025 23:01:23 +0200
+Subject: [PATCH] Use antialiasing for Cairo renderer
+Forwarded: https://gitlab.gnome.org/GNOME/dia/-/merge_requests/138
+
+Fix #566
+
+Antialiasing was disabled in commit
+773b2bdbf5297f2ce76cd19ab0961c6876dc6d54, to avoid blurry UML diagrams
+(according to the commit message).
+
+It seems today enabling antialiasing doesn't make blurry UML diagrams
+anymore, and produces prettier basic shapes (like circles), so we can
+enable it by default.
+---
+ lib/renderer/diacairo-renderer.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/lib/renderer/diacairo-renderer.c
b/lib/renderer/diacairo-renderer.c
+index 5026dad33..0edd6b434 100644
+--- a/lib/renderer/diacairo-renderer.c
++++ b/lib/renderer/diacairo-renderer.c
+@@ -124,8 +124,7 @@ dia_cairo_renderer_begin_render (DiaRenderer *self, const
DiaRectangle *update)
+ cairo_translate (renderer->cr, -renderer->dia->extents.left + onedu,
-renderer->dia->extents.top + onedu);
+ }
+ }
+- /* no more blurred UML diagrams */
+- cairo_set_antialias (renderer->cr, CAIRO_ANTIALIAS_NONE);
++ cairo_set_antialias (renderer->cr, CAIRO_ANTIALIAS_BEST);
+
+ /* clear background */
+ if (renderer->dia) {
+--
+GitLab
+
--- End Message ---
--- Begin Message ---
Unblocked dia.
--- End Message ---