Main Site Documentation

Deploy error when display is connected (Null reference exception in Microsoft.SPOT.TinyCore.dll)


#1

Hi

I’m getting a null reference exception when deploying to the device. It seems to be only when the display is connected.

First run on the deploy:

Updating display configuration. THE MAINBOARD WILL NOW REBOOT.
If you are deploying/debugging using Visual Studio, you will need to stop (Shift-F5) and start debugging again (F5).

Restarting the debugging session, and then I get Null reference exception in Microsoft.SPOT.TinyCore.dll:

The thread ‘’ (0x2) has exited with code 0 (0x0).
Using mainboard GHIElectronics-FEZSpider version 1.0
Program Started
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (3) ####
#### Message:
#### Microsoft.SPOT.Application::OnEvent [IP: 0098] ####
#### Microsoft.SPOT.EventSink::ProcessEvent [IP: 0023] ####
#### Microsoft.SPOT.EventSink::EventDispatchCallback [IP: 0014] ####
A first chance exception of type ‘System.NullReferenceException’ occurred in Microsoft.SPOT.TinyCore.dll
An unhandled exception of type ‘System.NullReferenceException’ occurred in Microsoft.SPOT.TinyCore.dll

The only way I have found to get back from the exception is to erase using the MFDeploy.exe tool. But still it will go the same way from the beginning with updating display firmware…

If no display is connected, it works fine.

I posted on this a few weeks ago on the display error thread and got a few tips. But now I have tested with the new framework so I started a new thread, hope that’s ok.

/John


#2

Can you step us through it so we can see if we can reproduce on our end?


#3

The steps to reproduce for me is just to create a new project with button, camera and display. Running the debugger one time (get the update message for display) and then reset the debugger. Second time it will throw an exception.

Not sure what steps to include for you to reproduce. I’t seems to me that it is such a simple setup. I can give you a demo on teamviewer if that would help, in that case contact me on skype: johnkarbin


#4

What if you have a project with display only?

We will try here but not sure if we will be able to repro!

You have Spider Kit right?


#5

Yes, spider kit

Same thing with only the display connected.


#6

Noticed that after the deploy and exception ping response is this:

Pinging… TinyCLR
#### Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (3) ####


#7

In the designer, do you have all 4 cables connected, including (T) for touch? And on your actual display, do you just have the 3 (R,G,B)?


#8

All four connected. I tested with only 3, and that works! Nothing is visible on the display, but it does not throw exception when deploying.


#9

Gus: All documentation i have found says that cable 4 needs to be connected. Is there any test program that I can run for the display?


#10

You might try this.

http://code.tinyclr.com/project/411/glide-buttons-and-gadgeteer-demo/


#11

No deployment problem with your project. Thanks!

Still there is something strange with the display. I can at some times get a few seconds of displaying the buttons (or the loading text), but then the screen goes black. If i hit the reset button, it will come visible for a second or so (with a white line across the middle display). I have tested quite a few different power supply’s and verified that i have the correct polarity. Any suggestions on where to go from here would be very much appreciated.

/John


#12

What are you using for power?


#13

Last attempt was a 18.5V 3.5A (shredded a hp laptop adapter). Previous to that I have tested 12V 500mA, and a couple of others. 18.5 is the highest I have tested.


#14

I am not sure.


#15

Can you be more specific about what?
I have also tested with a separate usb-hub with and without external power. This error has me thinking that the hardware (display or something else in the fez kit) is broken.


#16

I am not sure why or how this can be happening. It could be hardware but I still do not see what would cause sch symptoms.

Do you want to send me the kit so I can run few tests?


#17

Well if that is the only option. I guess I will have no device for quite some time. Is it possible to send me a replacement kit so I can continue developing?


#18

Please email/phone GHI directly.


#19

Well, after a month of testing with no luck at all… I got the spider replaced, and now it all works right out of the box. At least I got to know my way around some of the debugging options :slight_smile:

So if you experience the problems above: RMA


#20

Hi,

I’m having the same problem following the almost same steps that John mentioned.

How can I get around this.

Follows the settings of my environment:

Hardware:

Fez Spider Mainboard 1.0
Button 1.4
Camera 1.1
Display T35 1.3
SDCard 1.4
USBClient DP 1.3 (Only Power Supply)
SanDisk MicroSDHC 4Gb class 2
SanDisk MicorSDHC Adapter

