Author Topic: Miranda loses privileges to write after an unspecified amount of time  (Read 2847 times)

0 Members and 1 Guest are viewing this topic.

Offline Vulpix

Hello!

I'm having - and have been having this issue for a very long time now. Maybe months... I've discussed it with a few people before but I can't seem to be able to reproduce it _reliably_ (but it does happen all the time!) or to figure out why it's happening.

Essentially what happens is - Miranda loses the ability to write anywhere but to the already opened file handles (so for example the dat file for the database is unaffected, but everything else is).

I am not sure if this pertains only to windows 10 but I don't remember this happening on any other version.

Symptoms:

- New avatars retrieved from contacts cannot be saved
- File transfers in both ways instantly fail
- checking for updates comes back with an error message "error checking for updates".
- if you have netlog enabled, netlog just suddenly ends and doesn't write any more data.
- it happens after some time of miranda running, i.e. it's not something that happens when you start it.

Netlog doesn't work so no traces - you simply see the last message that miranda was able to write before it lost the ability to do so. I've checked it and it's just a generic message from steam protocol, polling for data. Nothing unusual.

Console still works.

Checking for updates shows this:
Plugin updater:
Spoiler
[11:10:15 2324] [PluginUpdater] (02681E50:8724) Connection closed internal
[11:10:15 2324] [PluginUpdater] (02681E50:4294967295) Connection closed
[11:10:15 2324] [PluginUpdater] Opening C:\Users\Vulpix\AppData\Local\Temp failed
[close]

-> unable to write.

Tox protocol, trying to retrieve a new avatar:

Spoiler
[8:34:48 19B8] [FoxyToxy] CToxProto::OnConnectionStatusChanged: failed to open avatar file
[8:34:48 19B8] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (63)
[8:35:13 19B8] [FoxyToxy] CToxProto::OnConnectionStatusChanged: failed to open avatar file
[8:41:59 19B8] [FoxyToxy] CToxProto::OnConnectionStatusChanged: failed to open avatar file
[8:41:59 19B8] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (0)
[8:41:59 19B8] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled
[9:23:56 19B8] [FoxyToxy] CToxProto::OnConnectionStatusChanged: failed to open avatar file
[9:23:56 19B8] [FoxyToxy] CToxProto::OnFriendFile: incoming avatar (65536) from (38)
[9:23:56 19B8] [FoxyToxy] CToxProto::CancelTransfer: Transfer (65536) is canceled
[9:54:29 1BA8] [FoxyToxy] CToxProto::SetStatus: changing status from 40073 to 40072
[10:21:50 19B8] [FoxyToxy] CToxProto::OnConnectionStatusChanged: failed to open avatar file
[close]


You get the idea.

When I exit miranda, it closes without a trace but it also generates some errors, a regular windows appcrash:

Spoiler
Description
Faulting Application Path:   D:\Programs\Programs\Miranda NG\Miranda32.exe

Problem signature
Problem Event Name:   APPCRASH
Application Name:   Miranda32.exe
Application Version:   0.95.6.17205
Application Timestamp:   57be6e45
Fault Module Name:   AvatarHistory.dll_unloaded
Fault Module Version:   0.1.0.1
Fault Module Timestamp:   57bbcad9
Exception Code:   c000041d
Exception Offset:   00002dfa
OS Version:   10.0.14393.2.0.0.768.101
Locale ID:   1033
Additional Information 1:   72c0
Additional Information 2:   72c01ae1c3534a6d73705a2a10951572
Additional Information 3:   79c5
Additional Information 4:   79c560c104ffb30f0cf44e857c725356
[close]

It also writes a bit of data into the netlog again! Nothing unusual once more though... but it's as if it suddenly regains its ability to write.

It also wrote THREE crash dumps at once:

1:
Spoiler
Miranda Crash Report from 26 Aug 2016 11:31:06. Crash Dumper v.0.0.5.2
Exception: Access Violation at address 156EB986. DEP at address 156EB986.

Stack Trace:
---------------------------------------------------------------
156EB986 ((module-name not available) 00000000): (filename not available) (0): (function-name not available)
7568D273 (USER32 75660000): (filename not available) (0): SetManipulationInputTarget
7566E84A (USER32 75660000): (filename not available) (0): DispatchMessageW
7566E1A4 (USER32 75660000): (filename not available) (0): DispatchMessageW
7566DF60 (USER32 75660000): (filename not available) (0): DispatchMessageW
121A49E9 (mir_app 12180000): c:\sources\miranda_ng_compilation\src\mir_app\src\miranda.cpp (284): mir_main
00401999 (Miranda32 00400000): c:\sources\miranda_ng_compilation\src\miranda32\src\miranda.cpp (65): wWinMain
004011B2 (Miranda32 00400000): f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c (547): __tmainCRTStartup
74E962C4 (KERNEL32 74E80000): (filename not available) (0): BaseThreadInitThunk
77780609 (ntdll 77720000): (filename not available) (0): RtlSubscribeWnfStateChangeNotification
777805D4 (ntdll 77720000): (filename not available) (0): RtlSubscribeWnfStateChangeNotification
[close]

