Tagged Questions
1
vote
1answer
22 views
Open Stream and CancellationException causes Thread lock
I have a rather complex application that I'm trying to create for an android phone. I have a class that uses the Java Process Builder and some private classes to read from both the input and output ...
0
votes
1answer
32 views
ArgumentOutOfRangeException in SetApartmentState
I have such piece of code:
var t = new Thread(ShowStatus);
t.SetApartmentState(ApartmentState.STA);
And once I've got exception ArgumentOutOfRangeException on second line. How is it possible? And ...
1
vote
1answer
48 views
Python: Threads stopping without any reason
I am trying to make a hash breaking application that will check all the lines of one
file with all the lines in the rockyou dictionary. While with pre-hashing the rock you
i got the time of checking ...
1
vote
5answers
82 views
How to re-throw an exception to catch-block in another thread
I've code that looks like this:
public static void startService() {
try{
new Thread(new Runnable() {
@Override
public void run() {
...
0
votes
1answer
28 views
Running on UIThread and posting to view, still get CalledFromWrongThreadException
Title says it all. Well mostly. This is only happening on 1 device. Other devices are fine.
In the onPostExecute of a AsyncTask I am calling the code below, before getting this exception I did not ...
0
votes
0answers
42 views
android os network on main thread exception
i make this code in single application working, but if join with other application , show this dialog "android os network on main thread exception"
package com.kelompok2.bissmilahpulsa;
...
3
votes
1answer
95 views
Strategies for tracking down the root cause of NullPointerExceptions in Java? [closed]
Are there are any accepted best practices/strategies in tracking down the root cause of NullPointerExceptions in Java, in particular when it comes to threading?
The background: I have a threaded app ...
0
votes
1answer
38 views
Catch Keyboard Interrupt to stop Python multiprocessing worker from working on queue
From several posts found on stackoverflow i created this code.
Scenario
I want to have a multiprocessing.queue on which several worker "listen"
In case of a keyboard interrupt, the main process ...
0
votes
0answers
62 views
PictureBox's throws exception when changing Image
I have a Dictionary with pairs of strings and Bitmaps that corresponds to a ListView control that lists all the image keys, among other info. Also I have a PictureBox that must show the corresponding ...
0
votes
2answers
58 views
CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views
In my app I'm using custom library to load svg files and loading process is a bit expensive so I've trying to move it into another thread. And I get "CalledFromWrongThreadException". According with ...
-1
votes
1answer
52 views
Handle exceptions on multiple running threads Java [closed]
I am developing a java app I would like to know how to handle exceptions on multiple running threads. Is there any example? Thanks
1
vote
5answers
71 views
Rethrow checked exception from Runnable
I execute multiple tasks from my main class:
ExecutorService executor = Executors.newFixedThreadPool(N);
for (int i = 0; i < M; i++) {
executor.execute(task);
}
executor .shutdown();
...
-1
votes
1answer
64 views
exception in accessing vector while accessing elements [closed]
I am trying to tone my concepts on core java and multithreading. While reading some book I found
the below code may throw ArrayIndexOutOfBoundsException if the vector is accessed in some way by ...
0
votes
4answers
65 views
Start a thread in a loop
I wonder know how to start a thread for the 1st time in a loop :
Example:
while(something)
{
/*
...
Some codes
...
*/
thread.start();
}
The problem is that I get this error :
...
1
vote
1answer
155 views
Log4Net C# logging issue with multi-thread code execution
I am using Log4Net to log an exception in my .Net Windows service application.
I want to mention that, my windows service application is running with multi-threading execution, which means that
each ...
-1
votes
2answers
71 views
Can't create form in another thread C# [closed]
I built a C# program that open other forms using multithread (I use it because it take time to load the forms) , something like a portal. My problem is when I call to create a specific form in the ...
2
votes
1answer
311 views
Strange 0x0eedfade exception in Delphi multi thread program
I have strange problem with my multi threaded server. It is Windows service and works similar to FTP server managing socket connection to many clients. It was created using Delphi 2006 (Turbo Delphi) ...
0
votes
0answers
42 views
WPF Exception crashes Dispatcher, and I cannot catch it
I am trying to validate resources of resource dictionaries. Because the dispatcher thread cannot be restored after a DispatcherException, I start a second STA thread in a second AppDomain. In this ...
2
votes
2answers
125 views
Stop a main thread from child thread
I am writing a python program, In main function I am starting a thread which runs continuously. After starting the the thread the main function enters a while loop where it takes user input ...
2
votes
1answer
107 views
mono Thread.Sleep(int) thrown System.TypeLoadException
I have the following problem:
Console.WriteLine("Starting");
Stopwatch stopWatch = new Stopwatch();
int delay = 1 * 60 * 1000;
int waitTime = delay - (int)(DateTime.Now.Second * 1000);
int time;
...
0
votes
1answer
68 views
WCF client Thread was being aborted
I have the following problem:
We have a Web server (windows server 2003 with IIS 6) hosting a WS-HttpBinding WCF service, .NET 3.5 (throttling is set accordingly to MS documentation).
We have an ...
1
vote
1answer
78 views
objectinputstream.readobject() line: not available [local variables unavailable]
I have written a client that reads TCP messages using an ObjectInputStream in a separate thread from the main thread. I am using Eclipse and although no exception is thrown in the console, at random ...
1
vote
0answers
87 views
Exception in thread and stack trace shows call to _endthreadex
I am currently debugging a crash in one of my applications and stumbled up on something that looks a bit odd to me.
In my application I start several threads using _beginthreadex function. At some ...
4
votes
1answer
371 views
waitall for multiple handles on sta thread is not supported
Hi all i have this exception when i run my app.
i work on .net 3.5 so i cannot use Task
waitall for multiple handles on sta thread is not supported
this is the code :-
private void ...
5
votes
3answers
99 views
How to exit application correctly
I have a thread in my application which is permanently running sending heartbeat every 5 minutes to a monitoring application.
If my application fails in an exception block I need to exit the thread ...
3
votes
1answer
172 views
C++11 safely join a thread without using a try / catch block
According to the documentation here and here, the join method of a C++11 thread will throw a std::system_error if joinable() == false. Thus the natural way to wait for a thread to complete execution ...
1
vote
0answers
159 views
MinGW-w64 Thread Creation Failure
resolution: pass "-static" in miscellanious linker options
---OR---
resolution: Download this MinGW-Version http://sourceforge.net/projects/mingwbuilds/?source=dlp
I am using Eclipse with the ...
1
vote
2answers
60 views
Concurrency & exceptions
I wonder if can exists situation when multiply exceptions can be thrown from the different threads simultaneously.
If it is so, how to handle them properly in order to recover application and continue ...
0
votes
0answers
72 views
Can I turn off poco exception handling and let a thread crash as normal?
I'm using openframeworks and underneath poco is handling the threads... The threads run through an error handler (Poco::ErrorHandler).
When I hit an exception on my thread I get a typical message in ...
0
votes
1answer
69 views
getting stacktrace with context to thread
I am trying to get the current stack-trace of a Thread in Java. I have explored the following methods:
One of the easiest way of printing stack trace of current thread in Java is by using ...
0
votes
2answers
119 views
Invoke or BeginInvoke cannot be called Error
I have a program that is used by Clients world wide. I check my error logs and quite a few seem to be having an exception (listed below) thrown that I can't really figure out or trace.
I have some ...
0
votes
1answer
57 views
How to catch errors instantly when running multiple threads with executors?
The second thread in my code will throw a divide by 0 exception, but I will only catch it after the first thread finished. The first thread could run for days, so that means that I will only catch my ...
0
votes
1answer
99 views
How can I use Control.Invoke() to throw an exception that won't be ignored?
Motivation
I'm using a Task in a Windows.Forms application where I want to handle any exceptions thrown by the Task by using Task.ContinueWith() and Control.Invoke() to rethrow any exceptions on the ...
0
votes
0answers
26 views
Cross-thread operation not valid: Control 'richTextBox2' [duplicate]
I write multithreaded app and got an exception Cross-thread operation not valid: Control 'richTextBox2' accessed from a thread other than the thread it was created on.
Here is my code:
Thread[] ...
3
votes
5answers
1k views
Java Thread Sleep and Interrupted Exception
Why does a sleep thread need a try catch to catch Interrupted Exception?
Why does a sleep even emit an Interrupted Exception error?
This are the two questions I really wanna find out about in java ...
0
votes
0answers
309 views
Multiple GUI Thread using Application.Run causes cross thread exception
I have a C# WinForms application that contains a run time form designer/live data viewer. The user can add controls and view live data while the application is running. It uses a lot of third party ...
0
votes
1answer
247 views
threadid=1 thread exiting with uncaught exception (group=0x410702a0)
I develop android application and every thing is right no error but when I run the code i found this error below and when I track the code it's stop on this line :
HttpResponse httpResponse = ...
6
votes
1answer
321 views
Java runtime exception - erroneous tree type [closed]
I'm currently writing a basic musical chairs application and have run into some difficulty while turning on/off music using a button (in my beautiful swing interface).
I created the interface in ...
1
vote
1answer
567 views
ASP.NET Response.Redirect() doesn't work without try/catch
I have a trouble, which I didn't get earlier with the ASP.NET. I can't redirect to the some location with the method Response.Redirect()
I've read another topics and may tell you, what exactly I have ...
6
votes
1answer
155 views
std::rethrow_exception fails with nested threads
I have a program that needs to propagate exceptions from any uncaught thread to the main thread, so that it may provide the user with information about why it failed and shut down safely. My ...
0
votes
1answer
73 views
GUI refresh in a multithread application causes exception
In my file searching application I have a problem with refreshing the GUI (OnPropertyChanged)
I begin with all my checked dirs:
foreach (string folderPath in dirList) {
this.Search ...
0
votes
2answers
165 views
Java: java.util.NoSuchElementException in multithreadings program?
I need to do organize multithreadings find in files:
User input where find(path) and what find(word);
First thread finds .txt files in folder and add result to queue;
When queue has some file => ...
2
votes
1answer
106 views
Exception from thread doesnt bubbles into main thread
Here I start a task
System.Threading.Tasks.Task.Factory.StartNew(() => RefreshCache(crmClientInfo)).ContinueWith(
previous => RefreshCacheExceptionHandling(previous.Exception),
...
0
votes
2answers
94 views
How to handle wait() notify()?
Here I have two run methods which should synchronize each other.
Poller Class:
*/
public void run() {
int seqId = 0;
while(true) {
List<KpiMessage> list = null;
try{
...
0
votes
0answers
40 views
How to set the cyclic Barrier for this Class
How to handle this, While I try to poll and update my database for the following classes using thread pools.
The Run method for Polling class:
public void run() {
int seqId = 0;
...
6
votes
1answer
261 views
IllegalArgumentException in StatFs in WebViewCore internal thread
Google play reports an exception on some devices (all are "other" and one "LG-E400", so it might be some custom android build)
Exception is:
java.lang.IllegalArgumentException
at ...
0
votes
0answers
135 views
Possible Invalid cross-thread access?
I've encountered a rare issue in the application I'm working on. This occurs on rare occations, but not neccesarily every time I'm navigating between pages, and I can't seem to wrap my head around it. ...
0
votes
1answer
365 views
Illegal monitor state exception
How to pass the polling thread to another thread for processing.
The program execution beings in a controller class which has a main method and a thread pool:
The main class Controller
public ...
0
votes
0answers
153 views
javafx runtime thread synchronization error?
I was wondering if anyone could elaborate on the following errors without having to post my entire code. I have an object that draws an image and a threaded object that draws another image on top. ...
-3
votes
2answers
113 views
How do I catch an InterruptedException in a thread in Java? [closed]
Ok, in one of my classes i want to throw an InterruptedException. I do that by calling
thread.interrupt();
As far as I know this will throw an InterruptedException. What I would like to know is ...