Questions tagged [thread-exceptions]
51 questions
1
vote
0 answers
Not touching the views in doInBackground but still getting this crash logs "android.view.ViewRootImpl$CalledFromWrongThreadException: "
I have gone through all the questions related to this crash android.view.ViewRootImpl$CalledFromWrongThreadException:
but all the questions are using views in doInBackground which cause the exception but i am getting the exception that points…

Unique Identifier
- 335
- 2
- 16
1
vote
5 answers
Update ArrayList using another ArrayList in java
I've come across a lot of information on ArrayLists and how to manipulate them but nothing seems to be answering my issue.
I want to check if an element in an arraylist is not alive, and if so remove it but add another 2 to the list. Usually quite…

Eishknaar
- 53
- 8
1
vote
2 answers
The calling Thread cannot access this object because a different thread owns it. Exception
private void Thread1_Exe()
{
try
{
int sleepValT1 = Convert.ToInt32(listBoxT2.SelectedValue);
int StartLoop = 0;
int EndLoop = 10000;
for (int i = StartLoop; i <= EndLoop; i++)
{
…

Zafeer Ul Haq
- 55
- 1
- 11
1
vote
1 answer
uncaughtException in android
I have this Exception while running my application which cause to stop the app.
the exception is: ThreadGroup.uncaughtException(Thread, Throwable)
line:689
I clear the question, I have 2 activities, as follows:
1) HomeActivity: which contains a…

BDeveloper
- 1,175
- 6
- 24
- 44
1
vote
1 answer
ThreadStateException occurred
I seem to have a problem with two lines of code in my program.
A ThreadStateException occurs at the lines if (o.ShowDialog() == DialogResult.OK) and if(s.ShowDialog() == DialogResult.OK)
The program is supposed to interpret a made up language, but…

Franco Pettigrosso
- 4,056
- 2
- 20
- 32
1
vote
1 answer
optorsim throws ConcurrentModificationException
this programme (optoesim ) is throwing a java.util.ConcurrentModificationException at the line for stats.put("jobTimesWithQueue", new LinkedHashMap(_jobTimesWithQueue));.
This is an opensource program and I did'n change anything. Can someone please…

user3693045
- 11
- 3
1
vote
3 answers
How to solve NullPointerException and ThreadException Error in android
I am getting a NullPointerException error in my code, I have narrowed it down to be this piece of code that is causing the exception. Can anyone help?
url = new URL(Http.toString());
Iterator is a raw type. References to generic type Iterator…

mayumi Tai
- 55
- 10
1
vote
0 answers
Export to excel working on local but not on server
I know this kind of questions are asked lot many times on lot many forums but the thing make this issue stranger is, its working for one module on both local and server but not for anotherone.
Let me be more clear.
I am exporting an excel sheet for…

SMI
- 303
- 1
- 6
- 22
1
vote
3 answers
Called From Wrong Thread Exception with AsyncTask
I keep getting a CalledFromWrongThreadException even if i throw it into AsyncTask's DoInBackground method! Can anyone tell me why and how to fix it?
/**
* Recognizes key words in responseTexts and runs the appropriate function
* @param…

Nelson.b.austin
- 3,080
- 6
- 37
- 63
0
votes
0 answers
UncaughtExceptionHandler for ScheduledExecutorService doesn't work?
I have this code here. I was trying to get information about unchecked exceptions in Runnables of a scheduler without using try catch or the ScheduledFuture to check for exceptions. I thought this would be the easiest way but it doesn't show any…

CoderBendl
- 11
- 1
0
votes
1 answer
Thread exception on SelectedNode = .Nodes[0]
Why do i get System.Threading.ThreadStateException?
void setupTree(TreeView tv, MyObj o)
{
tv.Invoke((MethodInvoker)delegate
{
tv.Nodes.Clear();
tv.Nodes.Add("").Tag = o;
tv.SelectedNode = tv.Nodes[0]; //it…
user34537
0
votes
1 answer
'Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException' when using Integer.parseInt - Java
I am trying to create a simple number guessing GUI game. I am using 'Integer.parseInt' to get the user's input as an integer instead of string so it can be compared. The program still executes as expected but it gives me the following error in the…

SwillMith16
- 49
- 1
- 10
0
votes
1 answer
How to overcome Exception in thread "main" java.util.InputMismatchException
Program:
import java.util.Scanner;
public class JavaExercise1 {
static int sum, num1, num2;
static Scanner scan = new Scanner(System.in);
public static void add(){
System.out.print("Enter first number to be added: ");
…
0
votes
0 answers
pandas: 0.19.2 read_excel is unable to recognize encoding properly even after giving encoding= 'UTF - 8'
converterS = {col: str for col in x}
excel_df = pd.read_excel(xlsx_file,encoding = 'utf-8', sheetname=table,converters= converterS)
error : 'ascii' codec can't encode character u'\xa2' in position 25: ordinal not in range(128)

prudhvi
- 1
0
votes
2 answers
C# - SQL Server: INSERT statement conflicted with FOREIGN KEY constraint - Unhandled Exception
I wrote a small C# application, which reads an Excel file and should import the data into an existing SQL Server database.
As there is a foreign key constraint in the table the entries should be inserted to, I already prevented this error directly…

Gardinero
- 331
- 2
- 13