2:
Spoiler
Miranda Crash Report from 26 Aug 2016 11:31:06. Crash Dumper v.0.0.5.2

Likely cause of the crash plugin: Crash dumper

Exception: Access Violation at address 14522DFA. DEP at address 14522DFA.

Stack Trace:
---------------------------------------------------------------
14522DFA ((module-name not available) 00000000): (filename not available) (0): (function-name not available)
7568D273 (USER32 75660000): (filename not available) (0): SetManipulationInputTarget
7566E84A (USER32 75660000): (filename not available) (0): DispatchMessageW
7566E480 (USER32 75660000): (filename not available) (0): DispatchMessageW
75678AD9 (USER32 75660000): (filename not available) (0): MsgWaitForMultipleObjectsEx
7778FEF6 (ntdll 77720000): (filename not available) (0): KiUserCallbackDispatcher
7568D273 (USER32 75660000): (filename not available) (0): SetManipulationInputTarget
7567E442 (USER32 75660000): (filename not available) (0): MapDialogRect
7567E385 (USER32 75660000): (filename not available) (0): MapDialogRect
7567D940 (USER32 75660000): (filename not available) (0): MapDialogRect
7567D864 (USER32 75660000): (filename not available) (0): MapDialogRect
7568D273 (USER32 75660000): (filename not available) (0): SetManipulationInputTarget
7566E84A (USER32 75660000): (filename not available) (0): DispatchMessageW
7569760B (USER32 75660000): (filename not available) (0): EndTask
7567D1E2 (USER32 75660000): (filename not available) (0): CallMsgFilterW
7567C17A (USER32 75660000): (filename not available) (0): CreateDialogIndirectParamAorW
756EB2A7 (USER32 75660000): (filename not available) (0): SoftModalMessageBox
756E8E0B (USER32 75660000): (filename not available) (0): MessageBoxW
756E8B1E (USER32 75660000): (filename not available) (0): MessageBoxTimeoutW
756E887B (USER32 75660000): (filename not available) (0): MessageBoxExW
756E8B68 (USER32 75660000): (filename not available) (0): MessageBoxW
149C4EB6 (CrashDumper 149C0000): c:\sources\miranda_ng_compilation\plugins\crashdumper\src\dumper.cpp (685): CreateCrashReport
149C392B (CrashDumper 149C0000): c:\sources\miranda_ng_compilation\plugins\crashdumper\src\exhndlr.cpp (99): myfilterWorker
149C39E4 (CrashDumper 149C0000): c:\sources\miranda_ng_compilation\plugins\crashdumper\src\exhndlr.cpp (115): myfilter
748CD822 (KERNELBASE 74770000): (filename not available) (0): UnhandledExceptionFilter
777BDC00 (ntdll 77720000): (filename not available) (0): LdrSetAppCompatDllRedirectionCallback
777805D4 (ntdll 77720000): (filename not available) (0): RtlSubscribeWnfStateChangeNotification
[close]

3:
Spoiler
Miranda Crash Report from 26 Aug 2016 11:31:07. Crash Dumper v.0.0.5.2

Likely cause of the crash plugin: Crash dumper

Exception: Access Violation at address 14522DFA. DEP at address 14522DFA.

Stack Trace:
---------------------------------------------------------------
14522DFA ((module-name not available) 00000000): (filename not available) (0): (function-name not available)
7568D273 (USER32 75660000): (filename not available) (0): SetManipulationInputTarget
7566E84A (USER32 75660000): (filename not available) (0): DispatchMessageW
7566E480 (USER32 75660000): (filename not available) (0): DispatchMessageW
75678AD9 (USER32 75660000): (filename not available) (0): MsgWaitForMultipleObjectsEx
7778FEF6 (ntdll 77720000): (filename not available) (0): KiUserCallbackDispatcher
756E74BF (USER32 75660000): (filename not available) (0): DrawStateA
7568D273 (USER32 75660000): (filename not available) (0): SetManipulationInputTarget
7567E442 (USER32 75660000): (filename not available) (0): MapDialogRect
7567E385 (USER32 75660000): (filename not available) (0): MapDialogRect
7567D940 (USER32 75660000): (filename not available) (0): MapDialogRect
7567D864 (USER32 75660000): (filename not available) (0): MapDialogRect
7568D273 (USER32 75660000): (filename not available) (0): SetManipulationInputTarget
7566E84A (USER32 75660000): (filename not available) (0): DispatchMessageW
7569760B (USER32 75660000): (filename not available) (0): EndTask
7567D1E2 (USER32 75660000): (filename not available) (0): CallMsgFilterW
7567C17A (USER32 75660000): (filename not available) (0): CreateDialogIndirectParamAorW
756EB2A7 (USER32 75660000): (filename not available) (0): SoftModalMessageBox
756E8E0B (USER32 75660000): (filename not available) (0): MessageBoxW
756E8B1E (USER32 75660000): (filename not available) (0): MessageBoxTimeoutW
756E887B (USER32 75660000): (filename not available) (0): MessageBoxExW
756E8B68 (USER32 75660000): (filename not available) (0): MessageBoxW
149C4EB6 (CrashDumper 149C0000): c:\sources\miranda_ng_compilation\plugins\crashdumper\src\dumper.cpp (685): CreateCrashReport
149C392B (CrashDumper 149C0000): c:\sources\miranda_ng_compilation\plugins\crashdumper\src\exhndlr.cpp (99): myfilterWorker
149C39E4 (CrashDumper 149C0000): c:\sources\miranda_ng_compilation\plugins\crashdumper\src\exhndlr.cpp (115): myfilter
748CD822 (KERNELBASE 74770000): (filename not available) (0): UnhandledExceptionFilter
777C607F (ntdll 77720000): (filename not available) (0): LdrResolveDelayLoadsFromDll
7778FE66 (ntdll 77720000): (filename not available) (0): KiUserApcDispatcher
777A2384 (ntdll 77720000): (filename not available) (0): RtlConvertUlongToLargeInteger
7778FF1F (ntdll 77720000): (filename not available) (0): KiUserExceptionDispatcher
7566E84A (USER32 75660000): (filename not available) (0): DispatchMessageW
7566E480 (USER32 75660000): (filename not available) (0): DispatchMessageW
75678AD9 (USER32 75660000): (filename not available) (0): MsgWaitForMultipleObjectsEx
7778FEF6 (ntdll 77720000): (filename not available) (0): KiUserCallbackDispatcher
7568D273 (USER32 75660000): (filename not available) (0): SetManipulationInputTarget
7567E442 (USER32 75660000): (filename not available) (0): MapDialogRect
7567E385 (USER32 75660000): (filename not available) (0): MapDialogRect
7567D940 (USER32 75660000): (filename not available) (0): MapDialogRect
7567D864 (USER32 75660000): (filename not available) (0): MapDialogRect
7568D273 (USER32 75660000): (filename not available) (0): SetManipulationInputTarget
7566E84A (USER32 75660000): (filename not available) (0): DispatchMessageW
7569760B (USER32 75660000): (filename not available) (0): EndTask
7567D1E2 (USER32 75660000): (filename not available) (0): CallMsgFilterW
7567C17A (USER32 75660000): (filename not available) (0): CreateDialogIndirectParamAorW
756EB2A7 (USER32 75660000): (filename not available) (0): SoftModalMessageBox
756E8E0B (USER32 75660000): (filename not available) (0): MessageBoxW
756E8B1E (USER32 75660000): (filename not available) (0): MessageBoxTimeoutW
756E887B (USER32 75660000): (filename not available) (0): MessageBoxExW
756E8B68 (USER32 75660000): (filename not available) (0): MessageBoxW
149C4EB6 (CrashDumper 149C0000): c:\sources\miranda_ng_compilation\plugins\crashdumper\src\dumper.cpp (685): CreateCrashReport
149C392B (CrashDumper 149C0000): c:\sources\miranda_ng_compilation\plugins\crashdumper\src\exhndlr.cpp (99): myfilterWorker
149C39E4 (CrashDumper 149C0000): c:\sources\miranda_ng_compilation\plugins\crashdumper\src\exhndlr.cpp (115): myfilter
748CD822 (KERNELBASE 74770000): (filename not available) (0): UnhandledExceptionFilter
777BDC00 (ntdll 77720000): (filename not available) (0): LdrSetAppCompatDllRedirectionCallback
777805D4 (ntdll 77720000): (filename not available) (0): RtlSubscribeWnfStateChangeNotification
[close]


Initially I thought it happens at a specific time but it seems to be a completely unspecific time. Sometimes it works just fine for a few days, other time I wake up and miranda is already "broken".

How can I help diagnose/debug this? I checked windows event logs around that time but I found nothing.

It's not UAC because as I said before, Miranda runs just fine when you first start it. Furthermore I tried setting miranda to run as administrator (even though I am one) and it still happens. On top of that, it also happens on a computer where I have disabled UAC completely and I'm running as the built-in administrator (don't do this on your windows 10, it disables store and all the "apps"). It also happens on a completely normal windows 10 though, with UAC turned on.

What is happening here? How can I troubleshoot this to get it fixed? It's been bothering me a lot in the past few months but I thought it might have something to do with me using remote desktop. However in this case I have not used it and it still happened, and it was on a completely different PC as well!
« Last Edit: 26 08 2016, 09:45:29 by Vulpix »
 

Offline Vulpix

Hah!

This is SUPER IMPROBABLE but it appears that ghazan has fixed this. It is so funny that after months of it annoying me, I finally wrote a long post about the problem and it's already fixed :D

Apparently it's fixed by: http://trac.miranda-ng.org/changeset/17206/ (and the subsequent patch)

I'm going to observe the issue and if it does not reoccur within 14 days, you can mark this as resolved.

Thanks @ghazan !
 

Offline AnrDaemon

I skimmed through the commit and I think I understand why this could have caused issues. Nice one, ghazan. Hat off. :)
 

Offline Vulpix

Unfortunately, the issue occurred again today :( So it's not fixed. I'll talk to Ghazan.