All Questions

1818
votes
48answers
931304 views

How do I fix android.os.NetworkOnMainThreadException?

I got an error while running my Android project for RssReader. Code: URL url = new URL(urlToRssFeed); SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser parser = factory.newSAXPar...
38
votes
9answers
59194 views

How to throw a checked exception from a java thread?

Hey, I'm writing a network application, in which I read packets of some custom binary format. And I'm starting a background thread to wait for incoming data. The problem is, that the compiler doesn't ...
7
votes
5answers
8765 views

Evaluation requires a thread to run temporarily. Use the Watch window to perform the evaluation

I'm completely stuck. I'm testing MetaTrader API and getting next error when tries to run a method in the Immediate Window of VS 2010: A first chance exception of type 'System.Threading.ThreadAbor...
6
votes
3answers
3548 views

Why do AppDomain exceptions invariably terminate the application?

This is related to a previous question. What I'm trying to understand now is how come UI thread exceptions can be prevented from terminating the application while non-UI exceptions can't be. For ref...
4
votes
3answers
48718 views

Android : Caused by: android.os.NetworkOnMainThreadException

String response = getResultForRequest(url); Where 'url' is JSON formatted which return bunch of data using http GET method. public static String getResultForRequest(String urlString) throws...
1
votes
3answers
8814 views

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 a...
2
votes
1answers
625 views

Using ThreadExceptionEventHandler: determine which thread caused the exception

Using the Application.ThreadExceptionEventHandler, is it possible to determine which thread caused the exception (the thread id)? The same question applies to using the AppDomain.UnhandledExceptionEv...
0
votes
2answers
331 views

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("<root>")....

Previous Next