SuperGouge / ChanThreadWatch

Fork of the original discontinued ChanThreadWatch.
90 stars 13 forks source link

Annoying bug involving thread's monitoring abrubtly stopping after a while with an unknown error. #94

Closed apriom closed 5 years ago

apriom commented 5 years ago

There's been a common bug that occurs pretty often where threads that are being monitored and archived on the list stop monitoring all of a sudden and an error shows up that states (Stopped: Unknown Error) besides the description. It's annoying and forces the user to have to manually re-continue the monitoring of the specified thread by right clicking on it in the monitored threads list and selecting the "Start" button. It's not related to the thread 404'ing because the thread is still active on the board's index and it started to monitor again after I had to manually start it again by right clicking on it and selecting the start button in the ChanThreadWatch application. Please fix this bug.

Capture

Capture2

jwshields commented 5 years ago

What are the log messages in log.txt in your config directory?

apriom commented 5 years ago

What are the log messages in log.txt in your config directory?

I checked in the directory with the exe file and config file of it, but there is no log file there. What should I do?

jwshields commented 5 years ago

If it's not in the application directory, it could live inside of %userprofile%\AppData\Roaming\Chan Thread Watch Generally if a thread stops for that reason, an error should be logged as to why. Without that, troubleshooting poses an increased difficulty

apriom commented 5 years ago

If it's not in the application directory, it could live inside of %userprofile%\AppData\Roaming\Chan Thread Watch Generally if a thread stops for that reason, an error should be logged as to why. Without that, troubleshooting poses an increased difficulty

I found the log in the roaming folder, thanks for telling me that. The error log says


[5/30/2019 - 3:07:59 AM] System.IO.IOException: The requested operation cannot be performed on a file with a user-mapped section open.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) at JDP.ThreadWatcher.Process(PageInfo pageInfo, SiteHelper siteHelper, String threadDir, String imageDir, String thumbDir, Dictionary2 completedImages, Dictionary2 completedThumbs) at JDP.ThreadWatcher.Check()

[5/30/2019 - 3:46:18 AM] System.IO.IOException: The requested operation cannot be performed on a file with a user-mapped section open.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding) at JDP.ThreadWatcher.Process(PageInfo pageInfo, SiteHelper siteHelper, String threadDir, String imageDir, String thumbDir, Dictionary2 completedImages, Dictionary2 completedThumbs) at JDP.ThreadWatcher.Check()

Every logged error shows the same thing but at different times. What do you think could be causing this issue based on the log information?

jwshields commented 5 years ago

Generally that error means another application has the file opened, meaning CTW cannot do what it needs to do, so it stops the thread in an error state. Do you have a program backing things up, or something that is manipulating the files? Something is holding the thread/html/images open, and causing the issue.

apriom commented 5 years ago

Generally that error means another application has the file opened, meaning CTW cannot do what it needs to do, so it stops the thread in an error state. Do you have a program backing things up, or something that is manipulating the files? Something is holding the thread/html/images open, and causing the issue.

I'm not using any programs besides ChanThreadWatcher and firefox. I don't know what the issue is, might be a bug because apparently nothing is holding those files open from what I've seen on my pc. What could I do?

apriom commented 5 years ago

Is there any way I can help fix this issue? Maybe you can send me a debugger version and I could help solve this bug.

jwshields commented 5 years ago

You should be able to use Resource Monitor, look at the disk tab, and see which applications are accessing the files that CTW is trying to write to

apriom commented 5 years ago

I figured out what the problem was, apparently my antivirus was scanning the files that were getting downloaded from the application, which was causing the error. I fixed it by adding an exception in my antivirus's settings to the watched threads directory so that it doesn't scan the thread files and avoid causing a conflict error from it.