I've found a bug!
Wiring won't start! Nothing happens when I click “Run”!
This used to work and now it doesn't
Why does 2 / 5 = 0 instead of 0.4?
Common Issues (not bugs)
Things that we probably can't fix
Known Bugs


 

I've found a bug!

We know you're excited, but please avoid the urge to just email us! especially sending mail to Hernando or Nicholas directly. This includes sending us "Instant Messages" on the discourse section of the site. While you may prefer the privacy of a personal message, it's much quicker for you to write to the board, where you'll find all sorts of helpful people who are also often at all hours of the night. If you email us directly, we'll either not respond or just ask you to use the discourse board anyway.

We spend a lot of our time helping people with Wiring, so reading and following these instructions means that you respect our time and don't want to waste it.

First, read the FAQ. Start with digging through this page and maybe the platforms page too in case it's something specific to your operating system.

Second, search the bug report section in the discourse to see if your problem has already been reported. Most often, this will contain background on the bug, a workaround, or hopefully a bit about its status. The bug database is unfortunately incomplete so it doesn't cover everything, but it will get better with time.

If you don't find your bug, enter it as a new bug in the database, this will help us keep track of the issue.

When reporting please include information about

  1. the revision number (i.e. 0010)
  2. what operating system you're using, and on what kind of hardware
  3. a copy of the smallest possible piece of code that will produce the error you're having trouble with
  4. details of the error, either the red spew that you see in the console, or the last few lines from the files stdout.txt or stderr.txt from the 'lib' folder.
For stranger errors during compile time, you can also look inside the build folder which contains an intermediate (translated into C++) version of your code. The build folder will be located inside a temporary directory on your machine, probably /tmp/buildNNNN on Mac OS X and Linux, or on Windows, in one of its many "TEMP" folders, inside a buildNNNN folder (the Ns will be numbers or letters). The more details you can post, the better, because it helps us figure out what's going on. Useful things when reporting:
  • We want the minimum amount of code that will still replicate the bug. The worst that can happen is we get a report with a subject saying "problem!" along with a three page program. Sure, everyone likes a puzzle, but simpler code will receive a faster response.
  • Occasionally we may need you to pack up a copy of your sketch folder or something similar so that we can try and replicate the weirdness on our own machine. Rest assured, we have no interest in messing with your fancy creations or stealing your ideas.
 

 

Wiring won't start! Nothing happens when I click “Run”!

Windows

  • Chances are, your machine has Java 1.5 installed, which is not supported and causes lots of headaches.
  • Wiring seems to have trouble starting when run from a user account that contains non-ascii characters. For instance, if your name contains Japanese characters or umlauts, it's likely to have trouble. Sometimes using run.bat instead will fix this. Another fix is to create a user account that uses only ascii characters. In the meantime, we're looking for a fix.
  • If you have lots of garbage in your CLASSPATH environment variable, that might cause trouble starting up a sketch. You might get "Couldn't find package xxx.xxx" errors. Clean things up by avoiding spaces and quotes. This is because of Windows' awesome hokiness and its not-as-distant-as-it-should-be ancestor DOS. In the future, we'd like to detect errors like this before they cause trouble.
Mac OS X
  • Wiring requires Mac OS X 10.3.9 or later, see the platforms section for more information.
  • First be sure that you're not trying to run Wiring from the disk image. As with most programs, Wiring needs to be copied to the Applications folder in order for it to run properly.
  • If it's still not working, open Console.app, found in Applications → Utilities → Console and see if there are any messages. If you don't know what they mean, post them to the discourse board where someone can help you out.
  • An error such as this one visible in Console.app:
    #
    # The exception abal Machine: 
            ove was detected in native code outside the VM
    #
    # Java VM: Java HotSpot(TM) Client VM (1.4.2-50 mixed mode)
    #
    /Applications/Wiring 0010.app/Contents/MacOS/JavaApplicationStub: 
    An unexpected Java error has been detected by HotSpot Virtu
    may be the result of a partially failed Java update. First try entering this with Terminal.app:
     /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/java -version
    
    If that results in a message like:
    update_sharing command failed to execute 
    
    followed by more text, then your install is messed up. To fix it, enter this:
     /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands/update_sharing 1.4
    
    and then try the -version command again. Hopefully, the "update_sharing command failed to execute" message will no longer be there, meaning that Wiring and other Java applications should run again.
  • Using developer releases of Java is strongly discouraged. These can often cause problems and we can't possibly support them.
Linux
  • If you get an error reading Exception in thread "main" java.lang.UnsatisfiedLinkError: /your path/wiring/build/linux/work/java/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory, It's because Wiring requires libXp-1.0.0-8.i386. You should install it before Wiring will run.
 

 

This used to work and now it doesn't

Read the changes in the revisions file.

 

 

Why does 2 / 5 = 0 instead of 0.4?

The result of dividing two integers will always be another integer:

int a = 2;
int b = 5;
int result = a / b;
// result is zero
      
While somewhat confusing at first, this is later useful for more advanced programming.

To get fractions, use a 'float' instead:
float a = 2.0;
float b = 5.0;
float result = a / b;
// 'result' will be 0.4
It is not enough to just divide two integers and set them to a float:
float y = 2 / 5;
In this case, integer 2 is divided by 5, which is zero, and then zero is assigned to a float. The number doesn't become a float until the lefthand side of the = sign. On the other hand, this:
float y = 2.0 / 5;
will work just fine. In this case, Java sees that 2.0 is a float, so it also converts the 5 to a float so that they can be divided, which makes it identical to:
float y = 2.0 / 5.0;
and because floats are being used on the righthand side, the result will be a float, even before it gets to the lefthand side.
 

 

Common Issues (not bugs)

Things that are often perceived as bugs, but aren't actually 'broken'.

Using the serial port

All Platforms

  • If you're using a program to check to see if the Wiring board serial port is working, then it won't be available to Wiring. That means that if you're using HyperTerminal or whatever to see if your serial device is working, then you need to quit out of that application before using that port with Wiring.
  • Disconnecting the Wiring I/O board while the serial monitor is active (via the Serial Monitor button) will cause a number of errors inthe console. These will only stop by stopping the serial monitor.
  • Error inside Serial.serialEvent()
    java.io.IOException: No error in nativeavailable
    at gnu.io.RXTXPort.nativeavailable(Native Method)
    at gnu.io.RXTXPort$SerialInputStream.available(RXTXPort.java:1532)Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(482): Access is denied.

    Error 0x5 at /home/bob/foo/rxtx-devel/build/../src/termios.c(2714): Access is denied.

Mac OS X
  • We use rxtx (formerly version 2.1_6, as of 0010 using version 2.1_7) to handle serial I/O, which is included with the Wiring release. If this is the first time you're using rxtx, you'll need to run macosx_setup.command (double-click it and follow the instructions). This will make sure that things are properly set up (a few permissions need to be changed).
  • For Intel Macs, you'll need to use Wiring release 0010 or later, this is the first version to have a Universal Binary for RXTX.
  • If you're getting a "serial port is already in use by another application" it's possible that you haven't run the setup script.
  • The OS X 10.4 (Tiger) installer wipes out your permissions and groups on /var/spool/uucp, so you'll have to run the setup command again. However, running it returns:

    check_group_uucp(): error testing lock file creation Error details: Permission deniedcheck_lock_status: No permission to create lock file.

    Tom Igoe's extremely technical solution: “After you have run the macosx_setup.command, Shut down the machine and restart.

    “Don't logout then log back in. Don't just restart. Shut down and restart. I don't care that you've got a record uptime you're trying to preserve. SHUT DOWN AND RESTART! Don't be an idiot like I was. This will free up the old lock files, which apparently carry over from the previous systems, and your serial devices will be happy.

    “And on that note, Tiger and Wiring are playing happily together with a serial port, like kittens with a ball of string.”
 

 

Things that we probably can't fix

Some things are out of our control, or not actually bugs...

All Platforms

  • A long sketch menu that goes off the edge of the screen? Doesn't scroll properly? There's not much we can do. This is a java issue which happens on most platforms. To get around it, you can organize your sketches into subfolders which will appear as submenus (be sure to quit before reorganizing, and then restart when finished).
Windows
  • An error starting with "hs_err_pid10XX.txt" sometimes shows up. This is something within the Sun's Java VM that we can't fix. It's not clear what the problem is, but it seems to have shown up with java 1.4.
Mac OS X
  • Nothing so far
Linux
  • The following message (or messages like it) on startup: Warning: Cannot convert string "-b&h-lucida-medium-r-normal-sans-*-140-*-*-p-*-iso8859-1" to type FontStruct. This is just a Java issue, but doesn't seem to affect anything.
 

 

Known Bugs

This section is incomplete, so nothing here yet.