Skip to content

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

Open
plopaur wants to merge 1 commit into
csete:masterfrom
plopaur:fix/double-mapview-segfault
Open

plopaur wants to merge 1 commit into
csete:masterfrom
plopaur:fix/double-mapview-segfault

Conversation

@plopaur

@plopaur plopaur commented Oct 29, 2026

Copy link
Copy Markdown

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant