Exception error (file in use) at wakeup from hibernation (1 Viewer)

Waltz

Portal Pro
December 14, 2004
202
0
Kiel, Germany
Area: Media Portal Program
MP Version: 0.1.0.5.1 - 0.1.1.1
Skin: MCE, MCE05 [error occurred at least on two different systems]
CPU Type: AMD Athlon XP 2100+, Intel PIII 900
Memory: 512 MB DDR, 384 MB SD
Motherboard Chipset: VIA KT400A, Medion MD3000
Video Card: GeForce FX 5200 / 128, Geforce 3 TI 200
Video Card Driver: nVidia ForceWare 66.93 WHQL
Video Render Type: VMR9
TV Card: Hauppauge WinTV PVR-150 MCE, PVR-350
TV Card Type: hardware
TV Card Driver: 2.0.18.22316 (PVR-150), 1.18.21.22266 (PVR-350)
OS: Windows XP Pro SP2
MS .NET framework version: 1.1 SP1
DirectX version: DX 9.0c

Synopsis:
Sometimes (not everytime!) when I wakeup my PC from hibernation and MediaPortal is started (after automatically entering hibernation mode via PowerScheduler) I only get a Windows error message after the booting/wakeup sequence:

MP-Bug.png


On the second system using the MCE skin it's the file "fontSVT_12.png.xml" in folder "C:\Program Files\Team MediaPortal\MediaPortal\skin\mce\fonts".

MediaPortal IS started in the background, however - while only this message window is visible in front of a black screen, MediaPortal can invisibly start XMLTV or record TV shows, it even goes into hibernation again after 10 minutes (that's my PowerScheduler setting). The log doesn't show any problem as well (see below), MP seems to load normally.
But when I press "OK", MediaPortal (still invisible) quits and the Windows desktop appears.
It's a clean Windows and MP installation with no other programs running in the background.

The MediaPortal log shows these entries [with my comments in brackets]:


[system hibernation:]
26.01.2005 13:11:31 PowerScheduler: Hibernate system

[system wakeup, error message appears:]
26.01.2005 14:17:04 PowerScheduler: System powerup detected
26.01.2005 14:17:05 card:1 video device:Hauppauge WinTV PVR PCI II Capture TV:True record:True
26.01.2005 14:17:05 PowerScheduler: Shutdown timer activated, automatic shutdown in 10 minutes
26.01.2005 14:17:05 app.Reset()
26.01.2005 14:17:06 OnDeviceReset()
26.01.2005 14:17:06 load calibration800x600.xml
26.01.2005 14:17:06 Load fonts from skin\mce05\fonts.xml
26.01.2005 14:17:06 fonts.InitializeDeviceObjects()

[pressing "OK" button, MediaPortal exits:]
26.01.2005 14:22:46 Card:1 stop
26.01.2005 14:22:46 PlugInManager.Stop()
26.01.2005 14:22:46 PowerScheduler: Stop()
26.01.2005 14:22:46 MediaPortal done
26.01.2005 14:22:46 open folderdatabase
 

bartmanson

MP Donator
  • Premium Supporter
  • December 28, 2004
    127
    35
    Nuremberg
    Home Country
    Germany Germany
    Hi Waltz,

    this bug still exists on my system (I upgraded to 0.1.0.7), but it seems that we are the only users with this problem. Does it still exist on your system, too?

    ciao,
    BartManson
     

    Waltz

    Portal Pro
    December 14, 2004
    202
    0
    Kiel, Germany
    Yes, still the same problem :(
    I've updated to version 0.1.0.7 as well, and I've reinstalled Windows XP - didn't help at all :(
     

    bartmanson

    MP Donator
  • Premium Supporter
  • December 28, 2004
    127
    35
    Nuremberg
    Home Country
    Germany Germany
    Hi Waltz, hi eepunk,

    as everybody else seems to completely ignore our problem, I developed a workaround that seems to work...

    I think the problem is on the one hand that the files that cause the exception are deleted while there is still another open file handle for read access (possibly somewhere in GUIFont.cs).

    But on the other hand those files are newly created by mediaportal if they are deleted... So I did the following:

    I take care for the deletion of those files myself. To achieve this I need two steps:

    I start mediaportal after a fresh boot with a batch file. The first action in this batch file is to delete all files in c:\program files\team mediaportal\mediaportal\skin\mce\fonts
    The second action is to start mediaportal.exe

    But unfortunately the programs in the startup folder are not executed when windows wakes up from hibernation. So I had to install another program called StartOnWake (cf. http://www.showshifter.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=2;t=003059)
    that provides startup functionality after a resume from hibernation. So I created a second batch file that deletes the content of the aforementioned folder and is started by StartOnWake.exe. You only have to make sure that StartOnWake calls the batch file before mediaportal accesses the files in this folder.

    I'm not sure if this solution is complete bullshit and works only by incident but what can I say ... At least it seems to work reliably this way... :wink:

    Maybe one of the developers can make a statement about my guesses and my workaround...

    Ciao,
    BartManson
     

    Waltz

    Portal Pro
    December 14, 2004
    202
    0
    Kiel, Germany
    Hi BartManson,

    sorry, I have not checked this thread for a while since I had lost hope... I still cannot find this bug in the Mantis Bug Tracker; what do I have to do to get some developer's attention...?

    Have you tested 0.1.0.9? Did not have the time for an update.

    But I'm glad you have found a solution! :) Thank you very much, I'll test this workaround immediately.

    - Waltz
     

    dman_lfc

    Retired Team Member
  • Premium Supporter
  • July 28, 2004
    1,772
    30
    UK
    Home Country
    New Zealand New Zealand
    I have tested this today - I cannot duplicate it after 10x Hibernations.
    Can you please detail the steps to duplicate this step by step for what you do to receive this error?
    Be very very specific about your configuration settings and the process you do to get this problem.

    Cheers

    DMAN
     

    bartmanson

    MP Donator
  • Premium Supporter
  • December 28, 2004
    127
    35
    Nuremberg
    Home Country
    Germany Germany
    Hi everybody,

    dman_lfc: The problem is that this error does IMHO not occur in a deterministic manner. Sometimes it occurs, sometimes not. The only thing I can say is that in most cases it does not occur. I think it is some kind of timing problem. As I mentioned in another post, I guess that a file handle to the XML file is still open (OS-wise) although it has already been closed by mp with the Close method. So, if mp tries to delete the file an exception is thrown. But that is just a guess.

    Nevertheless, here is my config:
    XP SP2
    NVIDIA GeForce 3 Ti 200 (latest drivers. Have to check the version number home ... ;-)
    PVR350 (latest drivers. Have to check the version number home ... ;-)
    WinTV PCI (for Nxtvepg) w/ BTWinCap driver
    .NET 1.1
    No virus scan software
    PIII 900
    TVTool 9.7 (no black border on GeForce3 tv-out)
    384MB RAM
    VIA APOLLO133 Chipset
    Medion MoBo MD3000 (not quite sure)
    Hauppauge IR-Remote tool
    MP 0.1.0.8 (error occured with previous versions, too)

    Is this sufficient?

    Waltz: The workaround from my last post didn't work reliably. In the meantime I wrote a small script in VBScript that is executed by startonwake.exe. It executes the following commands:
    1. Kill Mediaportal (tskill mediaportal.exe)
    2. Close TVTool (not relevant if you don't have tvtool. TVtools doesn't work properly after hibernate)
    3. Start TVTool (-> black border disappears :))
    4. Start Mediaportal

    Since I changed this everything works like a charm ...

    I can post the .vbs file and the corresponding startonwake.txt file from home if you are interested.

    Ciao,
    BartManson
     

    Waltz

    Portal Pro
    December 14, 2004
    202
    0
    Kiel, Germany
    dman_lfc:
    Well, I think I've already covered everything in my bug description. I don't do anything very special for causing this error to appear: I just let MP/Powerscheduler hibernate the system automatically (does so after 10 minutes) and let it wake up again (via task scheduler or manually). That's all. The error does not occur everytime I do this, but in the majority of cases it does. :(

    I've tried many different versions of MediaPortal and use only standard plugins (Powerscheduler, MyTetris, MyPrograms...) and skins (BlueTwo, MCE). It's a fresh Windows XP installation with newest drivers and there's absolutely nothing running in the background (not even a firewall or virus scanner). I don't use exotic hardware (Athlon XP, GeForce FX 5200, SoundBlaster Live! and WinTV PVR-150 MCE - not that special I think) and everything else works like a charm.

    My MP settings are mostly default. I add my TV card, configure XMLTV, add some games to "MyPrograms" - nothing special here as well. Using VMR9, fullscreen @ 800x600 - well, what do you have to know? :)

    We'd be thankful for any kind of help.
     

    Waltz

    Portal Pro
    December 14, 2004
    202
    0
    Kiel, Germany
    Thanks BartManson, I'll do this by myself with the tool pskill.exe (for killing the MP process), a simple batch file is enough for this.

    I've tried deleting the .xml files causing the error, but MP would not start without these; well, I'll make a clean installation of the newest MP version next week and use your new workaround then. This will make the startup process much slower, though...
     

    Users who are viewing this thread

    Top Bottom