Fez Config:

Loader (TinyBooter) version information:
4.2.11.1 on this computer.
4.2.11.1 on this device

Firmware (TinyCLR) version information:
4.2.11.1 on this computer.
4.2.11.1 on this device.

Software

VS2012
MicroFrameworkSDK NETMF SDK 4.3 (RTM) for VS2012
MicroFrameworkSDK NETMF SDK 4.2 (RTM QFE2) for VS2010
GHI NETMF v4.2 and Gadgeteer Package 2013 R3

My screen is showing the following:

EMX
Version : 4.2.11.1
Debug : USB1
LCD : 320X240

But soon after starting Degug an error is shown :

# # # Exception System.NullReferenceException - CLR_E_NULL_REFERENCE (4) # # #

# # # Message :

# # # Microsoft.SPOT.Application :: OnEvent [ IP : 0090 ] # # #

# # # Microsoft.SPOT.EventSink :: ProcessEvent [ IP : 0023 ] # # #

# # # Microsoft.SPOT.EventSink :: EventDispatchCallback [ IP : 0014 ] # # #

A first chance exception of type ’ System.NullReferenceException’ occurred in Microsoft.SPOT.TinyCore.dll
An unhandled exception of type ’ System.NullReferenceException’ occurred in Microsoft.SPOT.TinyCore.dll

This is the beginning of the debug output :

[em]Found debugger !

Create TS .

A0e00000 loading at start , end a0e1383c

Assembly: mscorlib ( 4.2.0.0 ) Assembly: Microsoft.SPOT.Native ( 4.2.0.0 ) Assembly: Microsoft.SPOT.Security.PKCS11 ( 4.2
.0.0 ) Assembly: System.Security ( 4.2.0.0 ) Loading Deployment Assemblies .

Attaching file deployed .
Assembly: Microsoft.SPOT.IO ( 4.2.0.0 ) Attaching deployed file .
Assembly: GHI.Premium.IO ( 4.2.11.1 ) Attaching deployed file .
Assembly: Microsoft.SPOT.Graphics ( 4.2.0.0 ) Attaching deployed file .
Assembly: GHI.Premium.SQLite ( 4.2.11.1 ) Attaching deployed file .
Assembly: GTM.GHIElectronics.Camera ( 4.2.101.0 ) Attaching deployed file .
Assembly: GHI.Premium.USBHost ( 4.2.11.1 ) Attaching deployed file .
Assembly: GTM.GHIElectronics.SDCard ( 4.2.101.0 ) Attaching deployed file .
Assembly: Microsoft.SPOT.Hardware ( 4.2.0.0 ) Attaching deployed file .
Assembly: GHI.Premium.System ( 4.2.11.1 ) Attaching deployed file .
Assembly: GTM.GHIElectronics.Display_T35 ( 4.2.101.0 ) Attaching deployed file .
Assembly: Microsoft.SPOT.Touch ( 4.2.0.0 ) Attaching deployed file .
Assembly: GTM.GHIElectronics.UsbClientDP ( 4.2.101.0 ) Attaching deployed file .
Assembly: Gadgeteer ( 2.42.0.0 ) Attaching deployed file .
Assembly: GTM.GHIElectronics.Button ( 4.2.101.0 ) Attaching deployed file .
Assembly: GadgeteerApp2 ( 1.0.0.0 ) Attaching deployed file .
Assembly: System.IO ( 4.2.0.0 ) Attaching deployed file .
Assembly: Microsoft.SPOT.TinyCore ( 4.2.0.0 ) Attaching deployed file .
Assembly: Microsoft.SPOT.Net ( 4.2.0.0 ) Attaching deployed file .
Assembly: GHI.Premium.Hardware ( 4.2.11.1 ) Attaching deployed file .
Assembly: Microsoft.SPOT.Hardware.PWM ( 4.2.0.1 ) Attaching deployed file .
Assembly: GHIElectronics.Gadgeteer.FEZSpider ( 4.2.101.0 ) Resolving .

GC : 1msec 33684 bytes used , 7305984 bytes available[/em]

Attached is a picture of my setup.

Thank you,
Andrew Paes