<< Previous | Home | Next >>

Spotted?!?! Fifth Generation Google Street View Camera in Zurich

Bookmark and Share

This morning while walking to work around 0915 I saw a Google Street View car at Hardbrücke out front the Freitag shop. The camera looked slightly different to my previous sighting two years ago in Basel, so I whipped out my trusty iPhone and snapped a picture. A quick look at the Wikipedia page on Street View seems to indicate that this is the 5th generation camera.

Google Street View Camera Car - Fifth Generation View Larger Map

The driver had pulled over and was mucking about with what looked like a windscreen-mounted GPS device, which suggests that the driver may not have been in capture mode. That area has been a bit of a construction mess for teh past year so I could easily see him a bit lost. (Then again, maybe my fuzzy face will show up on Street View sometime soon.)

mediastreamvalidator bug: Error number -12847, format reader file not recognized

Bookmark and Share

More and more recently I've been working with Apple's mediastreamvalidator, which (as the name implies) validates an MPEG-TS media stream from .m3u8 index files down to the codec and stream bitrate. While validating the streams produced by a project I am working on a few weeks ago, this ugly little bug popped up.

manoa:~ stu$ mediastreamvalidator validate http://media10.simplex.tv/content/2/270/11668/mpegts_256kb.m3u8
Validating http://media10.simplex.tv/content/2/270/11668/mpegts_256kb.m3u8 against iOS 4.0.1

ERROR: Invalid media segment: The validator helper exited due to a fatal error: failed to 
   create format reader: [errno: -12847] format reader file not recognized.
 71:    /content/2/270/11668/mpegts_256kb_33.ts
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ERROR: Invalid media segment: The validator helper exited due to a fatal error: failed to 
   create format reader: [errno: -12847] format reader file not recognized.
169:    /content/2/270/11668/mpegts_256kb_82.ts
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

WARNING: Media segment exceeds target duration by 30.240 % (6.98 vs. 10.00 seconds, limit is 20 %).
171:    /content/2/270/11668/mpegts_256kb_83.ts
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

WARNING: Media segment exceeds target duration by 100.533 % (6.02 vs. 3.00 seconds, limit is 20 %).
173:    /content/2/270/11668/mpegts_256kb_84.ts
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Average segment duration: 9.75 seconds
Average segment bitrate: 350.01 kbit/s
Average segment structural overhead: 33.33 kbit/s (9.52 %)

Video codec: avc1
Video resolution: 640x360 pixels
Video frame rate: 25.00 fps
Average video bitrate: 253.45 kbit/s
H.264 profile: Baseline
H.264 level: 3.0

Audio codec: aac 
Audio sample rate: 48000 Hz
Average audio bitrate: 63.23 kbit/s

The scary part in here is:

ERROR: Invalid media segment: The validator helper exited due to a fatal error: failed to 
   create format reader: [errno: -12847] format reader file not recognized.

Is the error due to a problem in my stream? Or is it the mediastreamvalidator tool itself? The tool even fails a self-test, which makes me suspect the tool over my stream as the cause. We need to know.

Despite misgivings about reporting bugs to the famously opaque Apple, I made the effort and created Apple Problem ID 8696703. To my utter shock, the contacted me because the

subversion-javahlbindings @1.6.15_0 breaks Eclipse Helios on OS X 10.6.5

...just trying to update my FFmpeg installation via MacPorts...
Bookmark and Share

Eclipse Helios + Subclipse LogosIn the name of updating FFmpeg 0.6 and x264, I ran sudo port update followed by sudo port upgrade outdated. During the MacPorts package update attempt, the message qt4-mac circular dependency issue. Do I need this? I think not. sudo port uninstall qt4-mac. Now I get the below with sudo port update outdated""subversion-javahlbindings requires the Java for Mac OS X Developer Package from Apple" with a link. So I go and download javadeveloper_10.6_10m3261.dmg and install it. Now Eclipse Helios crashes hard with:

Process:         eclipse [91658]
Path:            /Applications/eclipse 3.6 64-bit/Eclipse.app/Contents/MacOS/eclipse
Identifier:      org.eclipse.eclipse
Version:         3.6 (3.6)
Code Type:       X86-64 (Native)
Parent Process:  launchd [158]

Date/Time:       2010-12-19 14:16:07.802 +0100
OS Version:      Mac OS X 10.6.5 (10H574)
Report Version:  6

Interval Since Last Report:          803 sec
Crashes Since Last Report:           1
Per-App Interval Since Last Report:  32 sec
Per-App Crashes Since Last Report:   1
Anonymous UUID:                      27687175-028A-4397-88B6-654DD1A00809

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Application Specific Information:

Java information:
 Exception type: Bus Error (0xa) at pc=14a275eec

 Java VM: Java HotSpot(TM) 64-Bit Server VM (17.1-b03-307 mixed mode macosx-amd64)

...snip...

Java Threads:  ... snip...

VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None

...snip heap stats...

Virtual Machine Arguments:
JVM Args: -Dosgi.requiredJavaVersion=1.5 -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts 
  -XX:MaxPermSize=256m -Xms40m -Xmx384m -Xdock:icon=../Resources/Eclipse.icns 
  -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts 
