On Mon, Oct 03, 2005 at 11:37:49AM +0200, Tom Parker wrote: > Sequence of events: > 1) run "aptitude dist-upgrade" > 2) get informed that because of conflicts, it can't upgrade > mozilla-thunderbird, press 'e' at "Accept this solution" prompt > 3) Enter mozilla-thunderbird package, select later version of > libpng12-0 (1.2.8rel-4), now lets me upgrade thunderbird to 1.0.7-1 > 4) Press 'g' at "resolve dependancies" screen, and accept the solution > that's been created > 5) segfault!
Looks like this assert is tripping: void decref() { assert(refcount > 0); --refcount; if(refcount == 0) cleanup(); } The actual line number that this was invoked from got optimized away, but it probably happens when solution_dialog::update() exits and the smart pointer to 'this' is destroyed. Could you apply the attached patch (which adds an assert to balance the other one -- the only widget with a zero reference count is a dead widget ;-) ) and see if it crashes in a different place? If not, something highly screwy is happening. Daniel
Mon Oct 3 19:21:06 PDT 2005 Daniel Burrows <[EMAIL PROTECTED]> * Disallow (assert against) the creation of strong references to widgets with a zero reference count. Since widgets are now created with a reference count of 1, it is now an invariant that every widget with a zero reference count is dead. diff -rN -u old-aptitude/src/vscreen/vscreen_widget.h new-aptitude/src/vscreen/vscreen_widget.h --- old-aptitude/src/vscreen/vscreen_widget.h 2005-10-03 19:22:32.000000000 -0700 +++ new-aptitude/src/vscreen/vscreen_widget.h 2005-10-03 19:06:23.000000000 -0700 @@ -179,6 +179,8 @@ public: void incref() { + assert(refcount > 0); + ++refcount; }