Next unhandled exception on some clients :(

Asked by Bartek

Hello,

since some days we have unhandled exceptions on some screens (probably produced when connection to server isbroken, for example today main sever switch was broken, co there was no way to connect server for all clients, some other day one client produced it when 3g was totally dead in it's localisation). there is error log dump:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.Win32Exception: The system cannot find the file specified
   at System.Drawing.BufferedGraphicsContext.CreateCompatibleDIB(IntPtr hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
   at System.Drawing.BufferedGraphicsContext.CreateBuffer(IntPtr src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)
   at System.Drawing.BufferedGraphicsContext.AllocBuffer(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
   at System.Drawing.BufferedGraphicsContext.AllocBufferInTempManager(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
   at System.Drawing.BufferedGraphicsContext.Allocate(IntPtr targetDC, Rectangle targetRectangle)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version:
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
XiboClient
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.0.0
    CodeBase: file:///C:/Program%20Files/Xibo%20Player/XiboClient.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Web.Services
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
----------------------------------------
System.Deployment
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
XiboClient.XmlSerializers
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.0.0
    CodeBase: file:///C:/Program%20Files/Xibo%20Player/XiboClient.XmlSerializers.DLL
----------------------------------------
System.Management
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
vuluk1tq
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
AxInterop.WMPLib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/Xibo%20Player/AxInterop.WMPLib.DLL
----------------------------------------
Interop.WMPLib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/Xibo%20Player/Interop.WMPLib.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Any ideas? appear on both 2.0 and 3.5 net installations.

Question information

Language:
English Edit question
Status:
Solved
For:
Xibo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Bartek (czajka) said :
#1

An some other client crashed silently and exited to windows exactly when server was operational again (according to log on client - last Cannot connect to server appeared on time when server was restored)

Revision history for this message
Bartek (czajka) said :
#2

OK, let's summarize:

There was a server access problem today, ethernet switch crashed so server was unavaiable for clients for ~8h.

~ 3 of them produced unhandled exception pasted above (both 2.0 and 3.5 clients). Installed on 3g/fixed connections.

~ 2 of them exited silently to windows just when server access was restored (according to log), both of them 3.5 updated clients. Both of them installed od fixed network connection

1 client produced buffer error but this is probably unrelated to server problems - its 2.0 client that i was writing about some time ago.

Revision history for this message
Alex Harrington (alexharrington) said :
#3

... but the balance of your clients were OK?

Revision history for this message
Bartek (czajka) said :
#4

I don't know what you're asking about, What 'balance'? :)

Revision history for this message
Dan Garner (dangarner) said :
#5

He means were the rest of your clients operating correcting during the outage?

Revision history for this message
Dan Garner (dangarner) said :
#6

I did have an exception like this myself once... it was something to do with double buffering windows (to reduce flicker).

Is there anything of note in the Windows Application event log, or in the Xibo log?

Revision history for this message
Bartek (czajka) said :
#7

Yes, most of them working ok.

I have now 49 client now (and next 10 in production started today :)), someting about 1/2 online, 1/2 offline (internet connection is plugged one-two times by month when syncing playlists)

So ~20 online clients survived downtime correctly.

Revision history for this message
Bartek (czajka) said :
#8

With one exception? :)

'Buffer', double buffering etc excepion happened only once in the past, also after searching internet i've found information taht it is some error in 2.0 net, so 3.5 update should fix this. And there is no those errors on 3.5 installations.

But those 'The system cannot find the file specified' never happened before :/ one of them appeared yesterday on offline terminal (internet stopped to work there on it 15.01 and there was no connection since then)
Today appeared on 3 next terminals that are avaiable online, during downtime (of after/before - hard to say, there is no specified time when exeption was raised. Xibo log is empty it that subject - only stardard 'Cannot connect to server messages'.

And two mentioned clients exited silently. Last message is 'Cannot connect to server' with time just before server was repaired. When camera views were recovered there was only windows desktop.

Revision history for this message
Dan Garner (dangarner) said :
#9

I have no idea how we can begin to track this down... my only suggestion is that you run a debug client on one of the displays that failed. You should set it up to always log to file and hopefully that will shed some light on the situation.

Sorry I can't provide any more useful information

Revision history for this message
Bartek (czajka) said :
#10

Generally, i was thinking about running debug version on all clients for some months, but probably plaintext log would generate lot of big files.
Maybe there is a way to compress log onthefly using some stream compressor like gzip or something? Or rotating log daily, to allow compress them later by some cronjob, etc?

Revision history for this message
Dan Garner (dangarner) said :
#11

I don't imagine the log output will be >that< big... however you could write a simple scheduled task which would move the current file name to one with the date appended.

Revision history for this message
Bartek (czajka) said :
#12

Today next client exposed The system cannot find the file specified error :(

So i've just compiled lastest 1.0.7 branch with debug option on and i'm going to put it on some clients.

Anyway, XiboClient.exe.config formatting (tabs, new lines etc) is broken, probably in effect of last changes. Not very important at all :)

Revision history for this message
Bartek (czajka) said :
#13

Hi,

I've already installed debug version on some clients to check some problems, (for example when downloading new files, od copying them from usb, client stops responding ang hangs on black screen / splashscreen, some clients exiting when there is net problem, some of them stop talking to server sometimes etc.), but generally there is one inconvinience - there is no timestamps on log. In effect it's hard to guess when some messages were reprted. Yes, of course, there is last modified info on file, but timestamps should be much more usable to look back into log....
Is there any place in the code where can I add date function invocation to prepend it to every log message?

Revision history for this message
Alex Harrington (alexharrington) said :
#14

Bartek has opened a new thread on this here:
https://answers.launchpad.net/xibo/+question/100214

Marking original thread solved.