Dear Roy, I was able to overcome the problem with a little help from a friend. Basically what I did is replace “this->qrule->get_weights()” with “const_cast<const QBase *>(this->qrule)->get_weights()” and everything worked fine! I, however, still don’t understand why this would be necessary. In theory qrule already is a QBase pointer. Anyway, the following lines are where I needed to add the change: In fe_boundary.C (224 & 330) In fe.C (263)
I hope this helps in the future. Thank you very much for your patience and detailed help! –Barna > On 3 Mar 2017, at 22:30, Roy Stogner <[email protected]> wrote: > > > On Fri, 3 Mar 2017, Barna Becsek wrote: > >>> On 3 Mar 2017, at 17:47, Roy Stogner <[email protected]> wrote: >>> >>> On Fri, 3 Mar 2017, Barna Becsek wrote: >>> >>>>> On 3 Mar 2017, at 17:28, Roy Stogner <[email protected]> wrote: >>>>> >>>>> What is &qw and how does it compare to &(this->qrule->_weights) a >>>>> level up? It could be that the pointer underlying that reference got >>>>> scribbled on. >>>> >>>> &qw is 0x11c20a8 and >>>> &(this->qrule->_weights) is 0x11c20c8 >>>> >>>> I guess you were right, they are not the same address. >>> >>> What does elem->have_affine_map() return? true, I assume? It looks >>> as if compute_affine_map() and dependencies are the only places we >>> could be trashing the stack? >> >> Yes, elem->has_affine_map() always returns true in any point in the stack >> after where there is an elem instance. >> Is there anywhere else I can dig around? > > If it really is the first element that's triggering the corruption, > then this might not be impossible to debug. > > You could set a break point in FEProblemBase.C:3124, then after that > at FE.C:263, and if that's at the broken element then you'll be there > *pre*-breakage. Start stepping into functions, keep checking &qw and > &(this->qrule->_weights), and as soon as the former changes you'll > know you hit your stack-smashing line of code. > > I hope... elem->has_affine_map() is the only obvious hunk of tricky > code in between putting qw on the stack and using it in corrupted > form. But that's a *const* method, with no "mutable" tricks under the > hood, so it really shouldn't be possible for it to corrupt anything > else in memory. > --- > Roy ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
