On Thu, Mar 3, 2016 at 9:06 AM, Lance Dillon riffraff169@yahoo.com wrote:
Guessing that since win and btn go out of scope at end of main(), maybe they get cleaned up? I usually set things that need to persist into backend past main as global variables, or at least i have in the past.
That part shouldn't be a problem. In the original code that this is cut down from, those objects were indeed persisted elsewhere; and the GTK signal retains references anyway.
Odd discovery: Now that I'm on my laptop, I can't trigger the segfault. That might mean the corruption's still there but just doesn't happen to crash anything, or it might mean there's a real and significant difference. Both systems are using fairly recent builds of Pike 8.1, and updating the laptop to the very latest didn't start the segfaults. Strange. But it means I can't do the quick and obvious verification you mention until I get home.
ChrisA