Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Exception nach Resume durch LogItWithReturn?

Allgemeines zum Thema EventGhost
Post Reply
Prinz
Plugin Developer
Posts: 194
Joined: Mon Apr 07, 2008 4:58 am

Exception nach Resume durch LogItWithReturn?

Post by Prinz »

Hallo,

ich habe in meinem Log manchmal nach einem Resume aus dem Standby folgende Exception:

Code: Select all

05:25:46: ForceReleaseThread: ForceReleaseThread.run => True
05:25:46: ActionThread: StandbyControl.OSDCancel()
05:25:46: ActionThread: StandbyControl.OSDCancel => True
05:25:46: ActionThread: StandbyControl.finishThreads => True
05:25:46: ActionThread: StandbyControl.OnComputerSuspend => None
07:33:22: MessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(dummyHwnd=66228, msg=536L, wparam=18L, dummyLParam=0)
07:33:22: ActionThread: StandbyControl.OnComputerResume(suspendType=None)
07:33:32: ActionThread: StandbyControl.startThreads()
07:33:32: StandbyTimerThread: StandbyTimerThread.run()
07:33:32: ActionThread: StandbyControl.startThreads => True
07:33:32: ForceReleaseThread: ForceReleaseThread.run()
07:33:32: MessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(dummyHwnd=66228, msg=536L, wparam=7L, dummyLParam=0)
07:33:32: ActionThread: StandbyControl.OnComputerResume => True
Stack trace (most recent call last) (851):
  File "threading.pyc", line 497, in __bootstrap
  File "threading.pyc", line 522, in __bootstrap_inner
  File "threading.pyc", line 477, in run
  File "C:\Programme\System\EventGhost\eg\Utils.py", line 130, in LogItWithReturnWrapper
  File "C:\Programme\System\EventGhost\eg\Classes\ThreadWorker.py", line 169, in __MainLoop
  File "C:\Programme\System\EventGhost\eg\Classes\ThreadWorker.py", line 193, in __DoOneEvent
  File "C:\Programme\System\EventGhost\eg\Classes\ThreadWorker.py", line 39, in PumpWaitingMessages
  File "C:\Programme\System\EventGhost\eg\Classes\MessageReceiver.py", line 96, in MyWndProc
  File "C:\Programme\System\EventGhost\eg\Utils.py", line 118, in LogItWrapper
  File "C:\Programme\System\EventGhost\plugins\System\PowerBroadcastNotifier.py", line 68, in OnPowerBroadcast
  File "C:\Programme\System\EventGhost\eg\Classes\ThreadWorker.py", line 307, in CallWait
Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 295, in 'calling callback function'
  File "C:\Programme\System\EventGhost\eg\Classes\MessageReceiver.py", line 96, in MyWndProc
    res = handler(hwnd, mesg, wParam, lParam)
  File "C:\Programme\System\EventGhost\eg\Utils.py", line 118, in LogItWrapper
    return func(*args, **kwargs)
  File "C:\Programme\System\EventGhost\plugins\System\PowerBroadcastNotifier.py", line 68, in OnPowerBroadcast
    eg.actionThread.CallWait(eg.actionThread.OnComputerResume)
  File "C:\Programme\System\EventGhost\eg\Classes\ThreadWorker.py", line 309, in CallWait
    "Timeout in %s.CallWait()" % self.__class__.__name__
Exception: Timeout in ActionThread.CallWait()
07:37:18: ActionThread: StandbyControl.disableStandby()
Es gibt also einen Timeout. Der Code, der ausgef├╝hrt werden soll, sieht wie folgt aus:

Code: Select all

    @eg.LogItWithReturn
    def OnComputerResume(self, suspendType ) :
        if self.started :
            self.startThreads()
            self.threadStandby.triggerTimer( self.standbyTimeAfterWakeUp )
            return True
        else :
            return False
.
.
    @eg.LogItWithReturn
    def startThreads( self ) :
.
.
Wie man aus dem Log sieht vergehen 10s bevor der Befehl "self.startThreads()" ausgeführt wird. Dazwischen befindet sich jedoch nur die Abfrage des started-Flags, die die 10s nicht erklären kann.

Ich vermute daher, dass der Timeout irgendwie durch die eg-Funktion "LogItWithReturn" ausgel├Âst wird.
Kann man diese Trace-M├Âglichkeit in einem OnComputerResume nicht verwenden? Seltsam ist hier, dass es aber meist funktioniert.

Bin daher etwas ratlos.

Gruß
Prinz
Mein HTPC:
Mainboard: Gigabyte GA-G33M-DS2R
CPU: Intel E5200
OS: WinXP SP3
Graphic card: NVIDIA GeForce 210 512MB
TV-Cards: 2 * Digital Everywhere FloppyDTV-C, Terratec Cinergy 1200 DVB-C
HTPC software: DVB Viewer / EventGhost
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Exception nach Resume durch LogItWithReturn?

Post by Bitmonster »

Passiert denn das definitiv nicht, wenn du LogItWithReturn nicht benutzt? Bzw. wenn du EG ohne -debug benutzt, da der Decorator dann einfach die Funktion ohne Änderung durchreicht.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
Prinz
Plugin Developer
Posts: 194
Joined: Mon Apr 07, 2008 4:58 am

Re: Exception nach Resume durch LogItWithReturn?

Post by Prinz »

Bitmonster wrote:Passiert denn das definitiv nicht, wenn du LogItWithReturn nicht benutzt? Bzw. wenn du EG ohne -debug benutzt, da der Decorator dann einfach die Funktion ohne Änderung durchreicht.
Leider ist es wieder ein paar Tage nicht mehr aufgetreten, so dass eine richtige Analyse kaum m├Âglich ist.

Ich habe noch mal ein älteren Log durchgesehen. Es scheint so, dass das Problem nur auftritt, wenn der PC das erste mal nach einem Booten aus dem Standby aufwacht. Nach späteren Aufweckvorgängen habe ich es im Log nie gesehn. Da die Fehler aber doch sehr selten sind, ist es aber zweifelhaft, ob diese Beobachtung statistisch ausreichend aussagekräftig ist.

Prinzipiell ist das Problem mehr kosmetischer Natur, da es - soweit ich bisher sehe - keine weiteren Folgen hat.

Ich habe jetzt auf jeden Fall die Anweisung LogItWithReturn entfernt und beobachte weiter.

Gruß
Prinz
Mein HTPC:
Mainboard: Gigabyte GA-G33M-DS2R
CPU: Intel E5200
OS: WinXP SP3
Graphic card: NVIDIA GeForce 210 512MB
TV-Cards: 2 * Digital Everywhere FloppyDTV-C, Terratec Cinergy 1200 DVB-C
HTPC software: DVB Viewer / EventGhost
Post Reply