Java Command: 
Launcher Type: generic
Physical Memory: Page Size = 4k, Total = 3968M, Free = 58M

Crash report sent to Apple the first time, but that is not going to resolve my current issues: no svn access from Eclipse. I've installed the latest Java For Mac OSX10.6 Update 4 from Apple, but that was not the problem. What did do the trick was activating the previous version subversion-javahlbindings.

~ stu$ sudo port activate subversion-javahlbindings @1.6.11_0
--->  Deactivating subversion-javahlbindings @1.6.15_0
--->  Activating subversion-javahlbindings @1.6.11_0
manoa:~ stu$

Being a good netizen, I've reported this to the maintainers on IRC. They've told me to chase it up with the Eclipse team, which I have with Eclipse Bugzilla bug #332920.


Update. Eclipse developer Alexander Gurov says on 1 February that the problem is with Subversion.

Looks that there are some incompatibility issues between Java part of version 1.6.12 in Subversive connector and binaries of version 1.6.15 or there is an issue in the binaries of version 1.6.15 itself.

Back the the SVN team? Nah...not interested in playing pingpong.

Read more...

Tethering Problems Between MBP and iPhone 4 Resolved

After some tinkering the PAN finally works. Edge case bug, me thinks.
Bookmark and Share

This morning while attempting to tether my brand new iPhone 4 32GB to the almost new 2010 Unibody MacBook Pro, I ran into a series of problems. (Why do this? Because I want to create a PAN, or a Personal Area Network. This will allow me to use my iPhone 4 for wireless Internet access while out and about.) After four attempts at pairing the two in an effort to enable tethering, I had to hit the intertubes to find a fix. Unfortunately, others had similar problems.

So, Navigating to Settings >> General >> Network >> Internet Tethering and flipped the switch to 'on'.

iPhone iOS 4.2.1 Turn on Tethering

Then it was time to initiate the pairing from the MacBook Pro. Now to start the pairing on the iPhone. Navigate to Settings >> General >> Bluetooth and the phone automagically starts searching for the MBP. Poof! Once the Mac sees the iPhone it gives you a security number to ensure it is syncing to the same devices, like here:

iPhone iOS 4.2.1 BlueTooth pairing instructions

You see the same security number on the iPhone, and hit the Pair button.

iPhone iOS 4.2.1 BlueTooth pairing instructions

Much to my chagrine, the below "Pairing Unsuccessful" message showed up each time I tried to pair the devices.

iPhone iOS 4.2.1 BlueTooth pairing instructions

After the fourth attempt, I checked Console to see if there were any interesting messages.

  Bluetooth Setup Assistant[425]  starting pairing
  Bluetooth Setup Assistant[425]  Pairing failed with 'Stu Thompson’s iPhone': error 0x10

Yup, that's interesting. Out in the Googleverse there are plenty of folks having all sorts of problems pairing their iPhones and MacBook Pros, in an attempt to tether or otherwise. There is information about updating the Bluetooth firmware, but that was not relevant to my brand-spanking-new MBP. So, after some peeking and poking, I decided to delete the existing Bluetool PAN on the MBP.

And that worked! (To delete the old PAN, just select "Bluetooth PAN" in the Network Preferences and then click the little - button at the bottom left.)

iPhone iOS 4.2.1 BlueTooth pairing instructions

What I had failed to take into account was that there was a previous tethering relationship configuration in the original Bluetooth PAN. Several weeks ago my buddy Lincoln and I had paired my MBP to his iPhone so that we could get on the net while discussing some technology mumbo jumbo at Imagine.

A little bit frustrating. Although this is an edge case situation, Apple could and should make the tethering process more robust. Responsible Stu thinks he should file a report with Apple. Pessimistic Stu thinks communicating with Apple is too opaque and unrewarding. Stu's wife thinks he should stop geeking this Sunday morning and pay more attention to her. Two against three: no bug report.

Maximum number of threads in a JVM

Bookmark and Share

Out of curitosity, I thought it would be interesting to know the maximum number of threads I could squeeze out of a JVM on various platforms. From an old thread on Stack Overflow, I knew that different JVM implementations had different limits. So, I whipped up this little Java program and ran it on various platforms.
import java.util.concurrent.atomic.AtomicInteger;

public class ThreadCounter extends Thread {
	private static final AtomicInteger count = new AtomicInteger();
	
	public static void main(String[] args) {
		while (true)
			(new ThreadCounter()).start();
			
	}

	@Override
	public void run() {
		System.out.println(count.incrementAndGet());
		
		while (true)
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				break;
			}
	}
}
Compile and run at the command line:
  javac ThreadCounter.java
  java  -cp . ThreadCounter

The results:

Hardware OS JVM Count
2010 i5 MBP, 4GB OSX 10.6 Apple 1.6.0_22-b04-307 2540
Xeon 5120, 4GB Debian Lenny 64-bit Sun 1.6.0_12-b04 31618
EC2 m1.small, 1.7GB Ubuntu 10.04 32-bit OpenJDK IcedTea6 1.8.2 7452
Atom 330, 2GB Windows XP SP3 Sun 1.6.0_27-b07 5165
EC2 c1.medium, 1.7GB Ubuntu 10.04 32-bit OpenJDK IcedTea6 1.8 7029

Interesting...