stack-overflow

stackoverflow error in class constructor

↘锁芯ラ 提交于 2019-12-17 06:18:50
问题 Please excuse what is probably a very basic question, but I am writing a program to store employee info and it works fine until it tries to set the info inside my employee class. It gives a stackoverflow error and I cannot figure out why. Thanks for any help. Main class: import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner Input = new Scanner(System.in); System.out.println("Enter the number of employees to enter."); int employeeCount = Input.nextInt()

gson.toJson() throws StackOverflowError

大城市里の小女人 提交于 2019-12-17 04:31:23
问题 I would like to generate a JSON String from my object: Gson gson = new Gson(); String json = gson.toJson(item); Everytime I try to do this, I get this error: 14:46:40,236 ERROR [[BomItemToJSON]] Servlet.service() for servlet BomItemToJSON threw exception java.lang.StackOverflowError at com.google.gson.stream.JsonWriter.string(JsonWriter.java:473) at com.google.gson.stream.JsonWriter.writeDeferredName(JsonWriter.java:347) at com.google.gson.stream.JsonWriter.value(JsonWriter.java:440) at com

Segfault when allocating large array in Fortran

我是研究僧i 提交于 2019-12-14 03:13:54
问题 I have a very simple example of a strange segfault I am having and it is as follows: program big_array_segfault integer :: nX = 13000 integer :: nY = 100000 real(kind = 8), allocatable :: bigarr(:,:) allocate(bigarr(nX, nY)) end program big_array_segfault Note that I have 20 GB of RAM to work with and this does not even begin to approach that. Everything I have seen online suggests that this may be a problem with Stack space vs Heap space but I don't know how to control the memory in that way

How to Show custom Emojis Url link in Labels iOS

半城伤御伤魂 提交于 2019-12-13 21:47:02
问题 How to show Emojis url link in label. Emojis Unicode format is showing properly but when we show emojis url link its not showing its show same URL link. I am using this code for showing Emojis:- NSString *html = msCommentObj.mCommentText; NSAttributedString *attr = [[NSAttributedString alloc] initWithData:[html dataUsingEncoding:NSUTF8StringEncoding] options:@{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute:@(NSUTF8StringEncoding)}

A way to run an infinite loop without the stackoverflowexception on ironpython?

安稳与你 提交于 2019-12-13 18:46:04
问题 I'm having a little problem when trying to run an infinite loop in ironpython 2.7 Here is my script: import urllib import urllib2 import json a=0 info = '' def getInfo(): url = 'https://api.bitfinex.com/v1/pubticker/btcusd' values = {} data = urllib.urlencode(values) req = urllib2.Request(url) response = urllib2.urlopen(req) the_page = response.read() page_info = json.loads(the_page) return(page_info) while 1: try: info = getInfo() a=a+1 print("--"+str(a)+"--") if info != '': print(str(info[

How to prevent stack overflow when using Scala's Predef.implicitly

旧城冷巷雨未停 提交于 2019-12-13 16:35:25
问题 Given this simple code snippet I am astounded to provoke a stack overflow this easy: implicit def foobar: Unit = implicitly[Unit] In my little more complex use case I have the following situtation: abstract class Foo { type Repr_Tpe protected implicit def repr2Ordered: Repr_Tpe => Ordered[Repr_Tpe] } class Bar extends Foo { type Repr_Tpe = Long protected implicit def repr2Ordered = implicitly[Repr_Tpe => Ordered[Repr_Tpe]] } Defining method repr2Ordered in class Foo does not work because type

Google Maps API v3 in IE Not Displaying Map or Markers

好久不见. 提交于 2019-12-13 15:42:29
问题 We recently upgraded from Google Maps v2 to v3 and now the Markers and Map will not display in any version of IE. It works in every other browser. The console is showing Stack Overflow errors, and we think it has something to do with the markers and/or creation of markers. We disabled the fitbounds command, and the map displayed but with no markers in IE. However, the same map in Firefox and Chrome has markers which puzzled us. I've been trying to figure out a solution to this issue for a few

IIS stackoverflow

自闭症网瘾萝莉.ら 提交于 2019-12-13 15:26:20
问题 We've been chasing an bug on my WCF web application (W2K3 IIS) which was resulting in a stackoverflow. To fix it I needed to increase the stack of my application by creating a thread with the amount of memory I wanted to allocate. But what happens with the child threads? My app creates many threads, will they inherit the value or will I have to set every single thread with the new value? Edit: If I run the (WCF) services as a console host they work just fine. Also, If I modify the stack of

Stack Overflow error on Color Changer Function

試著忘記壹切 提交于 2019-12-13 14:27:24
问题 i have two color "red" also "Salmon". i need create dynamiclly panel also panel background color. These colors must be between two color(red public Color x, y; protected void Page_Load(object sender, EventArgs e) { BackGroundColorArranger(Color.Red, Color.Salmon); } void BackGroundColorArranger(Color x, Color y) { BackGroundColorArrangerBase(Convert.ToInt32((float)(x.ToArgb() + y.ToArgb()) / 2)); } void BackGroundColorArrangerBase(int z) { Panel panel = new Panel(); panel.ID = z.ToString();

What causes an endless recursion in AWTEventMulticaster.mouseEntered()?

放肆的年华 提交于 2019-12-13 14:08:20
问题 I've been doing JFrame for a little bit now, and ever since I started using Mouselistener (or any eventlistner for that matter) things would run smooth for about 2 mins or so. Then I would get a ton of repeating errors, the program would still run but I would be able to use any eventlistener. The error is basically this: ... (couldn't catch top line in time, but something like Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError) (followed by) at java.awt.AWTEventMulticaster