For people with photo sphere FC its probably became of our ram and dalvik cm heapsize. The nexus 4 has a heapsize of 512m and 2GB ram, maybe it requires a lot of ram to use photosphere, I would wait for another source from another phone.
It definitely has nothing to do with heap size since native library is failing. And native libs know nothing about Java heap size and do not care about it - they eat as much RAM as they need when they need.