From: wolf Date: Tue, 14 Mar 2006 21:54:21 +0000 (+0000) Subject: Update with new stack trace demangler. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=281fd8ec13c3f8628242db53db5769f7f358d5e2;p=dealii-svn.git Update with new stack trace demangler. git-svn-id: https://svn.dealii.org/trunk@12587 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-5.data/results.html b/deal.II/doc/tutorial/chapter-2.step-by-step/step-5.data/results.html index 96efba7d9b..91dde64fa5 100644 --- a/deal.II/doc/tutorial/chapter-2.step-by-step/step-5.data/results.html +++ b/deal.II/doc/tutorial/chapter-2.step-by-step/step-5.data/results.html @@ -36,9 +36,8 @@ Cycle 5: Number of degrees of freedom: 20609 182 CG iterations needed to obtain convergence. -------------------------------------------------------- -An error occurred in line <326> of file <step-5.cc> in function - void Coefficient<dim>::value_list(const std::vector<Point<dim>, std::allocat -or<Point<dim> > >&, std::vector<double, std::allocator<double> >&, unsigned int) +An error occurred in line <273> of file <step-5.cc> in function + void Coefficient<dim>::value_list(const std::vector<Point<dim>, std::allocator<Point<dim> > >&, std::vector<double, std::allocator<double> >&, unsigned int) const [with int dim = 2] The violated condition was: values.size() == points.size() @@ -49,12 +48,8 @@ Dimension 1 not equal to 2 Stacktrace: ----------- -#0 ./step-5(_ZNK11CoefficientILi2EE10value_listERKSt6vectorI5PointILi2EESaIS3_E -ERS1_IdSaIdEEj+0x88) [0x416c0c] -#1 ./step-5(main+0x82) [0x41638a] -#2 /lib64/tls/libc.so.6(__libc_start_main+0xea) [0x2aaaac60254a] -#3 ./step-5(_ZN15DataOut_DoFDataILi2E10DoFHandlerLi2ELi2EE5clearEv+0x52) [0x416 -26a] +#0 ./step-5: Coefficient<2>::value_list(std::vector<Point<2>, std::allocator<Point<2> > > const&, std::vector<double, std::allocator<double> >&, unsigned) const +#1 ./step-5: main -------------------------------------------------------- make: *** [run] Aborted @@ -113,9 +108,8 @@ example. As for the error — let's look at it again:

 --------------------------------------------------------
-An error occurred in line <326> of file <step-5.cc> in function
-    void Coefficient<dim>::value_list(const std::vector<Point<dim>, std::allocat
-or<Point<dim> > >&, std::vector<double, std::allocator<double> >&, unsigned int)
+An error occurred in line <273> of file <step-5.cc> in function
+    void Coefficient<dim>::value_list(const std::vector<Point<dim>, std::allocator<Point<dim> > >&, std::vector<double, std::allocator<double> >&, unsigned int)
  const [with int dim = 2]
 The violated condition was: 
     values.size() == points.size()
@@ -126,19 +120,15 @@ Dimension 1 not equal to 2
 
 Stacktrace:
 -----------
-#0  ./step-5(_ZNK11CoefficientILi2EE10value_listERKSt6vectorI5PointILi2EESaIS3_E
-ERS1_IdSaIdEEj+0x88) [0x416c0c]
-#1  ./step-5(main+0x82) [0x41638a]
-#2  /lib64/tls/libc.so.6(__libc_start_main+0xea) [0x2aaaac60254a]
-#3  ./step-5(_ZN15DataOut_DoFDataILi2E10DoFHandlerLi2ELi2EE5clearEv+0x52) [0x416
-26a]
+#0  ./step-5: Coefficient<2>::value_list(std::vector<Point<2>, std::allocator<Point<2> > > const&, std::vector<double, std::allocator<double> >&, unsigned) const
+#1  ./step-5: main
 --------------------------------------------------------
 make: *** [run] Aborted
 

-What we see is that the error was triggered in line 326 of the +What we see is that the error was triggered in line 273 of the step-5.cc file (as we modify tutorial programs over time, these line numbers change, so you should check what line number you actually get in your output). That's already good information if you want to look up @@ -160,15 +150,14 @@ output again.

