Go to Post In any case, I'd like to remind everyone to practice gracious nonexpansionalism while in your pit. - sanddrag [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 22-01-2011, 12:09
Ethan E Ethan E is offline
Registered User
FRC #1683
 
Join Date: Feb 2010
Location: Johns Creek, GA
Posts: 7
Ethan E is an unknown quantity at this point
Question Output console prints text... in reverse

This is something that happened seeming out of the blue, not right after immediately re-imaging the cRIO or anything like that.

When I download code to the robot, everything is perfectly normal until this line

Code:
[cRIO] [Squawk VM] Version: 2011 FRC, Jan  6 2011, 09:58:39
[cRIO] ,RF 1102 :noisreV ]MV kwauqS[
[cRIO] c5e5aae2x0:DIUG erawdraH AGPFtoS AGPF
[cRIO] 9cc16b110a358669a8a1f
After this point, anything written to the console, like print statements, exceptions, etc., are all backwards. Occasionally there are also letters omitted from the output console, e.g.

Code:
System.out.println("Hello");
might show up as

Code:
[cRIO] ollH
The only thing I've seen print forward after this point was an error message about an FTP thread being closed (paraphrasing from memory).

Has anyone else been having a problem anything like this? I'm using Java and running Netbeans 6.9.1 on Mac OS X 10.6.6

Edit:
I tried this out on a team mate's computer, everything works fine for him.

Last edited by Ethan E : 22-01-2011 at 12:34.
Reply With Quote
  #2   Spotlight this post!  
Unread 22-01-2011, 20:35
Jeremy Germita's Avatar
Jeremy Germita Jeremy Germita is offline
Co-Advisor/Lead Engineering Mentor
AKA: wood is good. plastic is fantastic.
FRC #5012 (Gryffingear) / (Antelope Valley FIRST Teams)
Team Role: Coach
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Lancaster, CA
Posts: 285
Jeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond repute
Re: Output console prints text... in reverse

We have had a similar problem. The main difference is that it outputs gibberish, not just in reverse.

The proper output loop is as follows:
Code:
[cRIO] LEFT  CENTER  RIGHT
[cRIO] true   true       true
Code:
[cRIO] te  ue truLEFT    CER IGHtru  t  truLEFT   CER  tru  tr   e
[cRIO] LEFT    CER  IGHtru  t   e
[cRIO] LEFT  TERT
[cRIO] te  tru   e
[cRIO] LEFT    CER RIGrue
[cRIO] LEFT    CR  IGHtru  te  tr
[cRIO] LEFT    TERRIG
[cRIO] tr  rue trLEFT    TER RI
[cRIO] tr   e  trLFT   CNTET
[cRIO] ue  tr  t
[cRIO] LEFT   EN   HT
[cRIO] ue tru  t
[cRIO] LEFT    CENT   GHTtru tr   
[cRIO] LEFT    TE RI
[cRIO] tr  tru  tLEFT    ENR  IGHtru  t   e
[cRIO] LEFT   ENR  IGHtru  e  rueLEFT  CER  IGHtru  t  trLEFT    CENT   tru      ue
[cRIO] LEFT    NTE R
[cRIO] tr   ue truLEFT    CENTER    RIGHT
[cRIO] true    true    ue
[cRIO] LEFT   CRIG
[cRIO] tr   e  rueLEFT    CENT   HT
[cRIO] ruetru  t
[cRIO] LEFT   ENT   T
[cRIO] tue tru trLEFT    CENR  IGHtr   truLEFT    CER RIG
[cRIO] tue  t   e
[cRIO] LEFT    CTER  R
[cRIO] true tru  t
[cRIO] LEFT  CER  IGHtru  t   ue
[cRIO] LEFT CENIGHtru  t  ue
[cRIO] LEFT   CETER RI
[cRIO] tr  rue  te
[cRIO] LEFT  ENT   T
[cRIO] te  tru  te
[cRIO] LEFT    CEER IGHtru   e  LEFT   CTER RI
[cRIO] tr  e  truLEFT    NTE  RGTtru tr  ue
[cRIO] LEFT    CNTE RI
[cRIO] tr   ruetruLEFT    NTEHT
[cRIO] ue tru  t
[cRIO] LEFT    CER  IGHtru  t   e
[cRIO] LEFT    CEN   HT
[cRIO] ue  ue rueLEFT    CENTER    RIGHT
[cRIO] t   e  rueLEFT  CENER RIGtru  t   ue
[cRIO] LEFT    CENER IGHtru  t   ue
[cRIO] LEF   TER  RT
[cRIO] ue tru trLEFT TER RIT
[cRIO] te  rue tr
[cRIO] LEFT    CENR  RIGtr   e  rueLEFT  CEER RIGtru     ue
[cRIO] LEFT    CNTE RI
[cRIO] trrue trLEFT    CENER RIGtru      rueLEFT    CER  GHTrue t   
[cRIO] LEFT    CEERRIGtru   e  ue
[cRIO] LEFT R  IGHtru  t   ue
[cRIO] LEFT    CENT  HT
[cRIO] ruetru   e
[cRIO] LEFT CEN   GHTrue tr  e
[cRIO] LEFT    CNTE  RT
[cRIO] ttru  t
[cRIO] LEFT    TERRIGtru   e  truLEFT    CENT   HT
[cRIO] ue tru  e
[cRIO] LEFT   ENT   T
[cRIO] te  rue trLEFT    NTE  R
[cRIO] t   ue truLEFT    NTE RI
[cRIO] tr   ue e
[cRIO] LEF   NTE  R
[cRIO] tr   ue truLEFT   CNTE   T
[cRIO] ttru  t
[cRIO] LEFT    CETER RI
[cRIO] tre  rue trLEFT CEN   GHTru   e  ue
[cRIO] LEFT  ENT  RT
[cRIO] te  tr  ue
[cRIO] LEFT  EN   GHTrue tr  e
[cRIO] LEFT  ENT   GHTrue tr  te
[cRIO] LEFT    CE   GHtru te  rueLEFT   CR  RIGtru   rueLEFT    CENR  IGHtru   e  rueLEFT  CEN   GHTruetr   ue
[cRIO] LEFT   CER  IGHtru  tue truLEFT  R RIGtru   ue rueLEFT    ENT   HT
[cRIO] ue tru  te
[cRIO] LEFT   CER  IGHtru  t   e
[cRIO] LEFT   CEER IGHtr   ue LEFT    CENTER RIG
[cRIO] tre  rue trLEFT   ER  GHTrue tr   
[cRIO] LEFT    CENR  IGHtru tr   e
[cRIO] LEFT     GHTruetru  t
[cRIO] LEFT    CNT   GHTrue tr   e
[cRIO] LEFT   CER  IGHtru  t   e
[cRIO] LEFT    CER RIGtru  ue LEFT    CER RI
[cRIO] tue tru trLEFT   CR  IGHtru   e  rueLEFT    CENT  RHT
[cRIO] ue tru trLEFT    NTET
[cRIO] tru tr   ue
[cRIO] LEFT    CTERRIHT
[cRIO] tr   e  rueLEFT  CER RIGT
[cRIO] te tru  te
[cRIO] EFT    CENT  RT
[cRIO] ue ruue
[cRIO] LEFT   CTER RItru   e  trLEFT   CENT   HT
[cRIO] ruetru  t
[cRIO] LEFT    NTE  T
[cRIO] te  ue  t
[cRIO] LEFT    CE RI
[cRIO] t   e  rueLEFT  CER  IGHtru  t   ue
[cRIO] LEFT    CENT   GHTru tr   
[cRIO] LEFT    NT RI
[cRIO] tr   ue LEFT    ENT   T
[cRIO] true tr   e
[cRIO] LEFT   NTE  RT
[cRIO] te  ruetruLEFT    CEN   HT
[cRIO] ue ruetr
[cRIO] LEFT   C RIT
[cRIO] t retruLEFT   CR  RI
[cRIO] tr   e  rueLEFT   NTE RI
[cRIO] truetru  tLEFT    CENTE RI
[cRIO] tr   ue 
[cRIO] LEFT    CENERRIGtru   e  rueLEFT    CENTER    RIGHtre  tru trLEFT    CNTE  RT
[cRIO] te  ruetruLEFT  CE   GHTruetru   
[cRIO] LEFT    TER  RT
[cRIO] tue rue trLEFT    TER RI
[cRIO] tr   ue truLEFT    CENT   IG   ue truLEFT  CEN   HT
[cRIO] rue tr  te
[cRIO] LEFT    CEER  RI
[cRIO] ruetru  t
[cRIO] LEFT    NE RI
[cRIO] tre  ruetruLEFT   CR  IGHtru      ue
I'd like to hear of a fix for this...
__________________
Drive Coach Team 5012 Gryffingear / Antelope Valley FIRST teams / EWCP - (2013 - Current)
Student / Driver / Programmer / CAD - FRC Team 399: Eagle Robotics / FTC Team 72: GarageBots - (2009 - 2013)
Los Angeles Region FTC FTA/CSA/Head Ref
[FF] FIRST Pick
2014 FTC Los Angeles Regional Compass Award Winner.

2017 - San Diego Regional / Sacramento Regional / Las Vegas Regional
2016 - Los Angeles Regional Creativity + Winners (1197, 987, 5012) / Las Vegas Regional Team Spirit + SF (5012, 5851, 5049) / Galileo Subdivision
2015 - Inland Empire QF (597, 5012, 4413) / Las Vegas Imagery + Winners (148, 987, 5012) / Newton Subdivision and World Champions (118, 1678, 1671, 5012)
2014 - Inland Empire Rookie All Star + Highest Rookie Seed + SF (2339, 1967, 5012) / Las Vegas Rookie All Star / Galileo Division Imagery
Reply With Quote
  #3   Spotlight this post!  
Unread 22-01-2011, 20:40
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: Output console prints text... in reverse

@jeremypg399: Your problem might be because of multithreading. As hard to miss as it sounds, are you printing in two places?
Reply With Quote
  #4   Spotlight this post!  
Unread 22-01-2011, 20:46
Jeremy Germita's Avatar
Jeremy Germita Jeremy Germita is offline
Co-Advisor/Lead Engineering Mentor
AKA: wood is good. plastic is fantastic.
FRC #5012 (Gryffingear) / (Antelope Valley FIRST Teams)
Team Role: Coach
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Lancaster, CA
Posts: 285
Jeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond reputeJeremy Germita has a reputation beyond repute
Re: Output console prints text... in reverse

I am simply polling a digital input. It is only printing in one place
__________________
Drive Coach Team 5012 Gryffingear / Antelope Valley FIRST teams / EWCP - (2013 - Current)
Student / Driver / Programmer / CAD - FRC Team 399: Eagle Robotics / FTC Team 72: GarageBots - (2009 - 2013)
Los Angeles Region FTC FTA/CSA/Head Ref
[FF] FIRST Pick
2014 FTC Los Angeles Regional Compass Award Winner.

2017 - San Diego Regional / Sacramento Regional / Las Vegas Regional
2016 - Los Angeles Regional Creativity + Winners (1197, 987, 5012) / Las Vegas Regional Team Spirit + SF (5012, 5851, 5049) / Galileo Subdivision
2015 - Inland Empire QF (597, 5012, 4413) / Las Vegas Imagery + Winners (148, 987, 5012) / Newton Subdivision and World Champions (118, 1678, 1671, 5012)
2014 - Inland Empire Rookie All Star + Highest Rookie Seed + SF (2339, 1967, 5012) / Las Vegas Rookie All Star / Galileo Division Imagery
Reply With Quote
  #5   Spotlight this post!  
Unread 22-01-2011, 21:02
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: Output console prints text... in reverse

Would you please post your code? I don't think this will be easy to diagnose without it.

Sorry to hijack the OP's thread! Perhaps you could PM me the code, instead of cluttering up this one?
Reply With Quote
  #6   Spotlight this post!  
Unread 23-01-2011, 02:19
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: Output console prints text... in reverse

dude, crazy win

my suggestion to combat it is to either make a function that inverses strings you print, or reformat crio and pray

Last edited by Robototes2412 : 23-01-2011 at 02:22.
Reply With Quote
  #7   Spotlight this post!  
Unread 23-01-2011, 03:37
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: Output console prints text... in reverse

Hmm, I recently encountered something similar which I believe to be an error with however the cRIO handles sending/receiving information. I send some text, but only get less than half of it. Not sure what's going on, will try re-flashing it, this HAS to be a problem with the cRIO. This same exact code didn't work before, but something similar did.
Reply With Quote
  #8   Spotlight this post!  
Unread 23-01-2011, 09:34
derekwhite's Avatar
derekwhite derekwhite is offline
Java Virtual Machine Hacker
no team (FIRST@Oracle)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2009
Location: Burlington, MA
Posts: 127
derekwhite is on a distinguished road
Re: Output console prints text... in reverse

This is a known issue, thought to affect only the new router when connected wirelessly. This is due to an issue with the router and an issue with the cRIO that only affects console output. We are working on a fix.

In the meantime, if you see this on the old access point or connected via ethernet cable, please post the details.
Reply With Quote
  #9   Spotlight this post!  
Unread 23-01-2011, 18:41
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: Output console prints text... in reverse

Quote:
Originally Posted by derekwhite View Post
This is a known issue, thought to affect only the new router when connected wirelessly. This is due to an issue with the router and an issue with the cRIO that only affects console output. We are working on a fix.

In the meantime, if you see this on the old access point or connected via ethernet cable, please post the details.
I am connected via ethernet. This happens via the router or when connected directly.
Reply With Quote
  #10   Spotlight this post!  
Unread 24-01-2011, 02:16
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Output console prints text... in reverse

Quote:
Originally Posted by sjspry View Post
I am connected via ethernet. This happens via the router or when connected directly.
Please double check this. Are you certain you see this reversed output behavior even when you are ONLY connected with an Ethernet cable?

-Joe
Reply With Quote
  #11   Spotlight this post!  
Unread 27-01-2011, 15:14
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Output console prints text... in reverse

Quote:
Originally Posted by sjspry View Post
I am connected via ethernet. This happens via the router or when connected directly.
Have you been able to verify this? Sometimes if you have both the wired and wireless interfaces connected at the same time, the system chooses the wireless and then you'd see the problem.

We expect to see a fix for the wifi related issue in the next Java update.

We've never been able to reproduce the bug when hard wired.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #12   Spotlight this post!  
Unread 28-01-2011, 02:42
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: Output console prints text... in reverse

Yeah, it's like you said, I happened to be on wireless. The problem I had with characters disappearing is a problem with how DataInputStream.readUTF() (or, rather UTFReader or something) reads data. It always expects 16-bit UTF characters, for some reason.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 13:19.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi