Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

VS2010 Crash on debug


  • Please log in to reply
17 replies to this topic

#1 Basiclife

Basiclife

    Member

  • Members
  • PipPip
  • 27 posts

Posted 07 January 2012 - 05:01 PM

I've recently rebuilt my system and dusted off my netduino to have another go. (Standard netduino, not plus, mini, etc.)

As I prefer VB, I've installed:

Microsoft .Net Micro Framework SDK 4.2 (RTM)
Netduino SDK v4.2.0 (June 2011 Beta)

The OS is Windows 7 x64, Dev Env: Visual Studio 2010 Ultimate

I've created a new Micro Framework netduino application which contains the following 2 files:

Main.vb
Imports Microsoft.SPOT
Imports Microsoft.SPOT.Hardware
Imports SecretLabs.NETMF.Hardware
Imports SecretLabs.NETMF.Hardware.Netduino

Module Main
    Sub Main()
        Thread.Sleep(1000)
        Led0.Write(True) ''<<< Breakpoint Here
        Dim Value = 0.0
    End Sub
End Module

HardwareMappings.vb
Imports Microsoft.SPOT
Imports Microsoft.SPOT.Hardware
Imports SecretLabs.NETMF.Hardware
Imports SecretLabs.NETMF.Hardware.Netduino

Module HardwareMapping

    Public Led0 As OutputPort = New OutputPort(Pins.GPIO_PIN_D11, False)
    Public Led1 As OutputPort = New OutputPort(Pins.GPIO_PIN_D4, False)
    Public Led2 As OutputPort = New OutputPort(Pins.GPIO_PIN_D13, False)
    Public Led3 As OutputPort = New OutputPort(Pins.GPIO_PIN_D3, False)

    Public LedR As OutputPort = New OutputPort(Pins.GPIO_PIN_D5, False)
    Public LedG As OutputPort = New OutputPort(Pins.GPIO_PIN_D6, False)
    Public LedB As OutputPort = New OutputPort(Pins.GPIO_PIN_D10, False)

End Module

I can run the app and it will turn on/off the LEDs as desired (I'm using this shield: http://ruggedcircuit...AS010/as010.pdf which provides a number of LEDs and Pots as well as some other things to test).

If I add a breakpoint or pause execution at any point, Visual Studio throws a fatal exception:

The problem signature in the "VS has crashed" Dialog is as follows:
Problem signature:
  Problem Event Name:	APPCRASH
  Application Name:	devenv.exe
  Application Version:	10.0.40219.1
  Application Timestamp:	4d5f2a73
  Fault Module Name:	vbdebug.dll
  Fault Module Version:	10.0.40219.1
  Fault Module Timestamp:	4d5f2fc9
  Exception Code:	c0000005
  Exception Offset:	000a0ceb
  OS Version:	6.1.7601.2.1.0.256.1
  Locale ID:	2057

Additional information about the problem:
  LCID:	1033

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

If I debug VS itself, I get (in the "choose debugger dialog"):
An unhandled win32 exception occured in devenv.exe [121988].

After opening a new instance of VS as a debugger, I'm told:
Unhandled exception at 0x77d515ee in devenv.exe: 0xC0000005: Access violation reading location 0x00000000

Disassembly is as follows:
ntdll.dll!77d515ee()

77D515AD  mov         ecx,0Ah  
77D515B2  lea         edx,[esp+4]  
77D515B6  call        dword ptr fs:[0C0h]  
77D515BD  add         esp,4  
77D515C0  ret         0Ch  
77D515C3  nop  
77D515C4  mov         eax,12Eh  
77D515C9  xor         ecx,ecx  
77D515CB  lea         edx,[esp+4]  
77D515CF  call        dword ptr fs:[0C0h]  
77D515D6  add         esp,4  
77D515D9  ret         18h  
77D515DC  mov         eax,12Fh  
77D515E1  xor         ecx,ecx  
77D515E3  lea         edx,[esp+4]  
77D515E7  call        dword ptr fs:[0C0h]  
77D515EE  add         esp,4  <<<<<<<< EXCEPTION HERE <<<<<<<<
77D515F1  ret         0Ch  
77D515F4  mov         eax,130h  
77D515F9  xor         ecx,ecx  
77D515FB  lea         edx,[esp+4]  
77D515FF  call        dword ptr fs:[0C0h]  
77D51606  add         esp,4  
77D51609  ret         18h  
77D5160C  mov         eax,131h  
77D51611  xor         ecx,ecx  
77D51613  lea         edx,[esp+4]  
77D51617  call        dword ptr fs:[0C0h]  
77D5161E  add         esp,4  
77D51621  ret         8  
77D51624  mov         eax,132h  
77D51629  xor         ecx,ecx  
77D5162B  lea         edx,[esp+4]  
77D5162F  call        dword ptr fs:[0C0h]  


As it's been a while since I used the netduino and haven't ever used it on this PC, I'm not sure how to go about tracking down the problem especially using Beta drivers. Can someone please suggest a workaround / further places for investigation?

Many thanks

Edit: I've attached the project in question. I've also tried running the simple "Blinky" example which DOES allow debugging so it must be an issue with my very short code

Another Edit: It seems that the problem is caused if the variable for the LED is defined in a different file. To test, take the Blinky example, move the led definition to a different module with a Public scope and run it again. The app will still run but debugging fails.

Attached Files



#2 James Abbott

James Abbott

    Member

  • Members
  • PipPip
  • 19 posts
  • LocationYorkshire, UK

Posted 17 April 2012 - 10:53 PM

Out of curiosity, instead of creating the module variables as new instances, if you instantiate them before your main sub runs does the issue still occur?

#3 Basiclife

Basiclife

    Member

  • Members
  • PipPip
  • 27 posts

Posted 19 April 2012 - 02:31 PM

Out of curiosity, instead of creating the module variables as new instances, if you instantiate them before your main sub runs does the issue still occur?

Hi James,

Most likely this was an issue with the Beta VB.Net support. As such, I've re-flashed it with non-Beta drivers and switched back to C# (VB.Net without OO support is a waste of everyone's time)

I'm curious what you mean by instantiating the module before Sub Main() - I don't have control before Main() executes and by that point the module has been loaded (and presumably the ports instantiated).

If you can provide a code example/explanation, I'll reflash and give it a go.

Thanks

#4 rhamer

rhamer

    Member

  • Members
  • PipPip
  • 29 posts
  • LocationMelbourne Australia

Posted 14 May 2012 - 05:11 AM

I have had this problem for some time now. The problem occurs with 4.2 RC 3,4 & 5 and is making development unworkable. Is there any known solution for this? I was hoping RC5 would fix it, but to no avail. My system is W7 x64, VS2010 and I'm using VB Any help would be greatly appreciated. Regards Rohan

#5 rhamer

rhamer

    Member

  • Members
  • PipPip
  • 29 posts
  • LocationMelbourne Australia

Posted 14 May 2012 - 05:30 AM

I was hoping I had a solution when I saw the new signed drivers. However after installing them, it makes no difference. If I set a breakpoint, then hover over a variable to read its value, instant crash, every time. This is unuseable. Regards Rohan

#6 rhamer

rhamer

    Member

  • Members
  • PipPip
  • 29 posts
  • LocationMelbourne Australia

Posted 20 May 2012 - 04:32 AM

Does anybody official have anything to say about this problem? Has it been recognised and is a fix being worked on? It seem like everytime I post here about a problem, it falls on deaf ears. Once again I would have thought a bug this big would have generated some sort of response..... I really want to be a Netduino evangalist, but stuff like this just makes it hard to keep the faith. Regards Rohan

#7 Basiclife

Basiclife

    Member

  • Members
  • PipPip
  • 27 posts

Posted 22 May 2012 - 07:28 PM

Does anybody official have anything to say about this problem?

Has it been recognised and is a fix being worked on?

It seem like everytime I post here about a problem, it falls on deaf ears.

Once again I would have thought a bug this big would have generated some sort of response.....

I really want to be a Netduino evangalist, but stuff like this just makes it hard to keep the faith.

Regards

Rohan


Hi Rohan,

Sorry for a slow response, I've been moving house and internet takes sooo long to get installed...

I haven't heard anything official about a resolution for this - As you can see, I assumed it was a Beta issue but haven't chased further.

Like you, I want to like the netduino - but it seems to come out of the cupboard for a month until it annoys me and gets shelved again.

That said, I've had good responses from the devs on here before - perhaps you should have a go in the chat room and see if you can get a response.

I'm going to have another go with the netduino in a couple of weeks - if you haven't had any luck by then, I'll try and chase it up.

Good luck and please let me know if you find a solution/workaround

#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 May 2012 - 07:37 PM

Several bugs were fixed in .NET MF 4.2 QFE1 (which is used with the new 4.2 RC5 firmware). Before running too far, I'd recommend updating your desktop SDKs (NETMF and Netduino) and board. Chris

