Arduino 1.6.8 exits when I plug Teensy 3.2 in suspepect java problem

Status
Not open for further replies.

Jim N

Member
Symptoms:

Whenever I plug in the Teensy 3.2, Teensyduino/Arduino 1.6.8 crashes and I get a new log file written such as hs_err_pidxxxx.log (xxxx varies). Same problem with Arduino 1.6.9.

I re-ran TeensyduinoInstall.exe to re-install, and updated usb drivers.

OK then, from the beginning...everything was good until:

I was working on an app to setup the FTM module for time varying realtime interrupts. I was making good progress, but I noticed that my debug prints to the serial monitior were only working occasionally.

I saw some posts indicating others were having this problem too, and they recommended changing the "USB Type" from serial to Keyboard+Mouse+Joystick or Serial+Keyboard+Mouse+Joystick. I tried various USB options, rebuilding, launching the serial monitor. After a few trials, Teensyduino/Arduino just closed all by itself.

With the teensy still plugged in, I relaunched Teensyduino/Arduino and I saw the splash screen, but it silently closed without even showing the project screen. I unplugged the teensy, and relaunched. The project opened. I plug in the teensy, and Teensyduino/Arduino just silently crashes/exits.

I noticed a log file generated for each crash.

I reloaded the entire IDE and reinstalled Teensyduino, but the problem is still present. Error log is attached.

I attached my source, but now it does not matter what source code I load with Teensyduino, It still crashes, so my source code is probably not causing this.

View attachment TeensyTest2.cpp

View attachment hs_err_pid5196.log.txt
 
Very odd - I've never seen this. Hold the button as you plug the Teensy in and it will start in program mode perhaps without that behavior and you can put a fresh sketch on. Maybe start with blink.
 
Very odd - I've never seen this. Hold the button as you plug the Teensy in and it will start in program mode perhaps without that behavior and you can put a fresh sketch on. Maybe start with blink.

It's launching properly again for some reason. I did as you suggested, holding the button, and it started right up.

Serial monitor is still not working though.

Not sure if the button hold or the power cycle on my computer did the trick though. I only did try a restart earlier.
 
It's launching properly again for some reason. I did as you suggested, holding the button, and it started right up.

Serial monitor is still not working though.

Not sure if the button hold or the power cycle on my computer did the trick though. I only did try a restart earlier.

**********************************************

Update. The problem repeats when I select USB type = Serial + Keyboard + Mouse + Joystick.
1) As soon as I hit upload, Teensyduino/Arduino 1.6.8 crashes.
2) I hold the button on the Teensy when I relaunch, and it works.
3) I changed USB type = Keyboard + Mouse + Joystick, and I my serial monitor also works.

Its a bit confusing, but its working for now.

The takeaway for me is this: don't use USB type = Serial + Keyboard + Mouse + Joystick with Teensy 3.0.
do use USB type = Keyboard + Mouse + Joystick if serial monitor stops working.
 
Which operating system are you using?

Can you check if the crash still happens with Arduino 1.6.9 with Teensyduino 1.29-beta3?
 
I'm on Windows 7 Enterprise, 64 bit.

I loaded Arduino 1.6.9 with Teensyduino 1.29-beta3, and it still crashes.

Definitely ODD - my most common machine is Win 10 - but on my better machine with Win 7 Ulitmate I've used 1.6.8 quite a bit and now this week 1.6.9 with Teensyduino 1.29b3 with no such problems.

On Win 10 I have 13 sketches open in IDE windows and SerMon - Only 7 open on my Win 7 box - plus SerMon from last couple days with K66 Beta.

Are you doing INSTALL or UNZIP of the IDE? I only do UNZIP to a fresh directory - then just run the Arduino.exe from there and install TeensyDuino on top of it. Using install puts the IDE fingers into stuff that caused me grief last year so I stopped doing it - especially when keeping old parallel installs of the IDE in case the new one won't work. It may be your JAVA install.

If you 'install' the IDE - I'd suggest uninstalling any instances - open Control Panel JAVA and check for updates - and pull down the ZIP and extract to a directory - I put them on the ROOT of a separate disk area - name it something catchy like "I:\arduino169" - open the IDE - Close the IDE - install TeensyDuino to that directory and see if the problem goes away. Then I put my sketchbook folder on the root of that or another drive - wholly away from any IDE install areas so it persists across versions and installs.
 
Definitely ODD - my most common machine is Win 10 - but on my better machine with Win 7 Ulitmate I've used 1.6.8 quite a bit and now this week 1.6.9 with Teensyduino 1.29b3 with no such problems.

On Win 10 I have 13 sketches open in IDE windows and SerMon - Only 7 open on my Win 7 box - plus SerMon from last couple days with K66 Beta.

