Pages: [1] 2   Go Down
Author Topic: Arduino Crashes on Mac OS X 10.7.3 (lion) when uploading to Uno  (Read 1792 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can compile fine, but when I try to upload a simple working sketch to an Uno, Arduino crashes on me.  I've tested all the available ports, tried reinstalling Arduino, but still get the same issue.

I'm working on a friend's older MacBook Pro that I just recently upgraded the OS to lion.  Even though the computer's a little older, the hardware still seems good: 2.4 GHz Intel Core 2 Duo, 4GB ram

Has anyone else seen this problem?

Here is the crash report if that helps:
Code:
Process:         JavaApplicationStub [2930]
Path:            /Applications/Arduino.app/Contents/MacOS/JavaApplicationStub
Identifier:      cc.arduino.Arduino
Version:         1.0 (0100)
Code Type:       X86 (Native)
Parent Process:  launchd [342]

Date/Time:       2012-04-05 00:58:20.715 -0700
OS Version:      Mac OS X 10.7.3 (11D50)
Report Version:  9

Interval Since Last Report:          1122 sec
Crashes Since Last Report:           3
Per-App Interval Since Last Report:  1027 sec
Per-App Crashes Since Last Report:   3
Anonymous UUID:                      A20E765C-8A7B-4E08-A7A1-7E2B9D1E77FB

Crashed Thread:  21  Java: Thread-6

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000b0182b70

VM Regions Near 0xb0182b70:
    Stack                  00000000b0001000-00000000b0082000 [  516K] rw-/rwx SM=COW  
-->
    Stack                  00000000b0186000-00000000b0187000 [    4K] ---/rwx SM=NUL  

Application Specific Information:
objc[2930]: garbage collection is OFF
 
Java information:
 Exception type: Bus Error (0xa) at pc=000000001f6c818f
...

Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am running Lion.  At the terminal I ran "java -version" and got back 1.6.0_29.

I have no problem with uploading.  What version do you have?
Logged

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

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

thanks for the suggestion.  it looks like my java is up to date:

Code:
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)

are there any other things the Arduino IDE uses that i could try confirming?  Maybe I need to run a firmware update for the Mac?
Logged

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

I'm testing by attempting to upload a simple "blinky" sketch.

I also just updated my java version.  Here's the output from the terminal

Code:
$ java -version

java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04-414-11M3626)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-414, mixed mode)
Logged

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

I tested all the available serial ports and it still crashes.  I've restarted the computer, I've confirmed the board selection matches my hardware (arduino uno). 

Is there a way I can compare USB drivers with anyone?  I don't actually know the terminal command to be able to look mine up.  Maybe also comparing hardware via the system profiler?
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Weird, I've never seen this before.  What serial ports do you have?

Are you running any software (possibly in the background) that might be looking for serial ports (e.g. anything involving syncing with a cellphone, or using a USB cellular internet dongle, or bluetooth communication)? 

Does it crash when you compile (verify) but not upload? 
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there a way I can compare USB drivers with anyone?  I don't actually know the terminal command to be able to look mine up.  Maybe also comparing hardware via the system profiler?
The "drivers" for the Uno are built into OSX and not something that gets updates often (if ever) anymore.

One step you could try is to turn on verbose output in the Preferences so you can see the command lines being executed.  Maybe avrdude is causing the problem?  You could see where the files are located and the avrdude command line and try running it manually.
Logged

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

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

No software running in the background, and yes it can can compile (verify) OK but when I attempt to program it crashes.

When turning on verbose output, I found that Arduino>>Preferences menu was pointing to a folder that I don't have:
/Users/mysusername/Library/Arduino/preferences.txt

I noticed during compiling that I got this orange message twice (I guess a warning):
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Tone.cpp:108: warning: only initialized variables can be placed into program memory area


If it helps, I just double-checked my hardware under About This Mac>>More Info...>>System Report>>Hardware Overview menu: 64-bit processor (Intel core 2 duo), but not the aluminum body macs (Model Identifier: MacbookPro3,1).

Thanks again for your continued help.

Here's my test:
Code:
/*=============================================================================
 File: HeartbeatTest.ino
 
 Description: This file brings a microcontroller to life through a
    'Hello World' equivalent of embedded circuits.  It toggles the pin
    connected to the onboard LED at approximately 1Hz to confirm a
    (at least a partially) functional development toolchain.  Among other
    things, it serves as a quick, first step toward developing your
    application on an Arduino Uno.
=============================================================================*/
/*---------------------------Dependencies------------------------------------*/
#include <Arduino.h>

/*---------------------------Public Function Definitions---------------------*/
void setup() {
  DDRB |= (1 << PORTB5);    // configure as a digital output
  PORTB &= ~(1 << PORTB5);  // initialize as low
}

void loop() {
  delay(500);               // pause for 500 milliseconds
  PORTB ^= (1 << PORTB5);   // toggle the pin
}


* Screen Shot 2012-04-10 at 12.10.32 PM.png (16.48 KB, 244x126 - viewed 5 times.)

* Screen Shot 2012-04-10 at 12.10.43 PM.png (13.84 KB, 184x122 - viewed 5 times.)
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

No software running in the background, and yes it can can compile (verify) OK but when I attempt to program it crashes.
Clearly that's not true.  All modern computers have many processes (and Applications) running in the background.  I'm 100% certain you at least have Finder running in the background.

Open up Activity Monitor and look at "All Processes".  I'm pretty sure there is more than just "java" (the IDE) running.

It's up to you, but one option is to post the list of processes to see if anyone can spot something suspect.
Logged

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

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

Here's a screenshot of my activity monitor.  Does anything look odd?

I closed finder and tried re-programming and got the same crash result.  My USB ports seem to work fine with my mouse (I've tried programming without that plugged in too).  I'm also confident it's not the Uno because I was using this Uno on a PC.  I've also checked with two different Uno's.

Is there a way to check my compiler version in the terminal or other things that the Arduino Processing IDE uses?  Maybe I need to update avrdude?  although I'm not sure how.  We've thankfully confirmed that my java is up to date.  I just checked Software Update... to make sure I'm no missing anything else (all was up to date).    I also just reinstalled a fresh Arduino 1.0 for mac version to no success.

The only other lead I'm thinking of right now is that I still don't understand why I didn't have that directory which holds the preferences file I mentioned earlier.


* Screen Shot 2012-04-10 at 6.41.30 PM.png (120.34 KB, 537x595 - viewed 10 times.)
Logged

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

I just turned off my bluetooth, unplugged my mouse and tried programming again to no success...
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's a screenshot of my activity monitor.  Does anything look odd?
Screenshot is one way.  I would have just used File -> Save and get a text file.

I closed finder and tried re-programming and got the same crash result.
Yeah, I wasn't suggesting Finder was a problem.  Just pointing out that *everyone* claims "nothing is running in the background", when there is always a bunch of stuff running in the background.  For example, did you know whatever game you installed also runs a background task called "CrossOver CD Helper" on startup?

Is there a way to check my compiler version in the terminal or other things that the Arduino Processing IDE uses?  Maybe I need to update avrdude?  although I'm not sure how.
All of the Arduino tools are included inside of the Application Bundle.  So there really isn't anything to "update" on OSX.  You would just run another instance of the Arduino.app.

I also just reinstalled a fresh Arduino 1.0 for mac version to no success.
What if you try running (because there is no "installing") version 0023?

The only other lead I'm thinking of right now is that I still don't understand why I didn't have that directory which holds the preferences file I mentioned earlier.
Yes you do, it is hidden in Lion.  You can either access it from the Terminal or with Finder selected open "Go -> Go to Folder" and type in that path (/Users/<name>/Library/Arduino)
Logged

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

Austin, TX
Offline Offline
God Member
*****
Karma: 12
Posts: 524
carpe diem
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Library folder is a hidden folder so you are not going to see it if you are just browsing around in Finder.

If you open the Preferences dialog from the Arduino menu, then click on the preferences.txt link at the bottom of the dialog, it will take you right to the folder that contains preferences.txt
Logged

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

I just tried with the older arduino 0023 and am still crashing.  I found an FTDI driver package and installed that, but it doesn't seem to make a difference.

For one attempt I actually got an error that my port (dev/tty.usbmodem1d11) was being used.  I switched my other USB port and got something along the lines of "serial port not found, would you like to try another?" and selected (dev/tty.usbmodem1a21).

I am seeing the Tx light blink at about 1Hz at least after a crash before I close the crash response.  I also checked with new wire (sheilded A-to-B connector stolen from my printer).

Also I just removed crossover from my apps.

I was programming these with a PC before.  That shouldn't make a difference right?  I'm sorry for all the questions, I'd just really like to program the Uno.

Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

With Show Verbose output enabled (1.0), record your screen while the upload process occurs and then post the video to youtube.

QuickTime will let you do a Screen Recording (File -> New Screen Recording).  Once you are done, you can upload it in QuickTime with "Share".
Logged

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

Pages: [1] 2   Go Up
Jump to: