The general problem is that psppire-dialog-action-samps.h keeps a pointer to a struct variable, in the current dictionary, and this pointer persists between procedures. This is used to repopulate the dialog box on subsequent calls.
However, if a transformation is set, then the entire dictionary is cleared and repopulated. In most cases the variable will be replaced with an identical one. However this means that the pointer is no longer valid on the second call. One possible solution might be to keep the name of the variable instead of a pointer. I'm not sure that it's a very elegant solution however. J' On Sun, Jul 21, 2019 at 09:58:05AM -0700, Ben Pfaff wrote: Hi John! Commit d01a4986ffc8 ("Fix crash in gui, when T-TEST or ONEWAY while a filter is set.") makes dict_set_filter() ref the dict when setting a filter. This causes memory leaks in any test that sets a filter and does not later explicitly clear the filter: 318: save.at:47 SAVE -- delete unselected 320: save-translate.at:48 CSV output -- recode missing, delete unselected 321: save-translate.at:56 CSV output -- var names, formats 323: save-translate.at:77 CSV output -- custom delimiter, qualifier 324: save-translate.at:88 CSV output -- KEEP, RENAME 328: delete-variables.at:20 DELETE VARIABLES with FILTER 355: split-file.at:77 SPLIT FILE - vs procedures 684: regression.at:19 LINEAR REGRESSION - basic 729: sort-cases.at:100 SORT CASES preserves filtered cases 791: select-if.at:19 FILTER I imagine there must be some way to fix the crash in the GUI without adding memory leaks. Can you take a look? Thanks, Ben. -- Avoid eavesdropping. Send strong encrypted email. PGP Public key ID: 1024D/2DE827B3 fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key.
signature.asc
Description: PGP signature
_______________________________________________ pspp-dev mailing list pspp-dev@gnu.org https://lists.gnu.org/mailman/listinfo/pspp-dev