callstack

R warning message on recursive expression: If you fail, try, try again...

I want to create a function that will retry an expression if it fails. Here's my working version: retry <- function(.FUN, max.attempts=3, sleep.seconds=1) { x <- NULL if(max.attempts > 0) { f <- substitute(.FUN) x <- try(eval(f)) if(class(x) == "try-error") { Sys.sleep(sleep.seconds) return(suppressWarnings(...

Call-stack for exceptions in C++

Today, in my C++ multi-platform code, I have a try-catch around every function. In every catch block I add the current function's name to the exception and throw it again, so that in the upmost catch block (where I finally print the exception's details) I have the complete call stack, which helps me to trace the exception's cause. Is it...

How to get Full Call graph for Documentation Purposes?

Our team is being required to document every method in our code, and describe what's getting passed in and out and such. Is it possible to auto-generate a document containing a full call hierarchy tree starting at a function and going down to all the possible call expansions? How? Using eclipse, spring, hibernate. Also we have access...

c++ stack trace from unhandled exception?

This question has been asked before and there have been windows-specific answers but no satisfactory gcc answer. I can use set_terminate() to set a function that will be called (in place of terminate()) when an unhandled exception is thrown. I know how to use the backtrace library to generate a stack trace from a given point in the progr...

C++ get call stack from std::exception

Hi, how can I print the full call stack when a std::exception raises? ...

In R, how do you evaluate ... in the calling function?

If I want to know what is stored in a ... argument within an R function, I can simply convert it to be a list, like so foo <- function(...) { dots <- list(...) print(dots) } foo(x = 1, 2, "three") #$x #[1] 1 # #[[2]] #[1] 2 # #[[3]] #[1] "three" What I can't figure out is how to evaluate ... in the calling function. In this next...

Invalid Pointer Operation + Call Stack

Hi, it's my call stack window when i got "Invalid Pointer Operation" Error : What is the reason for this error? Thank you ...

conceptual "stacks" and code layers in programming

I have been thinking a lot lately about how code gets organized in a layered way. I have been thinking of four different ways: Instantiation -- specifically objects are instances of classes. However, in several languages (like python), classes are also objects that were instantiated from a metaclass. So you can end up with an instan...

Tools for call stack of a running process in Windows 7

Which tool can I use to see the call stack for a running process? msdn link , but do I need to have the executable in debug mode? What are the other tools/ways by which i can see the call-graph / resource access graph for a running process? I have an external library from a developer to construct my own machine vision algos, but the ex...

Increase stack size when compiling with mingw?

Hi, I'm writing a recursive flood-fill algorithm to find connected components in an image, my code compiles and runs well with MSVC 2008 compiler; but the mingw-compiled binary crashed at runtime. After I converted the algorithm to non-recursive with std::stack, everything goes well. But what if I must use recursive algorithm in some...

How can I see the exception call stack in SharePoint 2010?

I am trying to port a SharePoint 2007 site collection feature to 2010. During the feature activation, SharePoint shows the "yellow screen of death" stating "The current custom error settings for this application prevent the details of the application error from being viewed.". AFAIK I have configured everything that is need to see the e...

Why does the debugger need symbols to reconstruct the stack?

When debugging in Visual Studio, if symbols for a call stack are missing, for example: 00 > HelloWorld.exe!my_function(int y=42) Line 291 01 dynlib2.dll!10011435() [Frames below may be incorrect and/or missing, no symbols loaded for dynlib2.dll] 02 dynlib2.dll!10011497() 03 HelloWorld.exe!wmain(int __formal=1, int __formal...

How can I rethrow an exception in Javascript, but preserve the stack?

In Javascript, suppose I want to perform some cleanup when an exception happens, but let the exception continue to propagate up the stack, eg: try { enterAwesomeMode(); doRiskyStuff(); // might throw an exception } catch (e) { leaveAwesomeMode(); throw e; } doMoreStuff(); leaveAwesomeMode(); The problem with this code is that ...

Callstack address

Hi! Does anybody know if/how I can read from the callstack from a specific address? suppose I have a offset address from the base address of the callstack, how can I get the base address? thanks :) ...

How can we take minidump during exceptions

Hi All, I am working on a sub project(.NET) which deals with exceptions. Below is my requirement When an exception occurs, the exception assembly must capture CPU information Method which caused the issue Data which caused the issue Environment details (path and other information) In above all these, the toughest part would be ge...

callstack and ReadProcessMemory

Hi! I'm trying to read the return address of the method but of another memory. so I'm getting the frame pointer, and read the value of the return value. As far as I understand I'm supposed to get a value equals to m_stackframe.AddrReturn.Offset, but: If I add the Esp to the frame pointer address - ReadProcessMemory returns false. If I ...

faster than Stackwalk...

Hi! Does anybody know of a better/ faster way to get the call stack than "StackWalk"? I also think that stackwalk can also be slower on methods with a lot of variables... (I wonder what commercial profilers do?) I'm using C++ on windows. :) thanks :) ...

How to interpret the callstack of visual studio?

> vcam.ax!CopyMediaType() + 0x49 bytes vcam.ax!CMediaType::Set() + 0x41 bytes vcam.ax!CMediaType::operator=() + 0x2f bytes vcam.ax!CVCamStream::SetFormat(_AMMediaType * pmt=0x00000000) Line 201 C++ FlashPlayer.exe!005641be() Can someone explain the above line by line? ...

Frame pointer + return address.

Hi! Does anybody know where relatively to the frame pointer is the return address of the function? Is there a difference between windows and unix? thanks :) ...

print call stack in C or C++

Is there any way to dump the call stack in a running process in C or C++ every time a certain function is called? What I have in mind is something like this: void foo() { print_stack_trace(); // foo's body return } Where print_stack_trace works similarly to caller in Perl. Or something like this: int main (void) { //...