stack-overflow

How to print stack trace of StackOverflowException

主宰稳场 提交于 2020-01-09 10:45:22
问题 I am developing a .Net 2.0 application in which a StackOverflowException occurs. Is there a way to print/log the stack trace before/during the application aborts? This is a long running server-side process which would be hard to execute under a debugger. I know that StackOverflowException can not be caught. 回答1: Use ADPlus (from Windows Debugging Tools) to force a dump on crash. E.g. adplus -hang -pn <process name> -o <dump file> 来源: https://stackoverflow.com/questions/2591406/how-to-print

How to print stack trace of StackOverflowException

孤人 提交于 2020-01-09 10:45:11
问题 I am developing a .Net 2.0 application in which a StackOverflowException occurs. Is there a way to print/log the stack trace before/during the application aborts? This is a long running server-side process which would be hard to execute under a debugger. I know that StackOverflowException can not be caught. 回答1: Use ADPlus (from Windows Debugging Tools) to force a dump on crash. E.g. adplus -hang -pn <process name> -o <dump file> 来源: https://stackoverflow.com/questions/2591406/how-to-print

StackOverFlowError in Java postfix calculator

喜你入骨 提交于 2020-01-07 07:51:09
问题 The following class is used by another program. When it is accessed, it throws a StackOverFlowError. This is part of a Postfix Calculator I have to do as a project at my university. Any help would be greatly appreciated, thank you in advance. I'm quite new at Java and I have no idea what to do. CODE: import java.util.Queue; import java.util.Stack; public class MyPostfixMachine implements PostfixMachineInterface { MyMathOperations mmo = new MyMathOperations(); MyPostfixMachine mpm = new

StackOverFlowError in Java postfix calculator

浪子不回头ぞ 提交于 2020-01-07 07:51:08
问题 The following class is used by another program. When it is accessed, it throws a StackOverFlowError. This is part of a Postfix Calculator I have to do as a project at my university. Any help would be greatly appreciated, thank you in advance. I'm quite new at Java and I have no idea what to do. CODE: import java.util.Queue; import java.util.Stack; public class MyPostfixMachine implements PostfixMachineInterface { MyMathOperations mmo = new MyMathOperations(); MyPostfixMachine mpm = new

System.StackOverflowException by forms

落花浮王杯 提交于 2020-01-06 15:06:16
问题 I'm trying to open another form with a button and it's only ok at the beginning. After a few forms made the stackoverflow error acours ! The error is on form 1, form 2 and form 3 (I started to debug multiple times): the codes are really simple. like for form 3: public partial class Form2 : Form { Form3 obrok = new Form3(); public Form2() { InitializeComponent(); } public void textBox1_TextChanged(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { obrok

Insertion sort in clojure throws StackOverFlow error

核能气质少年 提交于 2020-01-06 13:58:05
问题 (defn insert [s k] (let [spl (split-with #(< % k) s)] (concat (first spl) (list k) (last spl)))) (defn insert-sort [s] (reduce (fn [s k] (insert s k)) '() s)) (insert-sort (reverse (range 5000))) throws a stack over flow error. What am I doing wrong here? 回答1: Same issue as with Recursive function causing a stack overflow. Concat builds up a bunch of nested lazy sequences like (concat (concat (concat ...))) without doing any actual work , and then when you force the first element all the

LINQ query creates a StackOverflow Exception

元气小坏坏 提交于 2020-01-06 12:41:52
问题 This is LINQ-to-SQL. I'm trying to walk up a hierarchical relationship of SiteCategories to see how many levels there are. int numLevels = 1; //I tried setting this to new[] { parentID }.AsQueryable(); //but linq didn't like it IQueryable<int> nextBatchOfParents = _catalogdb.SiteCategories .Where(c => c.SiteCategoryId == parentID) .Select(c => c.SiteCategoryId); while ((nextBatchOfParents = _catalogdb.SiteCategoryRelationships .Where(rel => nextBatchOfParents.Any(x => x == rel

I get StackOverflow error when I create new instance in external class

孤者浪人 提交于 2020-01-05 09:36:08
问题 I have my main class CalculatorGUI.java and my second class KeyHandler.java. If I create instance of my main class in external class (e.g. CalculatorGUI one = new CalculatorGUI();), I get: Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError Why is that? I have to make this instance to use variables from y main GUI class. Here is my CalculatorGUI class: /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools

how to know a c program's stack overflows?

馋奶兔 提交于 2020-01-05 07:18:09
问题 i am simulating a problem(3d Ising Model) in c but when the problem size gets larger the program stop and the below error appears : Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) in the program I have a recursive function that does all the works, i suspect that the error is because of stack overflow(in the recursive function) but i do not know how to be sure. and if it is because of stack overflow, is there any way to solve this problem without changing program design

Stack Overflow With Unordered Map

China☆狼群 提交于 2020-01-05 07:15:12
问题 For a project, I have an opening table that I decided to put in a std::unordered_map . Unfortunately, I am restricted to hard-coding the entire map. So, I decided to split the initialization into multiple files. class OpeningBook { public: OpeningBook(); private: std::unordered_map<std::string, int> opening_database_; void init1(); void init2(); void init3(); void init4(); void init5(); }; and the constructor just calls the init functions: OpeningBook::OpeningBook() { init1(); init2(); init3(