So now we know pretty exactly where the error happened and what went wrong. What we don't know yet is how exactly we got there. The -stacktrace at the bottom actually tells us what happened, though it -takes some training to read the mangled function names. What you -should be able to glean from this text is that the problem happened in +stacktrace at the bottom actually tells us what happened: the problem +happened in Coefficient::value_list (stackframe 0) and that it was called from main() (stackframe 1). In realistic programs, there would be many more functions in between these two. For example, we might have made the mistake in the assemble_system -function, in which stackframe 1 would be -LaplaceProblem<2>::assemble_system, stackframe 2 -would be LaplaceProblem<2>::run, and stackframe 3 +function, in which case stack frame 1 would be +LaplaceProblem<2>::assemble_system, stack frame 2 +would be LaplaceProblem<2>::run, and stack frame 3 would be main() — you get the idea.

diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/results.html b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/results.html index 57305cf6f7..1470588678 100644 --- a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/results.html +++ b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/results.html @@ -117,26 +117,24 @@ from this example.


 --------------------------------------------------------
-An error occurred in line <78> of file  in function
+An error occurred in line <79> of file <source/subscriptor.cc> in function
     virtual Subscriptor::~Subscriptor()
 The violated condition was: 
     counter == 0
 The name and call sequence of the exception was:
-    ExcInUse(counter, object_info->name(), infostring)
+    ExcInUse(counter, object_info->name(), infostring)
 Additional Information: 
 Object of class 4FE_QILi2EE is still used by 1 other objects.
   from Subscriber 10DoFHandlerILi2EE
 
 Stacktrace:
 -----------
-#0  /u/bangerth/p/deal.II/1/deal.II/lib/libbase.g.so(_ZN11SubscriptorD2Ev+0x25b) [0x2aaaabc62087]
-#1  /u/bangerth/p/deal.II/1/deal.II/lib/libdeal_II_2d.g.so(_ZN13FiniteElementILi2EED2Ev+0x3f6) [0x2aaaaaf85122]
-#2  ./step-6(_ZN7FE_PolyI24TensorProductPolynomialsILi2EELi2EED2Ev+0x58) [0x41ee28]
-#3  ./step-6(_ZN4FE_QILi2EED1Ev+0x58) [0x41b9ee]
-#4  ./step-6(_ZN14LaplaceProblemILi2EED1Ev+0x10d) [0x4162fb]
-#5  ./step-6(main+0x7d) [0x415da5]
-#6  /lib64/tls/libc.so.6(__libc_start_main+0xea) [0x2aaaac60254a]
-#7  ./step-6(_ZN15DataOut_DoFDataILi2E10DoFHandlerLi2ELi2EE5clearEv+0x52) [0x415c8a]
+#0  /u/bangerth/p/deal.II/1/deal.II/lib/libbase.g.so: Subscriptor::~Subscriptor()
+#1  /u/bangerth/p/deal.II/1/deal.II/lib/libdeal_II_2d.g.so: FiniteElement<2>::~FiniteElement()
+#2  ./step-6: FE_Poly<TensorProductPolynomials<2>, 2>::~FE_Poly()
+#3  ./step-6: FE_Q<2>::~FE_Q()
+#4  ./step-6: LaplaceProblem<2>::~LaplaceProblem()
+#5  ./step-6: main
 --------------------------------------------------------
 make: *** [run] Aborted
 
@@ -157,24 +155,8 @@ The one object that still uses the finite element is the

-The stacktrace gives an indication of where the problem happened. For -technical reasons, the present code only shows mangled function names, -but if you run the stacktrace through the c++filt -program, you will get something like this: -


-#0  /u/bangerth/p/deal.II/1/deal.II/lib/libbase.g.so(Subscriptor::~Subscriptor()+0x25b) [0x2aaaabc62087]
-#1  /u/bangerth/p/deal.II/1/deal.II/lib/libdeal_II_2d.g.so(FiniteElement<2>::~FiniteElement()+0x3f6) [0x2aaaaaf85122]
-#2  ./step-6(FE_Poly, 2>::~FE_Poly()+0x58) [0x41ee28]
-#3  ./step-6(FE_Q<2>::~FE_Q()+0x58) [0x41b9ee]
-#4  ./step-6(LaplaceProblem<2>::~LaplaceProblem()+0x10d) [0x4162fb]
-#5  ./step-6(main+0x7d) [0x415da5]
-#6  /lib64/tls/libc.so.6(__libc_start_main+0xea) [0x2aaaac60254a]
-#7  ./step-6(DataOut_DoFData<2, DoFHandler, 2, 2>::clear()+0x52) [0x415c8a]
-
-

- -

-In other words, we can now see that the exception was triggered in the +The stacktrace gives an indication of where the problem happened. We +see that the exception was triggered in the destructor of the FiniteElement class that was called through a few more functions from the destructor of the LaplaceProblem class, exactly where we have commented out