Pages: [1]   Go Down
Author Topic: Serial.print("!!!"); hangs the uploader?  (Read 1212 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Got this rather bizarre error today- I was trying to make an error message stand out by adding "!!!" to the end of it, and when I uploaded it to the board the statusbar got to about 90% and never finished. I tracked down the problem to the "!!!" and was able to replicate it with this small program, which also refuses to load:

Code:
void setup ()
{
 Serial.begin (9600);
}

void loop ()
{
  Serial.print("!!!");
  delay(1000);
}

Outputs:
Uploading...
Binary sketch size: 3622 bytes (of a 258048 byte maximum)


This isn't so much a problem for me as it is a curiosity issue- anyone know why this is happening?
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 299
Posts: 26195
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well documented - search the forum
Why would you ever need more than one exclamation mark?
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9541
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well documented - search the forum
Why would you ever need more than one exclamation mark?

I'd call it a bug.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 299
Posts: 26195
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It is a bug, and a well documented one.
But, apart from ellipsis, I can't think of a good reason for three consecutive punctuation marks.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12631
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It is a bug, and a well documented one.

I guess that depends what you mean by 'well documented'. I've never heard of it 'til now.

But, apart from ellipsis, I can't think of a good reason for three consecutive punctuation marks.

No reason NOT to, though, unless you were already aware of the bug.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2883
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No a well documented Bug is called a Feature, That particular Feature prevents you from making a minor grammatical error and thus impressing your best mates with your clear lack of erudition.

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6146
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's very well documented in the sense that it comes up in the forum from time to time.  The problem is that search engines like Google ignore punctuation marks.  So how does one search for and find reference to this issue?
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

But, apart from ellipsis, I can't think of a good reason for three consecutive punctuation marks.
People use it for extra expression (e.g. FIRE!!!).
This bug only occurs on the Arduino Mega.
Does anyone know exactly what causes the error? Everyone just says it is a well documented bug.
Logged


Austin, TX
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6146
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone know exactly what causes the error? Everyone just says it is a well documented bug.
Well, let me go to the forum search and search for "!!!" to find this well documented bug.



Okay, let's try the phrase "arduino mega !!!" in Google.  That'll work!
Huh.  No wonder people keep posting about this "well documented" feature.

As I recall, it was actually a feature of the early bootloader.  It looked for the string "!!!" for reason.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9541
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But, apart from ellipsis, I can't think of a good reason for three consecutive punctuation marks.

What's that got to do with the bug? I can't think of a good reason why men wear ties.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 246
Code Monkey
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why would you ever need more than one exclamation mark?

Well, the OP says:

Quote from: dlworrell
I was trying to make an error message stand out by adding "!!!" to the end of it...

I do this sort of thing all the time (though I add annotations to the beginning of log lines, not the end.) I use ! usually because I might be searching logs with a text editor that treats things like * special, and I want something quick and dirty that stands out.

This bug violates the principle of least surprise, which is why we are all having this conversation -- someone got surprised again, and then further surprised that others were surprised that he or she didn't know about the surprise.
Logged

I yield() for co-routines.

Offline Offline
Edison Member
*
Karma: 19
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've heard !!! starts the usb to serial chip's debugger.

This could go in the post at the top of the forum. Or maybe have a separate one for "Known bugs." Or have it point to the list of known bugs on the google code page.
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 462
I am a amateur.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've heard !!! starts the usb to serial chip's debugger.
Okay; so "!!!" it starts the debugger on some Megas. Anyone know the serial chip debugger initializer for Arduino UNO?

P.S. Sent from netbook in a hotel in Grove City, PA. Happy 145th birthday, Canada! Too bad I can't be in Canada to celebrate it!
« Last Edit: July 01, 2012, 09:31:07 pm by dkl65 » Logged


SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 132
Posts: 6739
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://code.google.com/p/arduino/issues/detail?id=392
The bug database can be interesting reading!

It's the 2560 bootloader, which has a "monitor mode" entered with the !!! Sequence.
Not the serial chip code.  UNO doesn't have such a monitor and does not have a version of this bug.
Logged

Pages: [1]   Go Up
Jump to: