Questions tagged [callstack]

A stack that stores details of the functions called by a program in sequence, so that each function can return on completion to the code that called it.

Filter by
Sorted by
Tagged with
0 votes
1 answer
23 views

How can navigate a callstack from a log in Visual Studio Code?

If I have a log file (from a crash reporter), how can I make it so I can easily navigate the callstack in Visual Studio Code? It's just a list of files with line numbers: c:\agent\build\source\game\...
idbrii's user avatar
  • 11k
1 vote
1 answer
41 views

How can navigate a callstack from a log in Visual Studio?

If I have a log file (from a crash reporter), how can I make it so I can easily navigate the callstack in Visual Studio? It's just a list of files with line numbers: c:\agent\build\source\game\...
idbrii's user avatar
  • 11k
0 votes
2 answers
45 views

Why is the use of a stack, manipulated by both a stack pointer and a base pointer, the proper solution to handle function frames?

Can anyone enlighten us from both technical & historical perspective why computers use a stack, manipulated with a stack pointer and a base pointer, with a specific process to follow like saving ...
bwass31's user avatar
  • 75
0 votes
0 answers
21 views

Effect of broswer breakpoint on rendering

index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, ...
John George's user avatar
0 votes
0 answers
79 views

RangeError: Maximum call stack size exceeded, js engine: hermes React Native

So I'm new to React Native and I stumbled upon this error while making a guess game... It says RangeError: Maximum call stack size exceeded This is what I have in my App.js import { useState } from '...
MarkoS's user avatar
  • 49
1 vote
1 answer
33 views

If Array.prototype.map is not in the call stack, how exactly JavaScript knows to not run any other code before its iteration is over?

