Search Results

Search found 253388 results on 10136 pages for 'stack stock'.

Page 4/10136 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • ASP.NET MVC stack overflow exception when calling a partial view from master page

    - by quakkels
    Hey there everyone, I'm getting a stack overflow error when I try to call a partial view from the master. The Partial View: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %> <form action="/members/TestLoginProcess/" method="post"> U: <input type="text" name="mUsername" /><br /> P: <input type="password" name="mHash" /><br /> <button type="submit">Log In</button> </form> The Action in the "Members" controller [ChildActionOnly] public ActionResult TestLogin() { return PartialView(); } Then I call the partial view from the master page: <!--Excerpt from wopr.master--> <%= Html.Action("TestLogin", "Members")%> When I go into debug mode the master page returns this error: {Cannot evaluate expression because the current thread is in a stack overflow state.} I don't understand how this error is getting triggered. any help would be much appreciated!

    Read the article

  • Using ptrace to generate a stack dump

    - by Gomez
    Hello. I am compiling C++ on *nix and I would like to generate a stack dump a) at an arbitrary point in the program, b) during any signal, particularly during SIGSEGV. Google tells me that ptrace is probably the tool for the job, but I can't find any comprehensible examples of walking the stack. Getting the return address, yeah, but what about the NEXT return address? And what about extracting the symbolic name of the function at that point? Something to do with DWARF? Many thanks if you can tell me where to go from here.

    Read the article

  • Stack overflow in OCaml and F# but not in Haskell

    - by Fernand Pajot
    I've been comparing for fun different languages for speed in execution of the following program: for i from 1 to 1000000 sum the product i*(sqrt i) One of my implementations (not the only one) is constructing a list [1..1000000] and then folding with a specific funtion. The program works fine and fast in Haskell (even when using foldl and not foldl') but stack overflows in OCaml and F#. Here is the Haskell code: test = foldl (\ a b -> a + b * (sqrt b)) 0 create 0 = [] create n = n:(create (n-1)) main = print (test (create 1000000)) And here is the OCaml one: let test = List.fold_left (fun a b -> a +. (float_of_int b) *. (sqrt (float_of_int b))) 0. ;; let rec create = function | 0 -> [] | n -> n::(create (n-1)) ;; print_float (test (create 1000000));; Why does the OCaml/F# implementation stack overflows?

    Read the article

  • Multithreaded program in C: calculating thread stack space

    - by SlappyTheFish
    Situation: I am writing a program in C that maintains a number of threads. Once a thread ends, a new one is created. Each thread forks - the child runs a PHP process via exec() and the parent waits for it to finish. Each PHP process takes the next item from a queue, processes it and exits. Basic code: http://www.4pmp.com/2010/03/multitasking-php-in-parallel/ Problem: The PHP processes are Symfony tasks and Symfony requires a fairly huge amount of memory. How can I safely calculate the required stack space for each thread so that PHP processes will have enough memory? The memory limit set in php.ini is 128Mb so should I allocate this much space in the stack?

    Read the article

  • [Java] Flood fill using a stack

    - by dafero
    Hello to everyone :), I am using the recursive Flood fill algorithm in Java to fill some areas of a image. With very small images it works fine, but when de image becomes larger the JVM gives me a Stack Over Flow Error. That's the reason why I have to reimplement the method using a Flood Fill with my own stack. (I read that's the best way to do it in these kind of cases) Can anyone explain me how to code it? (if you don't have the code at hand, with the pseudo-code of the algorithm will be fine) I've read a lot in the Internet but I haven't understood it very well. Thanks!

    Read the article

  • Stack trace method names redacted

    - by c.cam108
    I have users email me stack traces when my app crashes on their device. Prior to iOS 6 they looked like this: CRASH: NSInvalidArgumentException (*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil) TRACE: ( 0 CoreFoundation 0x355e58a7 __exceptionPreprocess + 186 1 libobjc.A.dylib 0x3798c259 objc_exception_throw + 32 2 CoreFoundation 0x3553a1d7 -[__NSArrayM insertObject:atIndex:] + 186 3 MYAPP 0x0006c0f7 MYAPP + 188663 4 MYAPP 0x000652a3 MYAPP + 160419 5 Foundation 0x3512ac29 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 16 6 Foundation 0x350826d9 -[NSURLConnectionInternalConnection invokeForDelegate:] + 28 7 Foundation 0x350826a3 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 198 8 Foundation 0x350825c5 -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 60 9 CFNetwork 0x34de77f5 _ZN19URLConnectionClient23_clientDidFinishLoadingEPNS_26ClientConnectionEventQueueE + 192 10 CFNetwork 0x34ddc4a5 _ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl + 424 11 CFNetwork 0x34ddc1a3 _ZN19URLConnectionClient13processEventsEv + 106 12 CFNetwork 0x34ddc0d9 _ZN17MultiplexerSource7performEv + 156 13 CoreFoundation 0x355b9ad3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14 14 CoreFoundation 0x355b929f __CFRunLoopDoSources0 + 214 15 CoreFoundation 0x355b8045 __CFRunLoopRun + 652 16 CoreFoundation 0x3553b4a5 CFRunLoopRunSpecific + 300 17 CoreFoundation 0x3553b36d CFRunLoopRunInMode + 104 18 GraphicsServices 0x371d7439 GSEventRunModal + 136 19 UIKit 0x33047cd5 UIApplicationMain + 1080 20 MYAPP 0x0003fbcf MYAPP + 7119 21 MYAPP 0x0003fb84 MYAPP + 7044 ) From the CoreFoundation etc method names and asking the user what happened, I can get a pretty good idea of where the crash happened. However, since iOS 6 was released, my crash reports all look like this: CRASH: NSRangeException (*** -[__NSArrayI objectAtIndex:]: index 2147483670 beyond bounds [0 .. 11]) TRACE: ( 0 CoreFoundation 0x3a3872bb <redacted> + 186 1 libobjc.A.dylib 0x32ca697f objc_exception_throw + 30 2 CoreFoundation 0x3a2d1e8d <redacted> + 164 3 MYAPP 0x000ff721 MYAPP + 214817 4 MYAPP 0x000e8999 MYAPP + 121241 5 UIKit 0x372f60ad <redacted> + 72 6 UIKit 0x372f605f <redacted> + 30 7 UIKit 0x372f603d <redacted> + 44 8 UIKit 0x372f58f3 <redacted> + 502 9 UIKit 0x372e1287 <redacted> + 526 10 UIKit 0x37373f3d <redacted> + 748 11 UIKit 0x3721e52b <redacted> + 318 12 UIKit 0x3720b809 <redacted> + 380 13 UIKit 0x3720b123 <redacted> + 6154 14 GraphicsServices 0x362085a3 <redacted> + 590 15 GraphicsServices 0x362081d3 <redacted> + 34 16 CoreFoundation 0x3a35c173 <redacted> + 34 17 CoreFoundation 0x3a35c117 <redacted> + 138 18 CoreFoundation 0x3a35af99 <redacted> + 1384 19 CoreFoundation 0x3a2cdebd CFRunLoopRunSpecific + 356 20 CoreFoundation 0x3a2cdd49 CFRunLoopRunInMode + 104 21 GraphicsServices 0x362072eb GSEventRunModal + 74 22 UIKit 0x3725f301 UIApplicationMain + 1120 23 MYAPP 0x000ccbd3 MYAPP + 7123 24 MYAPP 0x000ccb88 MYAPP + 7048 ) I get the stack trace from here, which the user is prompted to email when the app is re-opened: void uncaughtExceptionHandler(NSException *exception) { //make a file name to write the data to using the documents directory: NSString *fileName = [NSString stringWithFormat:@"%@/crashlog.txt", documentsDirectory]; //create content - four lines of text NSString *content = [NSString stringWithFormat:@"CRASH: %@ (%@)\n\nTRACE: %@", [exception name], [exception reason], [exception callStackSymbols]]; //save content to the documents directory [content writeToFile:fileName atomically:NO encoding:NSStringEncodingConversionAllowLossy error:nil]; } Without the method names, this is worse than useless. Is there any way of getting these method names back into my stack traces? This is a release configuration, not debug.

    Read the article

  • Detecting that the stack is full in C/C++

    - by Martin Kristiansen
    When writing C++ code I've learned that using the stack to store memory is a good idea. But recently I ran into a problem: I had an experiment that had code that looked like this: void fun(unsigned int N) { float data_1[N*N]; float data_2[N*N]; /* Do magic */ } The code exploted with a seqmentation fault at random, and I had no idea why. It turned out that problem was that I was trying to store things that were to big on my stack, is there a way of detecting this? Or at least detecting that it has gone wrong?

    Read the article

  • Using stack defined in C++ stl

    - by cambr
    #include <stack> using namespace std; int main() { stack<int> s; int i; for (i = 0; i <= 10; i++) { s.push(i); } for (i = 0; i <= 10; i++) { printf("%d", s.pop()); } } Whats wrong with the code above? Error: In function `int main()': aggregate value used where an integer was expected

    Read the article

  • Stack trace for C++ using gcc

    - by dimba
    We use stack traces in proprietary assert like macro to catch developer mistakes - when error is caught, stack trace is printed. I find gcc's pair backtrace()/backtrace_symbols() methods insufficient: Names are mangled No line information 1st problem can be resolved by abi::__cxa_demangle. However 2nd problem s more tough. I found replacement for backtrace_symbols(). This is better than gcc's backtrace_symbols(), since it can retrieve line numbers (if compiled with -g) and you don't need to compile with -rdynamic. Hoverer the code is GNU licenced, so IMHO I can't use it in commercial code. Any proposals?

    Read the article

  • I'm interested in checking out a stack-oriented programming language. Which one would you recommend?

    - by Anto
    I'm interested in learning a stack-oriented programming language (such as Forth), which one would you recommend? The qualities I want are: You should be able to develop non-trivial software in it, but it mustn't be a great language for that as: I want to learn the language so I can try out a new paradigm (that is, not because I (think) that I will have great use of it). The reason I want to learn another paradigm is that I want to broaden my views on different approaches (learn to think in new ways, different from OOP, functional and structured). The language should let me do that (learn to think differently). The language should have available and good resources to learn from. The resources should also approach stack-oriented programming in a way that you understand the paradigm (after all, I do this for the paradigm).

    Read the article

  • VERY strange stack overflow in C++ program

    - by mav
    Hello, I wrote a program some time ago (Mac OS X, C++, SDL, FMOD) and it perfomed rather good. But lately I wanted to extend its functionality and added some more code to it. And now, when I run it and try to test the new functionality, the program crashes with SIGABRT. Looking into debugger, on function stack I see: _kill kill$UNIX2003 raise __abort __stack_chk_fail odtworz <-- my function that was was modified As far as I know, "__stack_chk_fail" indicates a stack overflow. But that's not the weirdest thing about it. In this function "odtworz", I have some code like this: ... koniec = 0; while ( koniec == 0 ) { ... if (mode == 1) { ... } else if (mode == 2) { ... } else if (mode == 3) { ... } } mode is a global variable and is set to value "2" in a function before. And now imagine - if I delete the third if statement (mode == 3) which never gets executed in this mode, the program doesn't crash! Deleting code that doesn't even get to be executed helps the situation! Now, I don't want to delete this code because it's for other mode of my program. And it works fine there. So any hints where I can search? What could be possibly wrong with this?

    Read the article

  • Dynamic stack allocation in C++

    - by Poni
    I want to allocate memory on the stack. Heard of _alloca / alloca and I understand that these are compiler-specific stuff, which I don't like. So, I came-up with my own solution (which might have it's own flaws) and I want you to review/improve it so for once and for all we'll have this code working: /*#define allocate_on_stack(pointer, size) \ __asm \ { \ mov [pointer], esp; \ sub esp, [size]; \ }*/ /*#define deallocate_from_stack(size) \ __asm \ { \ add esp, [size]; \ }*/ void test() { int buff_size = 4 * 2; char *buff = 0; __asm { // allocate mov [buff], esp; sub esp, [buff_size]; } // playing with the stack-allocated memory for(int i = 0; i < buff_size; i++) buff[i] = 0x11; __asm { // deallocate add esp, [buff_size]; } } void main() { __asm int 3h; test(); } Compiled with VC9. What flaws do you see in it? Me for example, not sure that subtracting from ESP is the solution for "any kind of CPU". Also, I'd like to make the commented-out macros work but for some reason I can't.

    Read the article

  • Tie stock quote value to cell in Excel 2011 Mac

    - by vedantchandra
    I've been working on a mock stock portfolio in Excel, and I've been looking for ways to automatically update the data, eg. stock price and P/E ratio. I have tried using a web query to MSN Money, but that just brings up the whole stock quote across multiple cells, I want data to be updated in individual cells only. The only web query solution I can think of is if someone hosted a website where each value in the stock quote was saved on a different HTML file. I could then WebQuery to that file for each cell requiring that value. However, no website offers this. So in essence, is there any tool on Excel 2011 Mac that will let me pull individual values from a stock quote and assign them to a single cell?

    Read the article

  • How is return address specified in stack?

    - by Mask
    This is what I see by disassemble for the statement function(1,2,3);: movl $0x3,0x8(%esp) movl $0x2,0x4(%esp) movl $0x1,(%esp) call 0x4012d0 <_Z8functioniii> It seems the ret address is not pushed into stack at all,then how does ret work?

    Read the article

  • stack.ToList() in .NET - order of elements?

    - by James M.
    When using the .ToList() extension method on a Stack<T>, is the result the same as popping each element and adding to a new list (reverse of what was pushed)? If so, is this because it really is iterating over each element, or does it store the elements in reverse internally and slip the array into a new List<T>?

    Read the article

  • C stack/scope, variable's lifetime after functions ends

    - by Ranking Stackingblocks
    void someFunc() { int stackInt = 4; someOtherFunc(&stackInt); } Is it the case that stackInt's address space could be reallocated after someFunc ends, making it unsafe to assume that the value passed to someOtherFunc represents the stackInt variable with value 4 that was passed to it? In other words, should I avoid passing stack variables around by address and expecting them to still be alive after the function they were initialised in has ended?

    Read the article

  • Threads sharing Stack locations?

    - by Achilles
    Hi there, I did a search but couldn't find anything. I was reading a paper that mentions thread sharing stack locations.... I wonder how and why'd that be needed. Any examples would be highly appreciated. Many thanks.

    Read the article

  • Hibernate - on the stack or on the heap?

    - by Stephano
    As a Java programmer, you usually keep two truths in your pocket: Instance variables and Objects lie on Heap. Local variables and methods lie on the Stack. Now that I use Hibernate in just about everything, I realize I'm not as sure of myself. Are there some good rules of thumb for using hibernate and knowing where your memory lives?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >