crash

Want to display an error message if the value is NULL or VOID if EditText is empty but apps keeps crashing

时间秒杀一切 提交于 2019-12-13 02:34:24
问题 public void add(View v) { EditText first=findViewById(R.id.first),second=findViewById(R.id.second); double f=Double.parseDouble(first.getText().toString()); double s=Double.parseDouble(second.getText().toString()); TextView result=findViewById(R.id.result); double r; if(TextUtils.isEmpty(first.getText().toString())) { first.setError("This field can't be empty"); } else if(TextUtils.isEmpty(second.getText().toString())) { second.setError("This field can't be empty"); } else { r = f + s; result

Android: requestFileSystem in WebView causing crash

给你一囗甜甜゛ 提交于 2019-12-13 02:26:24
问题 I'm developing an offline app where I have to save files in html5 fs-sandbox. At desktop in Chrome everything works fine. But my android device is crashing with 10-12 10:49:53.953: A/libc(9231): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1) until I'm calling window.requestFileSystem(window.PERSISTENT, 5*1024*1024, fsInit, errorHandler); Because window.storageInfo is not defined in my WebView I could not call requestQuota in first. But window.requestFileSystem is defined and I think the

JVM crash when using JTable

吃可爱长大的小学妹 提交于 2019-12-13 02:21:30
问题 I have an industrial PC with an Intel Atom D2550 1.86 GHz CPU, its embedded graphics adapter and 4 Gb RAM running Windows 7 (32 bit) and when I run a Java program on this computer I get a Java(TM) Platform SE binary has stopped working (Problem Event Name BEX and Fault Module Name StackHash_2264 ). I have tried both Java8 and Java7 with the same results. I have tried with both just JRE installed, and with a full JDK installed on this machine. The same Java applicaton works well on this PC if

LibGDX game crashes with “java platform se binary stopped working”

柔情痞子 提交于 2019-12-13 02:20:08
问题 Im having this really weird problem where my LibGDX game, suddently, after a few minutes playing, crashes with no Exceptions thrown, it just freezes and crashes, and I have to force the process down. I have no idea how to debug this kind if error and google searches are not helping with this particular case. I tried to run it on android to see if Logcat would say something about it, and i got this: Any idea what could make the game crash like this, with no errors or exceptions? Or any way of

Android app crashes when nothing is entered and button is pressed

一曲冷凌霜 提交于 2019-12-13 02:18:22
问题 Hi I am working on an Android App and would like to ask for some help: The user enters a numbers on a editText and presses/clicks the button to get a conversion displayed in answer field text. Unfortunately if nothing is entered and the user clicks the button the application crashes. Could anyone help me put it into code: If editText is empty and button is clicked display 0.00 in the answer text field. or the other way if editText is empty and button is pressed display toast message ? If

setObject:ForKey: crash?

佐手、 提交于 2019-12-13 02:00:27
问题 I am getting this crash in the console: 2011-08-27 23:26:45.041 App[1672:3117] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary setObject:forKey:]: attempt to insert nil key' *** First throw call stack: (0x3231c8c3 0x362ee1e5 0x3231c7bd 0x3231c7df 0x32289679 0x3052e865 0x3220fd55 0x3221b7a3 0x3345e4b7 0x3345e38c) terminate called throwing an exception[Switching to process 10243 thread 0x2803] [Switching to process 10243 thread 0x2803] The

What's the difference between (null) vs <null>?

落花浮王杯 提交于 2019-12-13 01:43:44
问题 I was getting random crashes in my app until I narrowed it down to a particular method. In that method I expect an NSString as a parameter. This NSString can sometimes be nil in which case the method ends and no harm is done. When I run my method's parameter through NSLog(@"%@", myString) I found that I get one of these: The contents of an actual NSString (null) <null> The first two are expected and handled by my method. The third one, <null> , crashes my app with -[NSNull length]:

PHP libgd crash without feedback

孤街醉人 提交于 2019-12-13 01:42:38
问题 I'm working on a very large number of images. I have to create four JPEG versions of each image: original size JPEG 700x430 version 57x57 thumbnail 167xN thumbnail (variable height, maintain aspect ratio) I used the following two helper functions: function thumbFixed($srcfile, $dstfile, $dstWidth, $dstHeight) { $srcImg = imagecreatefromstring(file_get_contents($srcfile)); list($srcWidth, $srcHeight) = getimagesize($srcfile); $srcAR = $srcWidth / $srcHeight; $dstAR = $dstWidth / $dstHeight;

Program crashes when `if (variable % 2 == 0)`

一笑奈何 提交于 2019-12-13 01:35:02
问题 I'm writing a program that finds perfect numbers . Having read about these perfect numbers I came across a list of them: List of perfect numbers. At the moment the output is: 28 // perfect 496 // perfect 8128 // perfect 130816 // not perfect 2096128 // not perfect 33550336 // perfect I decided to create array and put it with numbers, which divide the number wholly (without the rest). So I will be able to verify if it is a perfect number or not by adding all elements of the array. But app

Application crashes because it takes too much memory?

て烟熏妆下的殇ゞ 提交于 2019-12-13 01:28:16
问题 I am about to finish my Application and recently I encountered a problem that I can't fix. My application is contained of 5 layouts, and 1 activity for each layout, 5 layouts. Now ever since I added ads to my Application, my application stated taking enormous size on ram memory and after switching few layouts it crashes. My App size is 10.8mb but on phone it takes up to 75mb of Ram memory. Here is the warning I get from logcat: http://prntscr.com/2naqr8 Here is Logcat when Application crashes