function callback(x) { // also tried debugger to find .map in the call stack console.trace(); return 2*x; } [1,2,3].map(callback); console.log('Next line of code'); console What I know about ...
Nick_the_Slasher_McGurk's user avatar
1 vote
1 answer
19 views

Queue Using Stacks: Transferring Elements Between Stacks for Dequeue, but Not Reverting for Enqueue

I'm learning how to implement queues using two stacks. This is the method where the dequeue operation is costly and enqueue is O(1). Below is the code:- import java.util.*; class QueueusingStacks2 { ...
Mohit's user avatar
  • 13
0 votes
0 answers
56 views

C# find what the last interacted with instance in the call stack is

I am working on a personal C# project where I want to redirect console streams to different inputs/outputs for different object instances. So for example I have a class User that I do not have source ...
Jakob Tinhofer's user avatar
1 vote
0 answers
29 views

Oracle VPD to introduce non-invasive dbms_utility.format_call_stack

We have a situation whereby the code generates an intermetent 'Insert' on a table. The idea is to enable VPD (via DBMS_RLS.ADD_POLICY) methods, on 'insert' of the table, and policy function, which is ...
Piyush's user avatar
  • 21
0 votes
0 answers
23 views

Returning a reference to a function scoped value works for some reason in rust, need explanation [duplicate]

I am using rustc 1.70.1 I have a function which I thought would crash, but it doesn't: fn testset<'a> () -> std::collections::HashSet<&'a i64> { let mut set = HashSet::new(); ...
Naphat Amundsen's user avatar
3 votes
1 answer
57 views

Does the both functions parent and asynchronous child get re-pushed to call stack from task queue on completion of async code of child function?

What i all know about call stack is: If there is only one function being called it will be pushed to call stack and removed when its job is done or otherwise return statement is encountered. If one ...
Yogesh Kakde's user avatar
0 votes
1 answer
152 views

RangeError: Maximum Call Stack Size Exceeded in JS when generating 24 Random Numbers [duplicate]

I am working on a project in JavaScript where I must generate 24 random and different numbers from 1-24. Whenever I run this code, I get this error in Safari, Firefox, and Chrome RangeError: Maximum ...
David Kolenda's user avatar
0 votes
0 answers
29 views

I get a 'Render Error: Cannot read property 'isLoggedIn' of undefined' while trying to connect react frontend to Django backend

I'm working with react native as front end and django as backend to create an app using expo. i'm using expo go which means i'm creating it directly on my mobile phone. the issue is my front end ...
Isaac Unaeze 's user avatar
1 vote
1 answer
213 views

I have a problem in react native when i try to navigate to a material top tap navigation that contains a flatlist component

I have a initial screen in my app that contains a button to navigate to my home screen with the method navigation.navigate('HomeDrawerNavigator' as never), the HomeDrawerNavigator initial screen is my ...
Carlos Mario Lopez Gonzalez's user avatar
0 votes
0 answers
218 views

Reading call stack from Windows crash dump in C++

I am trying to read a dump to get the call stack where a crash happened. 1st Scenario - When reading and writing the dump file in the same application, I am getting the right call stack from the dump ...
Mayank Prabhakar's user avatar
0 votes
1 answer
48 views

Go prints different function name from program counters returned from runtime.Callers() if I use errors package

code1: package main import ( "fmt" "github.com/pkg/errors" "runtime" ) func main() { ptrs, _ := Test1("arg1", "arg2") for _, pc :...
Hodol's user avatar
  • 45
0 votes
1 answer
65 views

How to do tail call optimisation in Scala3?

I am trying to write a program that is 100% iterative, that is, the functions never need to return, because nothing must happen after such a return. In other words, the program is 100% in tail ...
Plegeus's user avatar
  • 140
0 votes
0 answers
29 views

why does it give me mximum call stack size exceeded?

i have this working version of this code that loops over the array of LocalCart and does stuff with the product inside of it with the name of (element) const AddToPending = async () => { ...
mark's user avatar
  • 51
0 votes
0 answers
27 views

How do I find the number-palindrome if a large number causes the size exceeded collstack to overflow?

I try to find a palindrome number, but if the number I pass is too big, then the call stack overflows. How can this be fixed so that the function can return larger numbers? (function () { ...
Dunker's user avatar
  • 1
0 votes
1 answer
75 views

What exactly goes on the Stack and what goes on the Heap, while calling a method with a class instance (in the below code snippet) - C#?

The below code snippet works perfectly and reverses the string "abc", recursively, and gives us the correct output as "cba". If the method ReverseString was static, instead of non-...
Vikram Singh's user avatar
1 vote
1 answer
94 views

Why doesn't the Event Loop retrieve from the Callback Queue when the Call Stack is empty?

I am aware that the Event Loop takes the first callback from the Callback Queue when the Call Stack is empty. With this premise, why does the below code execute sync2() before the setTimeouts' ...
Kakamotobi's user avatar
0 votes
0 answers
35 views

Recursion Error: Maximum call stack size exceeded for checking if a negative number exists in an array

I have a recursion methods to check if a generated random number exists in the idNum array. My code is below. I'm getting a RangeError: Maximum call stack size exceeded error in the recursion and not ...
sk_225's user avatar
  • 417
0 votes
0 answers
21 views

Run time-consuming function with Promises without blocking runtime [duplicate]

I'm trying to understand how to use time consuming function with Promises. I have some nonsense, but time consuming function computation() (that I create for demonstration purpose), that would need 3-...
VelikiyMalchik's user avatar
0 votes
2 answers
99 views

How can I use a minidump to get readable callstack from executable built in fully optimized release mode?

I would like to distribute and executable file built in C++ with full optimization in release mode. I am generating a core dump in case of unhandled exception and I would like to be able to get a ...
higlu's user avatar
  • 433
0 votes
0 answers
107 views

How to interpret different pieces of output in a Linux kernel stack trace?

I am debugging a Linux kernel crash. I am looking at the last words found in a kernel log available after the crash and reboot. I am trying to interpret the callstack of a failed task. I am not sure I ...
Grigory Rechistov's user avatar
0 votes
1 answer
188 views

Windbg - how to show the call stack method instead of addresses

I'm analyzing a dump and get K command as below 0:034> kp # Child-SP RetAddr Call Site 00 00000054`e0995fb0 00007ffa`042d28ad clr!COMNlsInfo::InternalGetCaseInsHash+0x58 ...
Nguyen Diep's user avatar
1 vote
3 answers
121 views

when is the call stack really empty?

https://promisesaplus.com/#point-34 onFulfilled or onRejected must not be called until the execution context stack contains only platform code. Promises (then(), catch(), finally()) and async ...
user avatar
0 votes
0 answers
29 views

Has an execution context access to the data of another execution context?

For example if I have this code: const text = "hello"; function func(){ return text; } func(); When I invoke the function func() is going to be generated a new execution context on the ...
FrankUP's user avatar
0 votes
1 answer
369 views

LibUV NodeJS handle synchronous or asynchronous tasks?

I'm Nodejs beginner. I have been reading some documents and posts on Google and as far as I know, LibUV is used to handle asynchronous tasks. However, when I came across a post recently, the author ...
Simba's user avatar
  • 136
0 votes
0 answers
37 views

Setrecursionlimit high overhead

I am wondring about the reason for the high setrecursionlimit overhead at Google Colab. I am trying to make a basic power recursive function basicpower as a part of my university assignment shown in ...
Hossam Hamza's user avatar
0 votes
2 answers
59 views

Having a hard time visualizing the call order of binary tree recursion

I am trying to visualize recursion for this particular problem solution below, and have placed 2 console.logs, but I still can’t understand it. The problem: Node depths Here is my solution. It works ...
3birds2stones's user avatar
1 vote
1 answer
127 views

Python recursive call overhead - RecursionError result before reaching the specified limit by setrecursionlimit

I am trying to make a basic power recursive function basicpower as a part of my university assignment. I tried to set the recursion limit to 100 using sys.setrecursionlimit(100). When I make a call to ...
Hossam Hamza's user avatar
0 votes
0 answers
41 views

Why don't anonymous functions change context - Does it have to do with the call stack? [duplicate]

This code keeps the context in window: const a = function () { console.log(this);} //window And this code changes the context to a2: const a3 = { anyFunction: () => { console.log(this) } // ...
Ric's user avatar
  • 179
0 votes
0 answers
56 views

Is there a way to get the call stack of the process to be killed by kill -9 automatically on Redhat/Centos? bpftrace?

I just want to get the call stack or a core dump of the process automatically before a kill -9 sending to it. After checking bpftrace docs, I wrote a simple bpftrace program: [root]# cat killstack.bt ...
zhaimlill's user avatar
0 votes
0 answers
40 views

How to get position called a specific function in source code?

I'm checking Memory Leak issue at our Linux C++ Application. So, I overrode new operator to get some information, and one of the information is the position called this overridden new operator in ...
Baruian's user avatar
  • 122
0 votes
1 answer
113 views

C: Why can I copy structs w/ static array members, but not static arrays?

typedef struct { int p[10]; } array10; int main() { array10 a = {(int[10]){...}}; array10 b = {(int[10]){...}}; a.p = b.p; // #1. doesn't compile, can't assign to int[10] a = b; // #2. ...
bockyboh's user avatar
0 votes
0 answers
54 views

C# Simulate the effect of throwing an exception without throwing an exception

I have a specific process I am running... there can be many errors during it as it uses player input, and the errors can be found in various classes because it's big. For clarification, I am building ...
1Mangomaster1's user avatar
0 votes
0 answers
87 views

Nodejs/Express Maximum Call stack Size Exceeded on Invalid Routes

I run my application with Nodejs/Express in AWS ECS. However, I am observing an abnormal behavior in Production environment. Whenever I enter an invalid route such as /invalid-route which should ...
KasunKP's user avatar
  • 141
0 votes
0 answers
65 views

In Javascript, is it possible to communicate to workers while inside while-loop?

I have a recursive calculation, which I handle using a manual call stack. var stack = initialListOfTasks(); while (stack.length > 0) { var todo = stack.shift(); performTask(stack, todo); }...
Jan Mulder's user avatar
1 vote
0 answers
55 views

Confusing recursive behaviour

I am trying to figure out stuff about recursion (I am studying go) and by playing around I did this. playground package main import ( "fmt" ) func main() { recurse(0) } func ...
fulverin's user avatar
5 votes
2 answers
340 views

How to avoid creating the same object over and over again?

I continue working on my TCP sockets, as mentioned this morning. I have discovered that the amount of sockets keeps growing, every time I send a message over such a socket. This simply means that I am ...
Dominique's user avatar
  • 16.6k
1 vote
0 answers
99 views

Trying to manually unwind the callstack using asm and stackdump

I have some stack dump, an elf with debug symbols as well as the original source code. Since this code runs in an embedded environment, and we cannot connect JTAG, the only information we have is the ...
Alex Osheter's user avatar
0 votes
0 answers
47 views

Need an explanation about stack frames - why value of this local variable isn't removed?

I've got a question about this code: #include <stdio.h> void bar(void) { int a = 22; } void foo(void) { int a; printf("%d\n", a); } int main(void) { bar(); foo();...
chlebastian's user avatar
2 votes
1 answer
93 views

Algorithm too slow on large scale input case, and dynamic programming optimization

Problems I found My code works on short input but not on long input (test cases 1, and 2 work, but 3 takes too much time) I believe code can be optimized (by dynamic programming), but how? Guess ...
Salieri's user avatar
  • 73
0 votes
0 answers
32 views

php 'Maximum execution time' analyse place of processing

I'm looking for a possibility to find out, where in the complex coding the error "Fatal error: Maximum execution time of 30 seconds exceeded" has occured. I'm interested in backtrace (call ...
Annie W.'s user avatar
  • 328
-1 votes
2 answers
77 views

Understanding how call return works

I am somewhat confused regarding exactly when the context of a called function gets deleted. I have read that the stackframe of the called function is popped off when it returns. I am trying to ...
Sandeep's user avatar
  • 1,243
0 votes
0 answers
31 views

RangeError: maximum call stack size exceeded caused by Firebase's code

Goal Fetch realtime data from Firebase realtime database using onValue Issue Everything works as expected when running the website on localhost, while the exact same code triggers an error. Note, the ...
Mike Verlinde's user avatar
1 vote
0 answers
93 views

Why size of stack memory is not 8MB exactly on MacOS?

I wanted to test the stack size limit on MacOS after I observed that the limit is slightly more than 1MB on Windows (which should be the default limit). I saw that on MacOS even when I don't have any ...
Markus Peterson's user avatar
0 votes
1 answer
34 views

JavaScript - result undefined - forcing one method to complete before another?

I have the following NodeJS code running in an AWS Lambda: const https = require('https'); exports.handler = async event => { try { const currentWeekNumber = getWeekNumber(new Date(Date....
java12399900's user avatar
  • 1,525
0 votes
2 answers
945 views

What is the difference between call stack and task queue in javaScript(event-loop)?

I am confuse in differentiating between call stack and task queue in the context of event loop. Call stack -->Every time a script or function calls a function, it's added to the top of the call ...
Hemant Aher's user avatar

1
2 3 4 5
23