Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Locked Topic Hang when trying to connect to debugger (Read 19741 times)
Miszka
Newbies
*
Offline


Posts: 5
Location: Poland
Joined: Oct 25th, 2012
Hang when trying to connect to debugger
Oct 25th, 2012 at 12:56am
 
Heyah guys!
This addon is amazing - I bought arduino just because it is supported by visual studio... and I LOVE visual studio as much as Your great visual micro! I'm a student of informatics and I'm attepting to swap some analog controlers from my RC car and make the controler from arduino.

I just installed the software (beta - the big download button) on Windows 8 with Visual Studio 2012, installed the drivers (without driver signing), I ran the arduino software once and it worked (uploaded the program) and...
tried to use Your solution... unfortunately it freezes (whole VS2012) while uploading the compiled program- http://sdrv.ms/P3AlTF

I did few restarts and still get the problem. I've never mannaged to upload it trough visual studio

What to do?

Cheers,
Michael

PS. Visual Studio is using a Polish Language pack but it should not interfere
« Last Edit: Nov 6th, 2012 at 1:26am by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hang when trying to upload
Reply #1 - Oct 25th, 2012 at 1:07am
 
Hello Miszka,

Thanks, glad you like it.

I hope you don't mind I have split this into a new thread so that it doesn't confuse things.

Please answer these questions:-

1) How many serial devices do you have connected to your win8 machine?
2) Which arduino board are you using?
3) What happens if you try to upload using the arduino ide?
4) What happens if you pull the usb cable out of the computer when the hang happens
5) Please confirm which visual micro version using Tools>Options>Visual Micro>Version

Thanks

EDIT: In the background, Visual Micro uses the avr uploader of the Arduino IDE to upload.

The avr uploader has a long timeout which is hit sometimes depending on incorrect port selection and/or incorrect board selection. From memory the timeout can be 90 seconds and might appear as a hang. 

If this is the problem then pulling the usb cable out of the pc (the right usb cable for the selected upload port) usually forces the avr uploader to return with an error message which allows the ide to work again.

I hope for better detection and handling of this situation in a future version of vm. It's been on my list for a while and is getting closer to the top!
« Last Edit: Oct 25th, 2012 at 1:39am by Tim@Visual Micro »  
Back to top
IP Logged
 
Miszka
Newbies
*
Offline


Posts: 5
Location: Poland
Joined: Oct 25th, 2012
Re: Hang when trying to upload
Reply #2 - Oct 25th, 2012 at 1:59am
 
HI, thx for a very quick replay!

1. There are 3 devices, keyboard, mouse, and arduino (COM3)
2. I am using arduino Uno Rev3
3. Arduino IDE uploads just fine
4. Nothing still hangs
5. Version: 1.1210.24.1


SCENARIO ONE : FIRST ATTEMPT AFTER REBOOT
Compiling 'LedTest1' for 'Arduino Uno'
Couldn't determine program size:    text         data          bss          dec          hex      filename

AFTER AGAIN PRESSING F5:
The program successfully uploads, but visual studio doesn't stop the transmition. It looks as if the stream hasn't been closed so Visual Studio freezes - unpluging the cable doesn't change anything

SCENARIO TWO : FIRST ATTEMPT AFTER A CRASH WITHOUT SYSTEM REBOOT
Compiling 'LedTest1' for 'Arduino Uno'
Couldn't determine program size:    text         data          bss          dec          hex      filename

Another F5:

Compiling 'LedTest1' for 'Arduino Uno'
Binary sketch size: 1082 bytes (of a 32256 byte maximum) (0,1091809 secs)
Uploading to I/O board using 'COM3'
The port 'COM3' does not exist.
However arduino IDE says that COM3 is being used


So the real problem: VS2012 Hangs and after successful program upload - it freezes more than 5 minutes
« Last Edit: Oct 25th, 2012 at 2:13am by Miszka »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hang when trying to upload
Reply #3 - Oct 25th, 2012 at 2:12am
 
Hi, okay thanks for the answers.

1)
First thing is to switch off the debug stuff (Micro Debug=False) so that we don't get the additional confusion of the debugger. Recompile and upload in non-debug mode. Does that work?

2)
Can you then try to open the Serial Monitor on COM3 to see if you get "Port Open"? Okay?

Thanks, I won't be able to answer until tomorrow now
« Last Edit: Oct 25th, 2012 at 2:21am by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hang when trying to upload
Reply #4 - Oct 25th, 2012 at 2:15am
 
Sounds more like the debug is hanging. What was the version of the debug upgrade msi that you installed? 3.1 or 3.2?
« Last Edit: Oct 25th, 2012 at 2:22am by Tim@Visual Micro »  
Back to top
IP Logged
 
Miszka
Newbies
*
Offline


Posts: 5
Location: Poland
Joined: Oct 25th, 2012
Re: Hang when trying to upload
Reply #5 - Oct 25th, 2012 at 2:21am
 
1. After turning off the debug - there is no freeze.
2. On serial Monitor:
Port open (I click F5 then:)
Port closed
Uploading to I/O board

3. Yes I can upload with and without debug, but debug freezes VS2012 after the successful upload

After the first upload I am unable to reupload again...
Compiling 'LedTest1' for 'Arduino Uno'
Binary sketch size: 1082 bytes (of a 32256 byte maximum) (0,1092012 secs)
Uploading to I/O board using 'COM3'
Access to the port 'COM3' is denied.

