Pages: [1]   Go Down
Author Topic: Compiler freezes with no erorrs, changes since last compile remove  (Read 489 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am having what appears to be a wierd error with the arduino compiler.

I have a substantial deumilenova program, just short of 1000 lines so i am hesitant to post it at this stage.
However everything was compiling and downloading correrctly until i made a small addition to the code, a very simle sub routine and a call in main.

Now, having removed this component whenever i try to compile my program the status bar gets to 25% and freezes and does not throw out an error in the compiler (just the usual red compiler log). This happens on both my desktop and laptop as well.

Can anyone suggest anything to try and rectify this problem, the thought of trawling 1000 lines for a possible error without debugging information is going to be time consuming in the least
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 65
Posts: 3638
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you successfully compile other programs?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you successfully compile other programs?

Yes, and it appears i can compile previous versions of this program as well.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

***SOLVED***

I have found the error in my code.
I had started to write a serial output line for troubleshoot but must have gotten distracted. Regardless the line
...
Serial.print("
...

Appears to cause the compiler to hang.
The quick way to find this was using a program called Beyond Compare which makes life easy when comparing two different versions of a program as it highlights any changed lines and text very clearly.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I do not know if this is a known bug however i recently had a problem with a piece of code causing the compiler to hault without returning an error message and debugging information and i thought i would share
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 65
Posts: 3638
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Amazingly, that was my next guess - you've managed to make a string so long it crashed the compiler, or so it appears.
Logged

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

Quote
and i thought i would share
Go ahead.
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.

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
void setup ()
  {
  Serial.print (" 
  }  // end of setup
 
void loop ()
  {
   
  }  // end of loop

That did not hang. I got:

Code:
sketch_dec07b:2: error: missing terminating " character
sketch_dec07b.cpp: In function 'void setup()':
sketch_dec07b:3: error: expected primary-expression before '}' token
sketch_dec07b:3: error: expected `;' before '}' token

It helps to post the problem code, you know. We can't guess what it is.
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Please do not cross-post. This wastes time and resources as people attempt to answer your question on multiple threads.

Threads merged.

- Moderator
Logged

Pages: [1]   Go Up
Jump to: