You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When parsing a live match, the watcherThread (started in skadistats.clarity.source.LiveSource) never terminates, which means the resources for the file are not fully freed up. This is having two effects:
1 - Cannot delete files even after the main clarity thread is completed
2 - [Not 100% sure this is actually happening] Multiple Live files within the same application (parsed sequentially) are not working as intended since the watcher thread persists and points to the wrong source file.
I've made this ugly work-around fix on my end for now, which resolved the issue(s). I've added that to the code once the main clarity parsing thread completes:
} finally {
Set<Thread> setOfThread = Thread.getAllStackTraces().keySet();
Thread threadToInterupt = null;
for (Thread th : setOfThread){
if (th.getName().equals("clarity-livesource-watcher")){
threadToInterupt = th;
threadToInterupt.setUncaughtExceptionHandler(new IgnoreInteruptExceptionHandler());
}
}
if (Objects.nonNull(threadToInterupt)){
threadToInterupt.interrupt();
}
}
This is obvly not an elegant solution so I thought I would flag up here.
Just to confirm, I am calling LiveSource.Close() which as far as I can tell from the thread window it is working with everything else.
Thanks again for the awesome work!
The text was updated successfully, but these errors were encountered:
It's an interesting bug! It's been a while since I wrote the LiveSource, and even after looking at the code for a while, I'm not sure what the problem is.
I have some vectors for further investigation though - I'll keep you updated.
When parsing a live match, the watcherThread (started in
skadistats.clarity.source.LiveSource
) never terminates, which means the resources for the file are not fully freed up. This is having two effects:1 - Cannot delete files even after the main clarity thread is completed
2 - [Not 100% sure this is actually happening] Multiple Live files within the same application (parsed sequentially) are not working as intended since the watcher thread persists and points to the wrong source file.
I've made this ugly work-around fix on my end for now, which resolved the issue(s). I've added that to the code once the main clarity parsing thread completes:
This is obvly not an elegant solution so I thought I would flag up here.
Just to confirm, I am calling
LiveSource.Close()
which as far as I can tell from the thread window it is working with everything else.Thanks again for the awesome work!
The text was updated successfully, but these errors were encountered: