Main Site Documentation

Debugging STILL pauses and is a pain in the rear


#1

This has never been fixed and it is fast becoming a pain in the rear to do unattended testing.

After debugging starts, I see the real time clock on the LCD stop updating. If I hit PAUSE then the code stops at one of the Thread.Sleep() lines, usually in the first task/thread that was created. Click continue and off it goes for a little while and then stops again. Repeat the PAUSE and CONTINUE and off it goes until the next pause. Time wise this is completely random.

Pretty damned annoying whatever it is and we really need a fix for this.

If I reset the device and don’t connect it to the debugger but it is running the debug code and not release code, it keeps working.

This appears to be something to do with the debug connection.


#2

That is soo true. :frowning:
Can you provide any “simple” program that uses only “standard” hardware, so GHI can reproduce this?

It might even be a builtin NETMF problem.
If I remember right, the problems started with support for VS2012.


#3

I’ll see what I can do to make a simple app and see if it fails using that. I suspect it will.

It happens when I use any platform and I am using VS2012.


#4

This is why I only use USB2.0 ports. I have those problems only with USB3 ones.


#5

Hi Simon,

I am using a USB 2.0 port. The USB 3.0 ports are not used by anything other than my tablet or phone which are the only USB3 devices I own.

I am even using them direct and not via any HUB.


#6

As I sit here with the unit now, it has frozen over 5 times so far.

This makes debugging and testing a real pain in the a****… :frowning:


#7

I really do not see how this is a USB 2 vs USB 3 problem!

Maybe VS2013 will take care of this mysterious issue? :wink: (in near future)


#8

Could you post a description of this problem as a Codeplex issue? The new team at Microsoft has started to look at these issues, so it is not a waste of time anymore.

Thanks to input from the community we have posted this related issue some time ago:


#9

It’s not USB 2.0/3.0 related.
I use USB 2.0 when ever possible, and get the problem with ever app when adding more functionality (threads, networking, …)
Never could nail it to any specific feature I use.
I guess the scheduler stumbles when having multiple waiting threads and is in debugger mode.
This might be why hitting pause always stops on a Wait / Sleep / Join.


#10

I’ll see if I can create a basic app that has the issue first and then I will post on Codeplex.

I have 3 threads in this design. It never happened with the same application using VS2010 and only seems to be related to using VS2012.


#11

Countrary to what is said here, I have an app that uses a gazilion of threads, and it only freezes if I use USB3, and both VS2010 and VS2012 behave exactly the same way. On three computers.


#12

I have created an codeplex issue


#13

OK, Cool. I’ve managed to create a very basic programme that hangs and found what seems to be causing the issue. The first version without the exception ran and never halted.

When I added the exception (divide by zero) it now hangs. Press pause and hit continue and off it goes for a little while again.

In my main app I have some exception handling for the GSM modem which is off during startup and I try to send data to it.

I have noticed that in my app, if there is no exceptions in the debug window, the app never pauses. Only after I see them does it start acting this way. :frowning:

You can download the very simple app and try it out from here. If someone has a dev board with buttons (I was using my touch based system) then they could use this to start the exception and confirm that this is indeed the reason for the failure.

http://www.axoninstruments.biz/download/MFDebugHangTest.zip

Happy bug hunting !! I really need a solution as I am pulling what little of my hair is left out all day today trying to debug this design. :frowning:


#14

@ Dave McLaughlin - I would also post on codeplex


#15

Thanks Gus, I did :slight_smile:


#16

@ Dave McLaughlin - thank you very much.


#17

As a quick follow up to this, I re-wrote the GSM driver to do away with the throwing of exceptions and so far today the debugging has not paused once so I think that the exceptions are the issue that is causing the pausing.

Today has been a calm day with no swearing or stress and lots of coding taking place. :slight_smile:


#18

Ahh, the smell of GSM-drivers in the morning. Love it! Progress?


#19

I am not going to release anything yet until the PPP is working. :slight_smile:

For now I can only do SMS and network monitoring etc.


#20

@ GHI - there was a comment on my CodePlex issue on this topic:
http://netmf.codeplex.com/workitem/2297

[quote]I think that there are many causes.
I’m not user of the GHI product but I have seen similar symptoms.
In my case, solved the problem by increasing the buffer size of debug port(USB or serial) in the porting kit.[/quote]

Is this something you could try using the sample Dave McLaughlin provided?