Skip to content

Fix crash when closing one of several map views - #438

Merged
csete merged 1 commit into
csete:masterfrom
plopaur:fix/double-mapview-segfault
Nov 1, 2026
Merged

csete merged 1 commit into
csete:masterfrom
plopaur:fix/double-mapview-segfault

Conversation

@plopaur

@plopaur plopaur commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

The footprint scratch buffers were file-level statics shared by all GtkSatMap instances. Every new map reallocated them (leaking the old ones) and destroying any map freed them and set them to NULL, so the remaining maps segfaulted in calculate_footprint() on their next update, e.g. after closing one of two open copies of the same module.

Make the buffers per-instance members of GtkSatMap.

replicate by open the module "Amateur" twice then close one of the two modules.

The footprint scratch buffers were file-level statics shared by all
GtkSatMap instances. Every new map reallocated them (leaking the old
ones) and destroying any map freed them and set them to NULL, so the
remaining maps segfaulted in calculate_footprint() on their next update,
e.g. after closing one of two open copies of the same module.

Make the buffers per-instance members of GtkSatMap.
@csete

csete commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Thanks for the patch. This was probably introduced while migrating to native GTK3/Cairo drawing.

@csete
csete merged commit 7dc1e96 into csete:master Nov 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants