WreckedAvent / slimCat

slimCat F-Chat Client
Other
27 stars 17 forks source link

Notification logging cause slimCat to crash for certain characters. #440

Open Davedave000 opened 5 years ago

Davedave000 commented 5 years ago

slimCat crashes completely at random when using certain characters, usually within the first few minutes. According to the exception report; notification logs are involved in this somehow. I do not open notification logs while using slimCat. Deleting the notifications folder does not fix the problem either. Here is the full report;

====================================
BEGIN EXCEPTION REPORT
10/13/2019 6:10:11 PM
====================================

Version: slimCat Cheetah 5.013 dev
Exception: The process cannot access the file 'C:\Users\daved\AppData\Roaming\slimCat\Lunar Eclipse\!Notifications\10-13-2019.txt' because it is being used by another process.
Occured at: mscorlib

Immediate stack trace: Void WinIOError(Int32, System.String)   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)
   at slimCat.Services.LoggingService.AccessLog(String title, String id)
   at slimCat.Services.LoggingService.LogMessage(String title, NotificationModel model)
   at slimCat.Services.NotificationService.<>c__DisplayClass0_1.<.ctor>b__0(NotificationModel notification)
   at slimCat.Utilities.GeneralExtensions.NotifyWithSettings(IManageToasts toasts, NotificationModel notification, NotifyLevel notifyLevel)
   at slimCat.Models.CharacterUpdateInChannelEventArgs.DoToast(ChannelSettingPair setting, IManageToasts toastManager, IChatState chatState)
   at slimCat.Models.JoinLeaveEventArgs.DisplayNewToast(IChatState chatState, IManageToasts toastsManager)
   at slimCat.Models.CharacterUpdateModel.DisplayNewToast(IChatState chatState, IManageToasts toastsManager)
   at slimCat.Services.NotificationService.HandleNotification(NotificationModel notification)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.InvokeAction(Action`1 action, TPayload argument)
   at Microsoft.Practices.Prism.Events.EventSubscription`1.<>c__DisplayClass2.<GetExecutionStrategy>b__0(Object[] arguments)
   at Microsoft.Practices.Prism.Events.EventBase.InternalPublish(Object[] arguments)
   at Microsoft.Practices.Prism.Events.CompositePresentationEvent`1.Publish(TPayload payload)
   at slimCat.Utilities.EventExtensions.NewUpdate(IEventAggregator events, NotificationModel update)
   at slimCat.Services.ServerCommandService.JoinChannelCommand(IDictionary`2 command)
   at slimCat.Services.ServerCommandService.AutoJoinChannelCommand(IDictionary`2 command)
   at slimCat.Services.ServerCommandService.EnqueueAction(IDictionary`2 data)
   at Microsoft.Practices.Prism.Events.BackgroundEventSubscription`1.<>c__DisplayClass5.<InvokeAction>b__4(Object o)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

====================================
END EXCEPTION REPORT
====================================