Are you doing INSTALL or UNZIP of the IDE? I only do UNZIP to a fresh directory - then just run the Arduino.exe from there and install TeensyDuino on top of it. Using install puts the IDE fingers into stuff that caused me grief last year so I stopped doing it - especially when keeping old parallel installs of the IDE in case the new one won't work. It may be your JAVA install.

If you 'install' the IDE - I'd suggest uninstalling any instances - open Control Panel JAVA and check for updates - and pull down the ZIP and extract to a directory - I put them on the ROOT of a separate disk area - name it something catchy like "I:\arduino169" - open the IDE - Close the IDE - install TeensyDuino to that directory and see if the problem goes away. Then I put my sketchbook folder on the root of that or another drive - wholly away from any IDE install areas so it persists across versions and installs.

I move between several different machines a lot, so I've just been unzipping the IDE folder to my desktop, then installing TeensyDuino to it. Sketches are in my documents/Arduino. I tried unzipping to root, still crashes.

Problem seems Java related given the error logs.

I've been working on a dell p5510 laptop. I can try it on a few other boxes when I get home tonight.
 
Good luck Jim - sounds like the IDE is unZipped as I have luck with it. I moved sketchbook out of DOCS too - after I caused Paul hours of grief a year back when the IDE fell through my sketchbook and re-included all of Arduino - they fixed that bug - but I just stopped that.

On my Win 7 machine I even activated Boards Manager for ESP8266 and that caused no grief, so IDE should work if not being tormented by something ...
 
Tonight I tried running TeensyDuino on my 2008 R2 server box. No problems. Must be something hosed on my laptop.
 
Tonight I tried running TeensyDuino on my 2008 R2 server box. No problems. Must be something hosed on my laptop.

Yeah - that's where I was heading - I've been running it over a year and not seen that - since TeensyDuino went BETA on the first 1.6.x build group. Of today course I only have one Win 7 machine - and that just got it's (year old) fresh larger SSD and HDD installed and will be going to Win 10 ASAP.

Maybe try to see if you can get a clean upload by doing a Verify build on a simple BLINK sketch - THEN plug in the Teensy while holding the button - give it a couple seconds and release the button. Alternatively hold the button before the verify build as you plug it in - count to 5 and release then hit Verify. After making sure the right Teensy and settings are selected under Tools.

Only other work around might be search TYQT on the forum and install - my next post will be on TYQT thread so if you click 'defragster & view forum posts it'll take you there'- maybe choose the 'integrate to Arduino' option. It handles USB differently outside IDE and JAVA and replaces TeensyDuino for uploading. I don't know why that would help - but it is how I generally do it.
 
Yeah - that's where I was heading - I've been running it over a year and not seen that - since TeensyDuino went BETA on the first 1.6.x build group. Of today course I only have one Win 7 machine - and that just got it's (year old) fresh larger SSD and HDD installed and will be going to Win 10 ASAP.

Maybe try to see if you can get a clean upload by doing a Verify build on a simple BLINK sketch - THEN plug in the Teensy while holding the button - give it a couple seconds and release the button. Alternatively hold the button before the verify build as you plug it in - count to 5 and release then hit Verify. After making sure the right Teensy and settings are selected under Tools.

Only other work around might be search TYQT on the forum and install - my next post will be on TYQT thread so if you click 'defragster & view forum posts it'll take you there'- maybe choose the 'integrate to Arduino' option. It handles USB differently outside IDE and JAVA and replaces TeensyDuino for uploading. I don't know why that would help - but it is how I generally do it.

Unfortunately, the laptop is a managed machine, and it's probably not worth the bitching, arguments and trouble it would take to load a modern Java build <running 7.65>. I will just work on another machine if I need Keyboard+mouse+serial.

Thanks for taking a crack at it though.
 
It may be the 'managed' portion that blocks something under the covers causing the crash? Paul noted recently that Java needed for the IDE is packed as part of the ide itself so that may not be a factor.
 
Look inside your Arduino folder. The default location is C:\Program Files (x86)\Arduino, but it may be installed elsewhere if someone has done a custom install.

Can you see a "java" folder inside the Arduino folder? It should contain a complete copy of the Java Runtime Environment, version 1.8.0-66 (a.k.a. "8u66"). Arduino is supposed to use that exact copy, even if your machine has other newer or older copies of Java installed.
 
Look inside your Arduino folder. The default location is C:\Program Files (x86)\Arduino, but it may be installed elsewhere if someone has done a custom install.

Can you see a "java" folder inside the Arduino folder? It should contain a complete copy of the Java Runtime Environment, version 1.8.0-66 (a.k.a. "8u66"). Arduino is supposed to use that exact copy, even if your machine has other newer or older copies of Java installed.

Understood. The Java folder is present.
 
Status
Not open for further replies.
Back
Top