{"id":127,"date":"2019-11-06T09:23:08","date_gmt":"2019-11-06T09:23:08","guid":{"rendered":"http:\/\/www.derniercriweb.solutions\/bury-blog\/?p=127"},"modified":"2026-04-08T12:27:05","modified_gmt":"2026-04-08T11:27:05","slug":"stack-trace","status":"publish","type":"post","link":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/2019\/11\/06\/stack-trace\/","title":{"rendered":"Stack trace"},"content":{"rendered":"\n<p class=\"has-drop-cap\">In&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Computing\">computing<\/a>, a&nbsp;<strong>stack trace<\/strong>&nbsp;(also called&nbsp;<strong>stack backtrace<\/strong>&nbsp;or&nbsp;<strong>stack traceback<\/strong>) is a report of the active&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Stack_frame\">stack frames<\/a>&nbsp;at a certain point in time during the execution of a&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Computer_program\">program<\/a>. When a program is run, memory is often dynamically allocated in two places; the stack and the heap. Memory is continuously allocated on a stack but not on a heap, thus reflective of their names. Stack also refers to a programming construct, thus to differentiate it, this stack is referred to as the program&#8217;s&nbsp;<strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/Runtime_stack\">runtime stack<\/a><\/strong>. Technically, once a block of memory has been allocated on the stack, it cannot be easily removed as there can be other blocks of memory that were allocated before it. Each time a function is called in a program, a block of memory is allocated on top of the runtime stack called the&nbsp;<strong>activation record<\/strong>&nbsp;(or stack pointer.) At a high level, an activation record allocates memory for the function&#8217;s parameters and local variables declared in the function.<\/p>\n\n\n\n<p>Programmers commonly use stack tracing during interactive and post-mortem&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Debugging\">debugging<\/a>. End-users may see a stack trace displayed as part of an&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Error_message\">error message<\/a>, which the user can then report to a programmer.<\/p>\n\n\n\n<p>A stack trace allows tracking the sequence of&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Nested_function\">nested functions<\/a>&nbsp;called &#8211; up to the point where the stack trace is generated. In a post-mortem scenario this extends up to the function where the failure occurred (but was not necessarily caused).&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/Tail_call\">Sibling calls<\/a>&nbsp;do not appear in a stack trace.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted has-white-background-color has-background\"><a href=\"https:\/\/www.derniercriweb.co.uk\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.derniercriweb.co.uk<\/a><br><a href=\"https:\/\/derniercri.biz\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/derniercri.biz<\/a><br><a href=\"https:\/\/www.abportfolio.co.uk\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.abportfolio.co.uk <\/a><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In&nbsp;computing, a&nbsp;stack trace&nbsp;(also called&nbsp;stack backtrace&nbsp;or&nbsp;stack traceback) is a report of the active&nbsp;stack frames&nbsp;at a certain point in time during the execution of a&nbsp;program. When a program is run, memory is often dynamically allocated in two places; the stack and the heap. Memory is continuously allocated on a stack but not on a heap, thus reflective [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[21,23,20,19],"class_list":["post-127","post","type-post","status-publish","format-standard","hentry","category-computing","tag-bury","tag-greater-manchester","tag-web-design","tag-web-development"],"_links":{"self":[{"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/posts\/127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/comments?post=127"}],"version-history":[{"count":0,"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/posts\/127\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/media?parent=127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/categories?post=127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.derniercriweb.co.uk\/bury-blog\/wp-json\/wp\/v2\/tags?post=127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}