stack-overflow

Stackoverflow exception in VS 2015 but not in VS2010 how?

北城以北 提交于 2020-01-01 09:14:26
问题 There is a webservice project written in VS2010 few years ago and the problem is all code exactly same (same PC , Tested with vs2010 and 2015 with the same code) but in vs2015 it gives error on debug mode. Options > "Projects & Solutions" settings are all same. I took this error and definition of it; An unhandled exception of type 'System.StackOverflowException' occurred in System.Runtime.Serialization.dll System.StackOverflowException was unhandled Message: An unhandled exception of type

Segmentation Fault on creating an array in C

a 夏天 提交于 2020-01-01 05:52:08
问题 I have recently migrated to a new laptop - HP dv6119tx (Intel Core i5, 4 GB RAM). It has Windows 7 Home Premium 64 bit installed. I am trying to create an array of type int of length 10^6 in C++ (Dev C++), which I used to create comfortably on my last laptop (32 bit Windows 7 Ultimate/Ubuntu Linux, 2GB RAM) and every other environment I have programmed on (It should take around 3.5 MB of RAM). But with the current setup, I am getting a "Segmentation Fault" error in Debug Mode. SCREENSHOTS

PHP recursive function to delete all child nodes causes stackoverflow

非 Y 不嫁゛ 提交于 2020-01-01 04:56:06
问题 My MySQL looks like this: (the name of the table is category) 'id', 'content', 'parent' where: id = the id of the category content = some-text-we-dont-care-about parent = the id of the parent category this is what I'm trying right now: function remrecurs($id) { $qlist=mysql_query("SELECT * FROM category WHERE parent='$id'"); if (mysql_num_rows($qlist)>0) { while($curitem=mysql_fetch_array($qlist)) { remrecurs($curitem['parent']); } } mysql_query("DELETE FROM category WHERE id='$id'"); } Which

Quicksort Algorithm (Cormen) gives Stackoverflow

孤街浪徒 提交于 2019-12-31 07:06:27
问题 i implemented the Quick Sort Algorithm which given pseudo code in Introduction to Algorithms (Cormen, 3rd Edition) 7.1 When i tried algorithm with small sized arrays, result is true. But when i tried with N=50000 and array is already sorted like this; N = {1, 2, 3, ..., 50000}; It gives StackOverflowError. I think it's happening because the function recurse itself 50000 times. QuickSort(A, 0, 49999) => QuickSort(A, 0, 49998) => QuickSort(A, 0, 49997)... so go on. Can i solve this problem? Or

Quicksort Algorithm (Cormen) gives Stackoverflow

♀尐吖头ヾ 提交于 2019-12-31 07:06:12
问题 i implemented the Quick Sort Algorithm which given pseudo code in Introduction to Algorithms (Cormen, 3rd Edition) 7.1 When i tried algorithm with small sized arrays, result is true. But when i tried with N=50000 and array is already sorted like this; N = {1, 2, 3, ..., 50000}; It gives StackOverflowError. I think it's happening because the function recurse itself 50000 times. QuickSort(A, 0, 49999) => QuickSort(A, 0, 49998) => QuickSort(A, 0, 49997)... so go on. Can i solve this problem? Or

Without using recursion how can a stack overflow exception be thrown?

故事扮演 提交于 2019-12-30 18:33:08
问题 Without using recursion how can a stack overflow exception be thrown? 回答1: If you call enough methods, a stack overflow can occur anytime. Although, if you get stack overflow errors without using recursion, you may want to rethink how you're doing things. It's just so easy with recursion because in an infinite loop, you call a ton of methods. 回答2: Since no one else has mentioned it: throw new System.StackOverflowException(); You might do this when testing or doing fault-injection. 回答3:

-[NSInputStream read:maxLength:] throws an exception saying length is too big, but it isn't

限于喜欢 提交于 2019-12-30 09:44:10
问题 I use an NSInputStream to read data from a file. It will crash if maxLength is greater than 49152. When it crashes -- sometimes, but not every time, it gives this message: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSConcreteData initWithBytes:length:copy:freeWhenDone:bytesAreVM:]: absurd length: 4294967295, maximum size: 2147483648 bytes' From my calculation, 524288 is still less than that maximum, and can fit in the return value. What did I

Why are stackoverflow errors chaotic?

最后都变了- 提交于 2019-12-30 09:07:08
问题 This simple C program rarely terminates at the same call depth: #include <stdio.h> #include <stdlib.h> void recursive(unsigned int rec); int main(void) { recursive(1); return 0; } void recursive(unsigned int rec) { printf("%u\n", rec); recursive(rec + 1); } What could be the reasons behind this chaotic behavior? I am using fedora (16GiB ram, stack size of 8192), and compiled using cc without any options. EDIT I am aware that this program will throw a stackoverflow I know that enabling some

Stack Overflow in Fortran program

[亡魂溺海] 提交于 2019-12-29 07:06:10
问题 I have a problem with my simple Fortran program. I am working in Fortran 77, using Compaq Visual Fortran. The program structure must be in the form of a main and a subroutine, because it is part of a big program related to the finite element method. My issue is that I would like to set the values 10000 & 10000 for NHELE and NVELE respectively, but when I run the code, the program stops and gives the following error: forrt1: server <170>: program Exception - stack overflow I've tried

Testing for a float NaN results in a stack overflow

浪尽此生 提交于 2019-12-29 05:20:29
问题 C#, VS 2010 I need to determine if a float value is NaN. Testing a float for NaN using float.IsNaN(aFloatNumber) crashes with a stack overflow. So does aFloatNumber.CompareTo(float.NaN). The following does not crash, but it's not useful as it returns NaN regardless: aFloatNumber - float.NaN A search for "stack overflow" returns results about this website instead of results about an actual stack overflow, so I can't find relevant answers. Why is my application going into a stack overflow when