I think that in some point the stream is not being released - creating a situation that the debugger cannot disconnect and the port is being locked (cannot be unlocked - only by restart)

I did not install any "debug upgrade msi"
« Last Edit: Oct 25th, 2012 at 2:22am by Miszka »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hang when trying to upload
Reply #6 - Oct 25th, 2012 at 2:27am
 
The debug facility is in beta and only available to people who have applied to beta test. You are welcome to apply.

Without the beta pack there is no code to run so things will not work very well. On your other non-win 8 machines you have not been using the debug system so the situation is different than we thought.

Please tell me what you are doing to switch on debug? How are you starting the debug? Clicking a menu??? Setting any properties? Attaching to anything?


Thanks very much
« Last Edit: Oct 25th, 2012 at 2:35am by Tim@Visual Micro »  
Back to top
IP Logged
 
Miszka
Newbies
*
Offline


Posts: 5
Location: Poland
Joined: Oct 25th, 2012
Re: Hang when trying to upload
Reply #7 - Oct 25th, 2012 at 2:39am
 
Just near the "Green arrow" I've got a dropbox with - Release and Debug - here is a link to a screenshot...
Sorry, I've got a Polish Language pack so things are a bit messy Cheesy
http://sdrv.ms/UENi8W

The other problem... I can't upload a compiled program the second time after a successful upload (I have to restart whole computer, COM3 is blocked)
« Last Edit: Oct 25th, 2012 at 2:40am by Miszka »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hang when trying to upload
Reply #8 - Oct 25th, 2012 at 2:46am
 
No problem your English is better than many English peoples English  Smiley

Okay 

1) Arduino does not have debug facility so switching to debug setting must be causing some confusion in vs 2012. Leave it on Release until you have a solid system then we can talk about the Visual Micro debug tool. It's something different to normal vs debug but works in vs.

2) After you get the error port not found are then able to upload the next time?

3) After you get the port not found error are you able to open the "Serial Monitor" and do you see "Port Open"?

4) After you get the port not found error, if you drop down the list of ports on the tool bar do you see COM3 in the list?
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hang when trying to upload
Reply #9 - Oct 26th, 2012 at 1:16am
 
How are you doing with this?
  
Back to top
IP Logged
 
Miszka
Newbies
*
Offline


Posts: 5
Location: Poland
Joined: Oct 25th, 2012
Re: Hang when trying to upload
Reply #10 - Oct 29th, 2012 at 1:09am
 


1) OK, I leave it on release

2) I am able only to upload again after computer restart "Access to the port 'COM3' is denied."

3) I open the serial and: "Port failed to open"

4) Yes I can see COM3
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hang when trying to upload
Reply #11 - Oct 29th, 2012 at 1:48am
 
This is a really strange problem! Thanks for the great information.

I can add some trace messages to show the problem but it will help to know approximately were to add them...

1)
If you re-start your computer and open the project but do NOT upload. Can you repeatedly open and close the Serial Monitor on COM3. Can you switch on the Dtr checkbox on the Serial Monitor and open and close and re-open without problem?

2)
If you encounter the "COM3 not found error" can you dropdown the list of ports on the tool bar and see if COM3 is in the list?

3)
Are you running the latest windows updates? .net3.5 enabled?

4) 
Please close vs and run the install from codeplex again.

5)
Do you have any other Visual Studio extensions or plugins installed?

Thanks
« Last Edit: Oct 29th, 2012 at 2:11am by Tim@Visual Micro »  
Back to top
IP Logged
 
Clayton
Junior Member
**
Offline


Posts: 19
Joined: Oct 29th, 2012
Re: Hang when trying to upload
Reply #12 - Nov 3rd, 2012 at 6:33am
 
This could be completely unrelated, but I had problems with it freezing, but they went away after I switched from my computer monitor USB port to a real one on the PC tower. 
« Last Edit: Oct 19th, 2014 at 11:21am by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hang when trying to upload
Reply #13 - Nov 3rd, 2012 at 12:37pm
 
That might be relevant thanks. 

This is certainly a windows issue because it works for everyone else. + The user has not responded to questions so I wouldn't worry about it
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hang when trying to upload
Reply #14 - Nov 6th, 2012 at 1:24am
 
Can anyone with a hang please report which boards and board versions you are using. (If you have already stated this then psl ignore this request)

I've tested with:

Mega 1280
Mega 2560 R3
APM2 2560 
LeoStick
Leonardo
Fio
328 Duemilanove

Please also state version and name of usb/serial port drivers from "Device Manager" and op system

I will test with Uno shortly.

Thanks
« Last Edit: Nov 6th, 2012 at 1:28am by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hang when trying to connect to debugger
Reply #15 - Nov 6th, 2012 at 7:59pm
 
I think I have found the hang and expect a fix over the next few days. 

It has nothing to do with board , usb drivers or serial ports. No need to report any additional information thanks.

I will post a note in this thread when the new version is available.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Hang when trying to connect to debugger
Reply #16 - Oct 19th, 2014 at 9:56am
 

Please try the latest releases of Visual Micro and create a new thread of the problem persists. Thank you.

Other non debug related posts moved here:-

http://www.visualmicro.com/forums/YaBB.pl?num=1413588917
« Last Edit: Oct 19th, 2014 at 11:22am by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint