From: bugzilla-daemon@freedesktop.org Subject: [Bug 26999] _mesa_reference_renderbuffer: Assertion `oldRb->Magic == 0xaabbccdd' failed Date: Tue, 17 Aug 2010 04:13:57 -0700 (PDT) Message-ID: <20100817111357.E91BF1300E7@annarchy.freedesktop.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from annarchy.freedesktop.org (annarchy.freedesktop.org [131.252.210.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 1826E9E808 for ; Tue, 17 Aug 2010 04:13:58 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org https://bugs.freedesktop.org/show_bug.cgi?id=26999 --- Comment #6 from Julien Viard de Galbert 2010-08-17 04:13:57 PDT --- Well I don't think 'make clean' will rewrite the code, also I did build it by rebuilding the debian package, and generally this starts by a 'make clean'. Note that I did rebuild the debian package, not the latest of your code, but according to git [1] today's struct via_context has not changed much. [1] http://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/drivers/dri/unichrome/via_context.h#n154 The problem come from the 'struct via_renderbuffer' inside this structure (line 160-164) also line 159 explicitly says it should not be here, so the writer somehow new this was not that clean. What my gdb session showed is that the 'struct via_context' get freed while there are still some reference to the 'struct via_renderbuffer'. So when the references gets cleared, the assert occurs because the referenced 'struct via_renderbuffer' has already been freed. (for more details, go and actually read my post on debian bts). Maybe the caller should not make the 'struct via_context' be freed in the first place, however 'struct via_renderbuffer' use a smart reference counting (inherited from the 'struct gl_renderbuffer') so if it was referenced properly this would not append. I propose to replace the 'struct via_renderbuffer' inside 'struct via_context' by pointers and use the proper reference counting. If this is the right direction, I'll try to provide a patch. However the comment on line 159 sound more like there should not be 'via_renderbuffer' here at all... So if someone can point me to the relevant documentation (to get more insight on how it should be done) I'll work on it. -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.