View unanswered posts | View active topics It is currently Tue Oct 21, 2014 3:57 pm






Reply to topic  [ 7 posts ] 
debugPrint 
Author Message
Rookie

Joined: Sat Dec 22, 2007 7:02 pm
Posts: 7
Post debugPrint
Hello,

I just tried to use debugPrint functions, but got no message in the "Debug Stream" window, apart the ones generated by the system itself (Start, Stop,...). I've checked that the program has been compiled in Debug mode, and even tried to switch configurations, but without any success.

I'm running RobotC 1.10 with latest NXT firmware (7.23) on Windows XP Pro SP2.

TIA for any suggestion.

Best regards

Eric


Fri Dec 28, 2007 2:54 pm
Profile
Expert
User avatar

Joined: Fri Nov 09, 2007 4:51 am
Posts: 121
Location: Hungary, Europe
Post compiler bug
This is a compiler bug, registered at the robotc bug tracker (case #00170).

Workaround: use writeDebugStream() instead of debugPrintLine() and manually add the CR/LF at the end of the line.


Fri Dec 28, 2007 8:31 pm
Profile
Rookie

Joined: Sat Dec 22, 2007 7:02 pm
Posts: 7
Post 
Thanks Elemes,

Doing some more tests and looking at the produced assembly code, I could see that the compiler generates nothing for these statements.

Best regards

Eric


Fri Dec 28, 2007 9:14 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Jan 31, 2007 3:39 am
Posts: 299
Location: San Diego, California. USA
Post 
If you find any bugs, please post them in the bug tracker, that way they can be fixed for future releases B-)

Mantis Bug Tracker:
http://www-education.rec.ri.cmu.edu/man ... n_page.php
You will have to make a mantis account to post bugs

Thanks!
Scott

_________________
Mmmm Legos B-)

My Robot Projects:
http://www.freewebs.com/robotprojects/


Sat Dec 29, 2007 4:39 pm
Profile WWW
Rookie

Joined: Sat Dec 22, 2007 7:02 pm
Posts: 7
Post 
Hi Scott,

I found the existence of Mantis after having posted the first message.

Since then I've logged another strange thing (bug ?) BTW.

Best regards
Eric


Sat Dec 29, 2007 8:11 pm
Profile
Creator
Creator

Joined: Fri Feb 09, 2007 9:21 am
Posts: 615
Post 
Fixed in version 1.13 which should be posted this week.

The problem was duplicate name "sString" for local variable and for macro parameter when macro parmameter had value 'sString". Changed code to:

#define debugPrintLine(format, parm1, parm2)\
{\
string sString_001;\
StringFormat(sString_001, format, parm1, parm2);\
writeDebugStream(sString_001);\
writeDebugStream("\n\r");\
}


Mon Dec 31, 2007 5:13 am
Profile
Expert
User avatar

Joined: Fri Nov 09, 2007 4:51 am
Posts: 121
Location: Hungary, Europe
Post Mantis
Wow, are RobotC developers also aware of Mantis...? I believed it is just for helping users by inform each other about known bux :-)


Mon Dec 31, 2007 6:26 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.