1,151 questions
-1
votes
1
answer
248
views
What's the meaning of a memory address in the call stack window in Visual Studio?
I'm debugging my application, called floor.exe. My application is throwing an exception and I'm trying to understand what's happening.
I've opened the call stack window, and I can see that window ...
0
votes
0
answers
14
views
Watch an expression at a specific call stack entry?
In Visual Studio 2022, C# project, I need to keep an eye on an expression that's valid only in a specific method, but I need to keep an eye on it even when I'm stepping through called methods, and ...
1
vote
2
answers
212
views
Call Stack - What is stored in the call stack between the declaration of a caller function's last variable and a callee function's first variable?
I am using an Ubuntu 16.04 a 32-bit Virtual Machine OS.
I executed
sysctl -w kernel.randomize_va_space=0
to disable ASLR in root prior to gcc.
I have also compiled this using the command:
gcc -g -fno-...
2
votes
0
answers
52
views
Are template arguments accurate in Visual Studio's "Call Stack" window?
I am observing inconsistent template arguments shown in Visual Studio's "Call Stack" window.
Here's one example:
template<class T>
class Class {
public:
Class() { method(); }
...
0
votes
1
answer
158
views
In a release build by GCC, i.e., without -g flag, why function frame is missed in backtrace of GDB?
It's a follow up question of In a release build by GCC, i.e., without -g flag, is register info trustable?, thanks for the answer of it, I now understand that the registers designated for function ...
1
vote
1
answer
90
views
How to add `HasCallStack` to a custom monad in Haskell?
I can use a type alias to add HasCallStack to a monad e.g.:
type XIO' a = HasCallStack => IO a
which saves me some keystrokes and I don't have to remember about putting HasCallStack everywhere.
...
0
votes
1
answer
93
views
Does using undefined as the callstack result in a compiler error?
I was just trying out some stuff with the ImplicitParams language extension when I typed this code:
let ?callStack = undefined in undefined and it caused a compiler panic:
panic! (the 'impossible' ...
0
votes
1
answer
131
views
32 bit application stack trace
I have an old application 32bit that doesn't change. I'm developing a DLL for it.
Here is the code of my function:
void PacketHandler::CMSG_Hook(CDataStore* data)
{
CDataStore** pointerToPacket = &...
0
votes
1
answer
122
views
SAP Odata ABAP standard stack calls
I tried to debug the ABAP stack of an OData service, and I see there is this call which is taking more time which is called as "Load MPC class" same with all the DPC and DPC_EXT classes, ...
1
vote
1
answer
48
views
Is there a way to ensure a function is called for every instance of a subclass inheriting from a base class?
OptionsAndAnswer is the base class.
abstract class OptionsAndAnswer(
...,
open val options: List<Option>
){
fun validate() {
require(options.map { it.id }.distinct().size == ...
1
vote
1
answer
318
views
Get-PSCallStack in Windows PowerShell
I am writing a recursive function and would like to add a debugging mode with some (function) caller information along with the ScriptLineNumber.
In PowerShell 7, I am able to do something like:
...
-4
votes
2
answers
116
views
CallStack of chain of methods [closed]
I'm trying to find out a way to get the complete method chain call stack A() -> B() -> C() -> D(). However, StackWalker or Thread.currentThread().getStackTrace() returns only the originating ...
0
votes
1
answer
112
views
Maximum Call Stack Size Exceeded when using datalist in React
I'm building a React component that fetches drug data from an FDA API and displays it in a <datalist> for searching. However, I'm encountering a `Maximum call stack size exceeded error when ...
1
vote
0
answers
106
views
The caller/callee relationship in a flamegraph generated by golang pprof is wrong. Why?
I use pprof to get the CPU profile of a running golang program (cfs-server of CubeFS). And generate a flamegraph using the CPU profile:
go tool pprof http://localhost:16220/debug/pprof/profile\?...
0
votes
1
answer
64
views
callback queue , call stack and registered event like setTimeout
what happens if any event is register (like setTimeout) but it takes more time (assume 5,6 min ), and currently call stack and callback queue is completed all task and it is empty, so the program is ...
0
votes
1
answer
64
views
Problem with Execution order i would guess
im loosing my mind! I try to get data from a form and pass it to a php script that puts the data in a csv file and into a database. This Works, however i am trying to validate the Transmission of the ...
6
votes
1
answer
2k
views
How does Wasm code run in browsers and how does it interact with JavaScript
I'm curious about how WebAssembly (Wasm) code operates in the browser. I understand that JavaScript code in the browser is executed by the JavaScript engine, but I'm unsure about who executes the Wasm ...
0
votes
2
answers
82
views
Why are the last two values in this array always valid?
I was hacking around with stacks in C to demonstrate something to a friend. I understand that the functions below return pointers to garbage memory, and so we can't rely on them. That was the point of ...
6
votes
0
answers
690
views
Debugging MAUI issues from android playstore ANR details stacks
I have a MAUI application available on the playstore.
Google PlayStore has the "Crashes and ANRs" reports.
Because MAUI isn't exactly Java, I'm having a difficult time finding the actual ...
0
votes
1
answer
207
views
Does JavaScript have an Event table?
I read an article on Medium that said that "JavaScript has an event table that keeps tracks of all the events that will be executed asynchronously maybe after some time interval or after the ...
0
votes
0
answers
40
views
Java: Lazy object storage with auto key from stack trace
I implemented a mechanism for lazily calculated objects, just with a ConcurrentMap of ConcurrentMaps as an EJB Singleton:
@Singleton
public class LazyObjectStore {
private final ConcurrentMap&...
0
votes
1
answer
405
views
set_terminate unexplained behaviour with exception thrown from std::thread and libunwind
I'm trying to add a std::terminate handler with std::set_terminate for debugging in my app but i ran into some unexplained behaviour. The basic idea is that if i'm throwing from constructors (or ...
1
vote
0
answers
33
views
Find the stack start address in runtime. cortexM4 processor
I want to create a hardfault handler that saves data to the internal flash and then reset the MCU.
I want to save not only the core registers and the system control registers, but also the stack of ...
1
vote
1
answer
265
views
How to free the call stack in C?
I have created a calculator using RDP (recursive descent parser) to parse and evaluate mathematical expressions "such as: 5cos(30) -5(3+5)". The thing is I also have tried to include ...
0
votes
1
answer
76
views
Why don't I see task queue bunch up?
I am reading and conversing with chatGPT about what exactly setTimeout and setInterval do. As I understand it the main JavaScript execution thread sends the Web Timer API a callback function and an ...
1
vote
1
answer
437
views
call stack when Segmentation fault
I code this(backtrace.hpp) to show the call stack when my program crashed like segmentation fault.
#pragma once
#include <map>
#include <iostream>
#include <signal.h>
#include <...
1
vote
0
answers
152
views
Order of processing microtasks in JavaScript [duplicate]
I’m solving an event loop problem in Javascript and I can’t figure out why the output order is 2, 1, and not 1, 2.
f1();
Promise.resolve().then(() => {
console.log(2);
});
async function f2() {
...
0
votes
0
answers
45
views
How are python variable names resolved? (explanations on the web are a bit uncertain)
It seems that there are two things that are not being distinguished in some guides about this.
When a function is running, there is its local scope, and some scopes above her on call stack. Each scope ...
3
votes
1
answer
373
views
Why are perf back traces on Linux skipping a function (or showing a call to _init), with DWARF, LBR, and even FP (frame pointers)?
I have a simple program that I compile with -O0 -g -fno-omit-frame-pointer -fno-inline, and which I record with system-wide recording
timeout 3 perf record -a -g -F 99 -- ./program
perf script > ...
1
vote
1
answer
104
views
why setImmediate function executes after setTimeout
setImmediate(() => {
console.log("set immediate function calling")
})
setTimeout(() => {
console.log("setTime out function")
}, 1000)
for (let i = 0; i <= ...
0
votes
3
answers
279
views
Javascript maximum call stack size even though recursive function call itself with an accumulator
I have an object whose value can be any type.
const data = {
a: { aa: 50, ab: 'hello', ac: 'xx_1' },
b: 50,
c: [
{ ca: 100, cb: 'by', cc: 'xx_2' },
{ ca: 101, cb: 'by1', cc: '...
1
vote
1
answer
106
views
Why does console.trace() show a growing stack trace when using event listeners with { once: true } option?
I have this inline js code.
let btn = document.querySelector("button");
btn.addEventListener("click", foo, { once: true });
function foo() {
btn.addEventListener("click", bar, { once: true });
...
1
vote
0
answers
515
views
Uncaught RangeError: Maximum call stack size exceeded (functionjs.js)
I'm trying to build a recruitment management website (nodejs), but when I'm almost done I get this error:
Uncaught RangeError: Maximum call stack size exceeded. functionjs.js
Here is my functionjs.js ...
0
votes
0
answers
88
views
Why do constructors live on stack instead of heap memory (Java), aren't they invoked on creation of an object?
I'm doing a bit of a deep dive into Java programming. As I'm reading a book I realize that similar to methods and associated local variables (stack variables), constructors also get to stack series ...
3
votes
1
answer
210
views
How to read name of anonymous lambdas in Visual Studio call stack?
It's always been challenging to me to track anonymous lambdas in the call stack, so I wrote some sandbox code in order to deal with the issue:
int main() {
[] {
std::cout << "Hello ...
0
votes
1
answer
378
views
Random placement of items on canvas without overlap
I'm trying to randomly place a number of items (sprites) onto a canvas element without any overlap. I'm using a seeded random number so that I can get consistent placement. However I'm running into a ...
-1
votes
1
answer
106
views
how to make a syncrounous function like writefilesync not using callbacks, nor promises
first of all let me say i'm not asking anything about async/await or promises, i know these concepets, a also know that i can use top-level awaits
but
i want to make "a single function" to ...
0
votes
0
answers
203
views
Can somebody explain how this code is executed in relation to the call stack and the event loop?
I have created this snippet which I am trying to figure out how it's working the way it's working.
function fetch() {
console.log("Fetch start");
return new Promise(resolve => {
...
0
votes
0
answers
109
views
Visual Studio C/C++ : Access to call stack from the code
Is there a way to access to call stack content from the code ?
There are many introspection functions in <crtdbg.h> but none about call stack.
(at least, I didn't find any)
I need some (MSVC-non-...
0
votes
1
answer
114
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\...
1
vote
1
answer
83
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\...
0
votes
2
answers
127
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 ...
1
vote
0
answers
1k
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 '...
1
vote
1
answer
57
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 ...
1
vote
1
answer
104
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 {
...
0
votes
0
answers
85
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 ...
1
vote
0
answers
68
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 ...
3
votes
1
answer
748
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 ...
0
votes
1
answer
570
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 ...
1
vote
1
answer
2k
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 ...