Unhandled exception - Object reference not set to an instance of an object

Asked by Mondlicht

I upgraded our Xibo server from 1.3 to 1.4.2. After adapting all my layouts, I get every now and then following exception:

Microsoft .NET Framework
Unhandled exception has occurred in your application If you click
Continue, the application will ignore this error and attempt to continute. If
you click Quit, the application will close immediately.

Object reference not set to an instance of an object.

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

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at XiboClient.Region.StopMedia(Media media)
   at XiboClient.Region.EvalOptions()
   at XiboClient.Region.media_DurationElapsedEvent(Int32 filesPlayed)
   at XiboClient.Media.SignalElapsedEvent()
   at XiboClient.Media.timer_Tick(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.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: 2.0.50727.5466 (Win7SP1GDR.050727-5400)
    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%20(x86)/Xibo%20Player/XiboClient.exe
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    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.5420 (Win7SP1.050727-5400)
    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.5420 (Win7SP1.050727-5400)
    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.5420 (Win7SP1.050727-5400)
    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.5420 (Win7SP1.050727-5400)
    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%20(x86)/Xibo%20Player/XiboClient.XmlSerializers.DLL
----------------------------------------
System.Management
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Management/2.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
10fq39c0
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
vxx_tzj-
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
FeedDotNet.Common
    Assembly Version: 1.2.1.1
    Win32 Version: 1.2.1.1
    CodeBase: file:///C:/Program%20Files%20(x86)/Xibo%20Player/FeedDotNet.Common.DLL
----------------------------------------
FeedDotNet
    Assembly Version: 1.2.1.1
    Win32 Version: 1.2.1.1
    CodeBase: file:///C:/Program%20Files%20(x86)/Xibo%20Player/FeedDotNet.DLL
----------------------------------------
FeedDotNet.Modules
    Assembly Version: 1.2.1.1
    Win32 Version: 1.2.1.1
    CodeBase: file:///C:/Program%20Files%20(x86)/Xibo%20Player/FeedDotNet.Modules.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.

---------------------------------------------

I tried to create a completely new layout, added some background, some RSS feeds and a web page - really nothing special. And the error also occurs with this "fresh" layout after one minute.
I can reproduce it immediately if I close the Xibo Client, remove all files from the Xibo Library folder and restart it. Then it takes less than one minute until I get it again.

Can you please tell me if I have some problem with my client PC (I have it on 2 machines, one WinXP and one Win7), or is there really some bug in Xibo?

...I'm close to falling back to Xibo 1.3.1, although this means a lot of work...

Question information

Language:
English Edit question
Status:
Solved
For:
Xibo Edit question
Assignee:
No assignee Edit question
Solved by:
Mondlicht
Solved:
Last query:
Last reply:
Revision history for this message
Mondlicht (mond-licht) said :
#1

....and of course I also updated all the clients to 1.4.2.

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

What is shown on the client information screen as it crashes? You can get the information screen up by pressing i

Revision history for this message
Mondlicht (mond-licht) said :
#4

This is the information:

Schedule Status: Sleeping
LayoutId: 10. Runs from 01.01.0001 00:00:00

Required Files Status: Sleeping
layout: 10.xlf. (100%)
media: 48.jpg. (100%)

ScheduleManagerThread 25.03.2013 16:28:32 Error ScheduleManager - LoadNewSchedule Layout invalid: 10
UI Thread 25.03.2013 16:28:32 Error Main Form - ChangeToNextLayout Unable to change layout: Default layout

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

You're certain your layout has no empty regions?

The client is saying the layout is invalid for some reason.

Revision history for this message
Mondlicht (mond-licht) said :
#6

Yes. I am pretty sure. And when I do not remove all content from the Xibo Library folder, I don't get those errors. Maybe this "Invalid" error is only thrown because initially it is not yet existing?

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

Yes, it could be, but your information shows the download as complete and if that's the last message before it crashes then I don't see what else it could be.

Have you also tried clearing the cachemanager object file?

Revision history for this message
Mondlicht (mond-licht) said :
#8

Meanwhile I am sure that those errors come from XiboLibrary being empty in the beginning.

Cachemanager object file? What do you mean? Where can I find it? I guess you don't mean the Temporary Internet Files of IE?

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

c:\users\username\AppData\Roaming\Xibo\Xibo Digital Signage\2.0.0.0

in particular cacheManager.xml, but you may as well clear all the files in that folder while you're there.

Alex

Revision history for this message
Mondlicht (mond-licht) said :
#10

The only thing I can find there is C:\Users\<username>\AppData\Local\Xibo\XiboClient.exe_Url_***\user.config - I doubt that I should delete this.

I meanwhile set the log level to Audit instead of Error - unfortunately saving the log file does not create a file.... It should be this one: C:\Program Files (x86)\Xibo Player\XiboLog.txt

Revision history for this message
Mondlicht (mond-licht) said :
#11

This is a very simple layout I created, consisting of 2 regions, with
- 2 RSS feeds
- 1 picture, 1 RSS feed
When having the XiboLibrary empty, I get the error.

<?xml version="1.0"?>
<layout schemaVersion="1" width="800" height="450" bgcolor="#000000" background="18.jpg">
 <region id="515074a1730ee" userId="1" width="462" height="335" top="5" left="338">
  <media id="2" type="image" duration="10" lkid="22" userId="1" schemaVersion="1">
         <options><uri>2.jpg</uri></options>
         <raw/>
  </media>
  <media id="0cad654284e3e3e230b4be1b93a7fb6b" type="ticker" duration="30" lkid="" userId="1" schemaVersion="1">
   <options>
    <direction>single</direction>
    <copyright/>
    <scrollSpeed>2</scrollSpeed>
    <updateInterval>10</updateInterval>
    <uri>http%3A%2F%2Fwww.spiegel.de%2Findex.rss</uri>
    <numItems>4</numItems>
    <takeItemsFrom>start</takeItemsFrom>
    <durationIsPerItem>0</durationIsPerItem>
    <fitText>0</fitText>
   </options>
   <raw>
    <template><![CDATA[<p>
   [Title] - [Date] - [Description]</p>
  ]]></template>
   </raw>
  </media>
 </region>
 <region id="5150770e97ffb" userId="1" width="217" height="286" top="50" left="50">
  <media id="8df13fed744a1b0eb41850948d0adb08" type="ticker" duration="30" lkid="" userId="1" schemaVersion="1">
   <options>
    <direction>single</direction>
    <copyright/>
    <scrollSpeed>2</scrollSpeed>
    <updateInterval>5</updateInterval>
    <uri>http%3A%2F%2Fwww.spiegel.de%2Findex.rss</uri>
    <numItems>3</numItems>
    <takeItemsFrom>start</takeItemsFrom>
    <durationIsPerItem>0</durationIsPerItem>
    <fitText>0</fitText>
   </options>
   <raw>
    <template><![CDATA[<p>
  [Title] - [Date] - [Description]</p>
 ]]></template>
   </raw>
  </media>
  <media id="f5a9625613cbb046f5c7fcb5a08c956a" type="ticker" duration="30" lkid="" userId="1" schemaVersion="1">
   <options>
    <direction>none</direction>
    <copyright/>
    <scrollSpeed>2</scrollSpeed>
    <updateInterval>360</updateInterval>
    <uri>http%3A%2F%2Fwww.faz.net%2Fs%2FRub%2FTpl%7EEpartner%7ESRss_.xml</uri>
    <numItems>5</numItems>
    <takeItemsFrom>start</takeItemsFrom>
    <durationIsPerItem>0</durationIsPerItem>
    <fitText>0</fitText>
   </options>
   <raw>
    <template><![CDATA[<p>
  [Title] - [Date] - [Description]</p>
 ]]></template>
   </raw>
  </media>
 </region>
</layout>

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

You must have a cacheManager.xml file somewhere. Search the hard drive, but it should be at the location I mentioned. If not, perhaps the client doesn't have permissions to write there? Or if you're on a domain perhaps there's a policy either redirecting that location elsewhere or preventing a write?

Alex

Revision history for this message
Mondlicht (mond-licht) said :
#13

Good morning! I finally found the location. Removing everything in this folder also didn't help. But now I have a logfile, which I could send you if it helps.

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

Only if it has something that looks like an error in it.

Where was the file in the end, because it should have been where I said?

Revision history for this message
Mondlicht (mond-licht) said :
#15

I found the log entry which is always visible when the error occurs:

Audit: <message>Starting media</message><method>Region - StartMedia</method><logdate>26.03.2013 09:09:13</logdate><thread>UI Thread</thread>
[*]ScheduleID:87,LayoutID:17,MediaID:8df13fed744a1b0eb41850948d0adb08,Message:Cannot access a disposed object.
Object name: 'WebBrowser'.

Revision history for this message
Mondlicht (mond-licht) said :
#16

The path was on partition D... should have checked this earlier, sorry.
D:\userdata\<username>\Application Data\Xibo\Xibo Digital Signage\2.0.0.0

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

So I'm wondering what's causing it to be written there? Do you have some kind of folder redirection setup on the PC?

Revision history for this message
Mondlicht (mond-licht) said :
#18

Yes. Domain specific.

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

Could you test with a profile that doesn't have any folder redirection setup please?

Revision history for this message
Mondlicht (mond-licht) said :
#20

I tried on the WinXP client, this one is not in a domain. I got the same result there. Deleting all the files including Cachemanager.xml didn't help.

Path:
C:\Documents and Settings\<username>\Application Data\Xibo\Xibo Digital Signage\2.0.0.0

errors in the log file:
Audit: <message>Starting media</message><method>Region - StartMedia</method><logdate>26.03.2013 10:28:28</logdate><thread>UI Thread</thread>
[*]ScheduleID:0,LayoutID:10,MediaID:496f9a4c713d1200dadedd95e1608783,Message:Cannot access a disposed object.
Object name: 'WebBrowser'.
[*]ScheduleID:0,LayoutID:10,MediaID:489d67df2db0890f2e78a66720deb576,Message:Cannot access a disposed object.
Object name: 'WebBrowser'.
Audit: <message>Schedule Timer Ticked</message><method>ScheduleManager - Run</method><logdate>26.03.2013 10:28:30</logdate><thread>ScheduleManagerThread</thread>
[*]ScheduleID:0,LayoutID:10,MediaID:8c8518a38691c3f984aa13897bb4c75a,Message:Cannot access a disposed object.
Object name: 'WebBrowser'.

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

I'm out of ideas then. There has to be something in the layout or the environment that's causing this as I've not seen that message before. Sorry.

Revision history for this message
Mondlicht (mond-licht) said :
#22

As said in #11, the error occurs with a very simple layout. I don't think it's a problem of the layout....

Any suggestions what to do now? Contact someone else? Fallback to 1.3.1?

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

Needs Dan to look at it with you really.

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

Can you try this XiboClient.exe - replace the version you already have in Program Files:

https://www.dropbox.com/s/4eus5n3y56pvuug/XiboClient.exe

Revision history for this message
Mondlicht (mond-licht) said :
#25

Ok. But thanks a lot for your time!

Revision history for this message
Mondlicht (mond-licht) said :
#26

On the Win7 machine I don't get this error anymore. Have to check on the WinXP later on. What did you change?

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

It's a pre-release version of 1.5.0 - which has a fix for a potential exception being thrown when media is disposed. I'm not sure why it should fix the error you're having though, but if it does, then that's great :)

Revision history for this message
Mondlicht (mond-licht) said :
#28

Also working fine on the WinXP machine. Thanks a lot!

...now the next problem would be that I get the same error box with text "Out of memory" afer 1-3 hours....(I get this with both client versions, the official one and yours) Can it be that this client consumes now more memory than before?

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

It shouldn't. It's possible you're seeing the same issue as here:

https://answers.launchpad.net/xibo/+question/223416

It's on Dan's list to look at.

Revision history for this message
Mondlicht (mond-licht) said :
#30

Yes, this sounds pretty much as my issue. I'll track the other question.

Thanks for your help!