#9 rhamer

rhamer

    Member

  • Members
  • PipPip
  • 29 posts
  • LocationMelbourne Australia

Posted 22 May 2012 - 09:50 PM

That was the first thing I did. I am running all the latest versions of everything. BTW the reason I'm so concerned about this, is I am trying to produce a commercial product with the Netduino as the controller, and time is tight. I don't have the luxury of being able to forget about it for a year and come back when it all has been fixed. Regards Rohan

#10 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 May 2012 - 10:19 PM

Hi Rohan, Does this same crash happen when you debug a simple "blinky" type of application in VB? Does it happen if you try to debug a C# app? If we can narrow down the combination of factors which causes the issue, we can forward the issue to the right team to help debug... Chris

#11 Basiclife

Basiclife

    Member

  • Members
  • PipPip
  • 27 posts

Posted 22 May 2012 - 10:52 PM

Hi Rohan,

Does this same crash happen when you debug a simple "blinky" type of application in VB?

Does it happen if you try to debug a C# app?

If we can narrow down the combination of factors which causes the issue, we can forward the issue to the right team to help debug...

Chris


Have you downloaded my sample project attached to my first post?

I've demonstrated that the blinky app is fine but that if you move the declaration of the ports into another file/object, pausing execution crashes VS. Can you confirm if the same is happening when you run the project?

#12 rhamer

rhamer

    Member

  • Members
  • PipPip
  • 29 posts
  • LocationMelbourne Australia

Posted 23 May 2012 - 03:06 AM

Yep that's exactly what happens for me. If the declaration is in the same file it is fine, but if it is in another file, then crash every time. I don't know about c# as I don't use it. Regards Rohan

#13 Basiclife

Basiclife

    Member

  • Members
  • PipPip
  • 27 posts

Posted 23 May 2012 - 06:46 PM

I don't know about c# as I don't use it.


FWIW I seem to recall trying it in C# and it working but it was a while back and I don't have mine to hand to test.

#14 tknman0700

tknman0700

    Member

  • Members
  • PipPip
  • 26 posts

Posted 31 May 2012 - 03:37 AM

Same problem here.. vb development crashing visual studio left and right anytime I try to set a break point and investigate variable.

#15 rhamer

rhamer

    Member

  • Members
  • PipPip
  • 29 posts
  • LocationMelbourne Australia

Posted 08 June 2012 - 06:40 AM

Still nothing? No comment, no timeframe?

#16 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 June 2012 - 07:29 AM

Still nothing?

No comment, no timeframe?

Unfortunately crashes in VB are on the Visual Studio/.NET MF SDK side. There's a NETMF 4.2 QFE2 in the works that's gearing up for release...so let's try to see if we can get this bug reported to the right place and see if we can get a fix in the upcoming SDK release.

Can you please post a bug report at the following link?
http://netmf.codeple...item/list/basic

Then please provide us a link, and we can vote for the issue.

Chris

#17 Basiclife

Basiclife

    Member

  • Members
  • PipPip
  • 27 posts

Posted 08 June 2012 - 08:47 AM

Unfortunately crashes in VB are on the Visual Studio/.NET MF SDK side. There's a NETMF 4.2 QFE2 in the works that's gearing up for release...so let's try to see if we can get this bug reported to the right place and see if we can get a fix in the upcoming SDK release.

Can you please post a bug report at the following link?
http://netmf.codeple...item/list/basic

Then please provide us a link, and we can vote for the issue.

Chris


Whilst I don't expect you to be able to fix it instantly (or at all if it's an MS-side issue), it would be nice for you to confirm if you can even reproduce the issue.

As things stand, you've said try the new firmware (after rhamer had said he'd already tried it) and asked if it happened in Blinky (when the first post in this thread says it does not). Frankly, it feels like you're being very dismissive and haven't bothered to read the thread properly.

I didn't mind so much when I was the only one experiencing the issue as I assumed it was a config issue / somethign specific to my machine. Now that other users have confirmed (and considering how few VB developers you seem to have) there's a good chance it would happen to most if not all of them if they chose to code in this style.

If rhamer hasn't posted a bug report by this evening, I'll raise one and add a link.

#18 bglazierjr

bglazierjr

    New Member

  • Members
  • Pip
  • 1 posts

Posted 16 April 2014 - 04:33 PM

Wow, Posted 08 June 2012 - 09:47 AM....its 04/16/2014 I am running into the exact same issue. I am running the lastest framework and SDK and Firmware. Any update on this?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.