stack-overflow

live debugging a stack overflow

此生再无相见时 提交于 2019-12-23 08:57:06
问题 I have a managed code Windows Service application that is crashing occasionally in production due to a managed StackOverFlowException. I know this because I've run adplus in crash mode and analyzed the crash dump post mortem using SoS. I have even attached the windbg debugger and set it to "go unhandled exception". My problem is, I can't see any of the managed stacks or switch to any of the threads. They're all being torn down by the time the debugger breaks. I'm not a Windbg expert, and,

Regarding stack reuse of a function calling itself?

爱⌒轻易说出口 提交于 2019-12-23 08:37:43
问题 if a function calls itself while defining variables at the same time would it result in stack overflow? Is there any option in gcc to reuse the same stack. void funcnew(void) { int a=10; int b=20; funcnew(); return ; } can a function reuse the stack-frame which it used earlier? What is the option in gcc to reuse the same frame in tail recursion?? 回答1: Yes. See -foptimize-sibling-calls Optimize sibling and tail recursive calls. Enabled at levels -O2, -O3, -Os. Your function is compiled to:

JTable setValueAt StackOverflowError

前提是你 提交于 2019-12-23 05:08:48
问题 I've been searching for whole day and I still can't find simple anwser to my problem: how can I make JTable cell update it's value when I edit it in another one? I wanted to use somehow fireTableCellUpdated but I don't really understand how can I use it, when and on what object. What I want is to obtain is some kind of listener that listens whether that values changes or not. In this particular scenario I have editable third column in which I store the amount and I want that listener to

Unknown StackOverFlow Error which may be Related to Class Object ArrayList & Data Storing

瘦欲@ 提交于 2019-12-23 04:29:10
问题 Here's the error code I got: Exception in thread "main" java.lang.StackOverflowError at JavaKeywords.<init>(JavaKeywords.java:5) at LAddClass.<init>(LAddClass.java:8) at LStore.<init>(LStore.java:9) at LAddClass.<init>(LAddClass.java:9) at LStore.<init>(LStore.java:9) and below is the three classes mentioned above. Sorry for posting the code of nearly the entire programme, but I really have no idea where's the error. The three lines makred by the error code are highlighted below. This is a

What does StackOverflowError mean in Java? What is its fix?

帅比萌擦擦* 提交于 2019-12-23 03:33:10
问题 I'm encountering the following error: Exception in thread "main" java.lang.StackOverflowError at Account.draw(Account.java:47) This is the relevant section of code: public double draw(double c) { if (c > 0) { return c; } else if (c < 0 && c > AccBalance) { AccBalance=-c; return AccBalance; } return draw(c); } How can I fix this? 回答1: In your code, if c == 0 , or c <= AccBalance , you keep on recursing the method with the same value of c . So, it will go into an infinite recursion, thus

C# - Finding the Boundaries of an Image (not the size)

独自空忆成欢 提交于 2019-12-23 03:19:10
问题 I'm developing an application to split an image grid equally and center the images (based on their similarity). So far, I could manage to fix a grid of images with small sizes, but whenever I try a larger "sprite" size (100x100, for instance), I get Stack Overflow error. Yes I'm using recursion, but whenever a pixel is checked, I set a boolean to deactivate it, copy it to a list and go on checking the others (in all directions), until the list is filled up with an image from the grid. I'm not

Where is variablilty in stack consumption coming from?

不打扰是莪最后的温柔 提交于 2019-12-23 03:10:16
问题 Whilst running test code from this question and fiddling with the JVM's thread stack size, I found that results were not necessarily repeatable: there were values of stack size for which the program would sometimes throw java.lang.StackOverflowError , but sometimes not . My question is: "What is causing the variation in stack space consumption?" Also, can an interrupt's stack be put on this program's main thread? Will results be similarly non-deterministic for other JVM implementations and/or

linq to sql + stackoverflow exception when querying objects

a 夏天 提交于 2019-12-22 12:22:18
问题 OK, i have confirmed i only this issue when i attempt to query on the primary key if that primary key in the entity is set to 'Auto Generated Value' -- but w/o this, how can i insert? Sorry if this is a noob linq2sql but i just started working with it. How does one go about using Linq to Sql with this option turned off but also have the db handle the pk's? I would hate to have to qry everytime to get the pk i should assign... I hope someone can help me out, im completely unable to use linq to

stack-protect equivalent in clang compiler?

六眼飞鱼酱① 提交于 2019-12-22 10:54:31
问题 Most of the mature compilers appear to have good support for stack variable clobbers. GCC: -fstack-protector xlC: -qstackprotect intel: -fstackprotector windows: /RTC For clang I've found -fsanitize=safe-stack, but it doesn't support shared libraries, which makes it pretty much useless for me. It looks like that sanitizer is implemented as an add-on? Does anybody know if clang has any sort of alternate (built-in?) anti stack-smashing support that doesn't have the no shared library restriction

Max number Activities support in android?

浪尽此生 提交于 2019-12-22 10:46:37
问题 I created an application with tab and many number of activities and child activities.But am getting an StackoverFlow error .Its because more number of layers of activity remaining in the stack.Now am planing it to rebuild with separate activities.Near to 30 activities will be needed for the app and I have also more functionalities in activities.So I want to know is there any limit for the number of activities .If not will any thing happen to app if the the number of activities are more than