Deploying to G400-D just started hanging

I have been developing all week on a project with a custom board and a G400-D and now I cannot deploy and it just hangs and the attached window appears.

The following appears in the Output window during the partial starting.

DEPLOYMENT seems ok


Looking for a device on transport 'USB'
Starting device deployment...
Iteration 0
Opening port \\?\usb#vid_1b9f&pid_0102#0000000001#{a5dcbf10-6530-11d2-901f-00c04fb951ed}
Attaching debugger engine...
... debugger engine attached!
Querying device assemblies...
Found Assembly mscorlib 4.3.1.0
Found Assembly Microsoft.SPOT.Native 4.3.1.0
Found Assembly Microsoft.SPOT.Security.PKCS11 4.3.1.0
Found Assembly System.Security 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware 4.3.1.0
Found Assembly Microsoft.SPOT.Graphics 4.3.1.0
Found Assembly Microsoft.SPOT.TinyCore 4.3.1.0
Found Assembly Microsoft.SPOT.IO 4.3.1.0
Found Assembly System.IO 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.Usb 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.SerialPort 4.3.1.0
Found Assembly Microsoft.SPOT.Touch 4.3.1.0
Found Assembly Microsoft.SPOT.Ink 4.3.1.0
Found Assembly Microsoft.SPOT.Hardware.PWM 4.3.1.0
Found Assembly Gadgeteer 2.43.1.0
Found Assembly GHI.Hardware 4.3.7.10
Found Assembly Microsoft.SPOT.Net.Security 4.3.1.0
Found Assembly GHI.Glide 4.3.0.2
Found Assembly System 4.3.1.0
Found Assembly System.Http 4.3.1.0
Found Assembly System.Xml 4.3.1.0
Found Assembly System.Net.Security 4.3.1.0
Found Assembly GHI.Usb 4.3.7.10
Found Assembly GHI.Pins 4.3.7.10
Found Assembly Microsoft.SPOT.Net 4.3.1.0
Found Assembly WeatherSMS 1.0.0.0
Found Assembly GHI.Networking 4.3.7.10
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Net.pe to deployment bundle
Adding pe file C:\Program Files (x86)\GHI Electronics\NETMF v4.3 SDK\Libraries\le\ghi.hardware.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Net.Security.pe to deployment bundle
Adding pe file C:\Users\Dave McLaughlin\documents\visual studio 2013\Projects\Glide4.3\Glide\bin\Release\le\ghi.glide.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.Http.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.Xml.pe to deployment bundle
Adding pe file C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.Net.Security.pe to deployment bundle
Adding pe file C:\Program Files (x86)\GHI Electronics\NETMF v4.3 SDK\Libraries\le\ghi.usb.pe to deployment bundle
Adding pe file C:\Program Files (x86)\GHI Electronics\NETMF v4.3 SDK\Libraries\le\ghi.pins.pe to deployment bundle
Adding pe file C:\Users\Dave McLaughlin\documents\visual studio 2013\Projects\WeatherSMS\WeatherSMS\bin\Debug\le\WeatherSMS.pe to deployment bundle
Adding pe file C:\Program Files (x86)\GHI Electronics\NETMF v4.3 SDK\Libraries\le\ghi.networking.pe to deployment bundle
Attempting deployment...
Incrementally deploying assemblies to device
Deploying assemblies for a total size of 1032204 bytes
Assemblies successfully deployed to device.

But running hangs and the attached shows up when I click on the output window.


Found debugger!

Create TS.

 Loading start at 202dd578, end 2030ca0c

   Assembly: mscorlib (4.3.1.0)     Assembly: Microsoft.SPOT.Native (4.3.1.0)     Assembly: Microsoft.SPOT.Security.PKCS11 (4.3
.1.0)     Assembly: System.Security (4.3.1.0)     Assembly: Microsoft.SPOT.Hardware (4.3.1.0)  
   Assembly: Microsoft.SPOT.Graphics (4.3.1.0)     Assembly: Microsoft.SPOT.TinyCore (4.3.1.0)  
   Assembly: Microsoft.SPOT.IO (4.3.1.0)     Assembly: System.IO (4.3.1.0)     Assembly: Microsoft.SPOT.Hardware.Usb (4.3.1.0) 
    Assembly: Microsoft.SPOT.Hardware.SerialPort (4.3.1.0)     Assembly: Microsoft.SPOT.Touch (4.3.1.0)  
   Assembly: Microsoft.SPOT.Ink (4.3.1.0)     Assembly: Microsoft.SPOT.Hardware.PWM (4.3.1.0)  
Loading Deployment Assemblies.

Attaching deployed file.

   Assembly: Microsoft.SPOT.Net (4.3.1.0)  Attaching deployed file.

   Assembly: GHI.Hardware (4.3.7.10)  Attaching deployed file.

   Assembly: Microsoft.SPOT.Net.Security (4.3.1.0)  Attaching deployed file.

   Assembly: GHI.Glide (4.3.0.2)  Attaching deployed file.

   Assembly: System (4.3.1.0)  Attaching deployed file.

   Assembly: System.Http (4.3.1.0)  Attaching deployed file.

   Assembly: System.Xml (4.3.1.0)  Attaching deployed file.

   Assembly: System.Net.Security (4.3.1.0)  Attaching deployed file.

   Assembly: GHI.Usb (4.3.7.10)  Attaching deployed file.

   Assembly: GHI.Pins (4.3.7.10)  Attaching deployed file.

   Assembly: WeatherSMS (1.0.0.0)  Attaching deployed file.

   Assembly: GHI.Networking (4.3.7.10)  Resolving.

GC: 1msec 1213728 bytes used, 65892036 bytes available

Type 0F (STRING              ):     24 bytes

Type 15 (FREEBLOCK           ): 65892036 bytes

Type 17 (ASSEMBLY            ):  44652 bytes

Type 1E (BINARY_BLOB_HEAD    ): 1168980 bytes

Type 34 (APPDOMAIN_HEAD      ):     72 bytes

GC: performing heap compaction...

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Native.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Security.PKCS11.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.Security.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Graphics.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.TinyCore.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.Usb.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Touch.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Ink.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.PWM.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.12.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Net.dll', Symbols loaded.


I’ve tried clean and it still won’t run. The only change last night to the code was to add 5 jpg files to the resources and to add code to display them.

Well, first thing that comes to mind is to back out that last change just to see if that’s the cause. Maybe you just nudged yourself over some size limit though on the G400’s 1.4m of flash, that seems unlikely. Nonetheless, it’s an obvious test to run.

So is stopping and re-starting VS. Also, switch to “Emulator” and back to “USB” in VS. I have seen failures to deploy or to launch debugging that are due to cached data in VS and that bad cached data is flushed when you change the deployment target type on the project properties page.

Edit: I see that your image is over 1M in size, so maybe you have broken over the available deployment space with those jpgs.

Thanks mcalsyn.

It’s not size related or changes related.

I loaded up a test from the other day which has had no changes and is considerably smaller and it hangs at the same point.

I’ve uninstalled the GHI SDK, rebooted the PC etc and still the damn thing hangs.

[EDITED AS I WAS USING THE WRONG SDK]

Just hooked up a Cobra 2 and it hangs at the same point. This is not good.

Time to try uninstall and reboot again :frowning:

Deploy a LED blinker app and see if that works as expected. Can’t get a more toasty test than that.

Hi Brett,

Good idea and I did that and it works.

It hangs when I try to deploy the GHI.Hardware.dll after I added this as a reference.

The window says it is trying to load this from d:\Rpos\NETMF\Libraries\GHI.Hardware\obj\release so not sure what that means to be exact.

[EDIT] I should add that after it fails to run, if I hit reset the programme runs fine on the device.

1 Like

I’ve just tried GHI.Glide instead by adding as a reference and it hangs on that too.

Same with GHI.Pins

Mmm.

Very weird - that is almost exactly the G400D symptom I am seeing here : https://www.ghielectronics.com/community/forum/topic?id=21810&page=7#msg205016 (although I get a message about the debugger session failing)

That is, program cannot be debugged, but does free-run correctly.

1 Like

I ran up the laptop and it deploys and debugs the code so this must be something in the main PC that is causing.

Not great as I have a deadline for a demo on Wed this week. Guess I am working on the laptop today.

After 4 wasted hours of uninstalling the SDK and VS2013 and then reloading them it is back working again. Hope this don’t happen too often.