Friday, January 02, 2009

Solved: Ubuntu 8.04 64 bit, Eclipse 3.4, Subclipse 1.4.7 and Subversion 1.5

A previous post, a possible solution to the problem of installing Subversion support in Eclipse 3.4 on Ubuntu 8.04 64 bit.
Although this worked much better Eclipse is still crashing under some operations. I've detected a problem while developing an android application, checked out from a subversion repository, when R.java is recreated causing Eclipse to crash.

This time, and convinced to find a solution or being forced to use Windows Vista as a development platform, I paid more attention to the crash log.

#
# An unexpected error has been detected by Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fbacc7e525a, pid=29545, tid=1098688848
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0-b23 mixed mode linux-amd64)
# Problematic frame:
# V [libjvm.so+0x1f125a]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

--------------- T H R E A D ---------------

Current thread (0x00000000401a7400): JavaThread "CompilerThread1" daemon [_thread_in_native, id=29552, stack(0x00000000416ca000,0x00000000417cb000)]

siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000000000000000

Registers:
RAX=0x0000000000000000, RBX=0x00007fba8c561068, RCX=0x00007fba9a4ef5b0, RDX=0x0000000000000050
RSP=0x00000000417c6d70, RBP=0x00000000417c6de0, RSI=0x00007fba9a4ef5b0, RDI=0x00007fba8c561068
R8 =0x00007fba9a4ef608, R9 =0x00007fba9a4ef5b0, R10=0x00007fba9a4ef5b0, R11=0x0000000000000000
R12=0x00007fba8c561030, R13=0x0000000000000000, R14=0x0000000040162f50, R15=0x0000000000000001
RIP=0x00007fbacc7e525a, EFL=0x0000000000010246, CSGSFS=0x0000000000000033, ERR=0x0000000000000004
TRAPNO=0x000000000000000e

Top of Stack: (sp=0x00000000417c6d70)
0x00000000417c6d70: 00007fba9b0d1358 00000001ffffffff
0x00000000417c6d80: 00007fba9a4ef5b0 00000002cc789361
0x00000000417c6d90: 00007fba9b0d1350 00000007417c79a0
0x00000000417c6da0: 00000000417c7a68 01000000000005d2
0x00000000417c6db0: 00000000417c79a0 00007fbacce2e970
0x00000000417c6dc0: 00000000417c79a0 00000000417c6f30
0x00000000417c6dd0: 00000000417c6ef0 00000000417c6ec0
0x00000000417c6de0: 00000000417c7000 00007fbacc7e479c
0x00000000417c6df0: 00000000417c7a68 00000000417c6fb0
0x00000000417c6e00: 00007fba8c3e8010 00007fba8c000020
0x00000000417c6e10: 00000000417c6e80 00007fbacce47d70
0x00000000417c6e20: 00007fba8c104a50 0000000000000174
0x00000000417c6e30: 00000000417c7ac0 00007fbaccfe6c1c
0x00000000417c6e40: 00000000417ca950 00000000417c6e80
0x00000000417c6e50: 00007fbacce4a4e0 00007fba9a80ff90
0x00000000417c6e60: 0000000000000174 00007fbaccc1edf2
0x00000000417c6e70: 0000000040111030 00007fbaccc1eec1
0x00000000417c6e80: 00000000417ca950 00000000417c6ec0
0x00000000417c6e90: 00007fbacce4a4e0 0000000000007fe8
0x00000000417c6ea0: 00007fba8c39f620 00007fbaccc1edf2
0x00000000417c6eb0: 0000000040111030 00007fbaccc1eec1
0x00000000417c6ec0: 00007fbacce2e970 00007fba0000000e
0x00000000417c6ed0: 00000000417c9350 00000000417c79a0
0x00000000417c6ee0: 0000000000000a05 00000000401a79a0
0x00000000417c6ef0: 000000000000000d 00000000417c9350
0x00000000417c6f00: 00007fba8c5bad00 00007fbacc788d00
0x00000000417c6f10: 00007fba8c54f5a0 00000000000005d3
0x00000000417c6f20: 00000000417c6fb0 00007fba8c11dc70
0x00000000417c6f30: 000000000000000c 00000000417c9350
0x00000000417c6f40: 00007fba8c19c360 00007fba8c2d3790
0x00000000417c6f50: 00007fba8c0d9750 00007fba8c0da3b0
0x00000000417c6f60: 00007fba9bd08e60 00000000417c7ac0

Instructions: (pc=0x00007fbacc7e525a)
0x00007fbacc7e524a: 48 89 cf 41 ff 95 80 00 00 00 48 89 df 49 89 c5
0x00007fbacc7e525a: 8b 00 41 21 44 24 38 41 8b 45 04 21 43 04 41 8b

Stack: [0x00000000416ca000,0x00000000417cb000], sp=0x00000000417c6d70, free space=1011k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x1f125a]
V [libjvm.so+0x1f079c]
V [libjvm.so+0x2445f5]
V [libjvm.so+0x241105]
V [libjvm.so+0x1e05f7]
V [libjvm.so+0x248f98]
V [libjvm.so+0x248936]
V [libjvm.so+0x62a819]
V [libjvm.so+0x624ac1]
V [libjvm.so+0x50630a]


Current CompileTask:
C2:1124 org.eclipse.core.internal.dtree.DataTreeNode.forwardDeltaWith([Lorg/eclipse/core/internal/dtree/AbstractDataTreeNode;[Lorg/eclipse/core/internal/dtree/AbstractDataTreeNode;Lorg/eclipse/core/internal/dtree/IComparator;)[Lorg/eclipse/core/internal/dtree/AbstractDataTreeNode; (469 bytes)


--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x00007fbaa47d7800 JavaThread "org.eclipse.jdt.internal.ui.text.JavaReconciler" daemon [_thread_blocked, id=30170, stack(0x0000000041d08000,0x0000000041e09000)]
0x0000000040347000 JavaThread "Worker-11" [_thread_blocked, id=30132, stack(0x0000000040e0c000,0x0000000040f0d000)]
0x00007fba9c43c400 JavaThread "Worker-10" [_thread_blocked, id=30131, stack(0x000000004100e000,0x000000004110f000)]
0x00007fba9bec9800 JavaThread "Worker-9" [_thread_blocked, id=29647, stack(0x0000000041210000,0x0000000041311000)]
0x00007fbaa69c5c00 JavaThread "SVN Kit 1.2 Connector" [_thread_blocked, id=29611, stack(0x000000004245a000,0x000000004255b000)]
0x00007fba9becf800 JavaThread "Thread-14" [_thread_blocked, id=29609, stack(0x0000000042359000,0x000000004245a000)]
0x00007fbaa623a000 JavaThread "Timer-1" [_thread_blocked, id=29607, stack(0x000000004110f000,0x0000000041210000)]
0x00007fbaa43b9000 JavaThread "Worker-8" [_thread_blocked, id=29602, stack(0x0000000042258000,0x0000000042359000)]
0x00007fba9dda5400 JavaThread "Worker-7" [_thread_blocked, id=29601, stack(0x0000000040f0d000,0x000000004100e000)]
0x00007fba9dcd9400 JavaThread "Worker-6" [_thread_in_vm, id=29600, stack(0x0000000041bcf000,0x0000000041cd0000)]
0x00007fba9beec800 JavaThread "Worker-4" [_thread_blocked, id=29598, stack(0x0000000042056000,0x0000000042157000)]
0x00007fbaa498d800 JavaThread "Timer-0" [_thread_blocked, id=29592, stack(0x000000004074d000,0x000000004084e000)]
0x00007fba9af2a800 JavaThread "Device List Monitor" daemon [_thread_in_native, id=29591, stack(0x0000000042157000,0x0000000042258000)]
0x00007fba9da2b800 JavaThread "Monitor" daemon [_thread_in_native, id=29574, stack(0x0000000041f55000,0x0000000042056000)]
0x00007fba9c3e5800 JavaThread "org.eclipse.jdt.internal.ui.text.JavaReconciler" daemon [_thread_blocked, id=29571, stack(0x000000004064c000,0x000000004074d000)]
0x00007fbaa5500800 JavaThread "Java indexing" daemon [_thread_blocked, id=29569, stack(0x0000000041e54000,0x0000000041f55000)]
0x0000000040378c00 JavaThread "Start Level Event Dispatcher" daemon [_thread_blocked, id=29561, stack(0x000000004054b000,0x000000004064c000)]
0x000000004031d800 JavaThread "Framework Event Dispatcher" daemon [_thread_blocked, id=29560, stack(0x0000000041ace000,0x0000000041bcf000)]
0x0000000040437400 JavaThread "State Data Manager" daemon [_thread_blocked, id=29559, stack(0x00000000419cd000,0x0000000041ace000)]
0x00000000401a9000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=29553, stack(0x00000000417cb000,0x00000000418cc000)]
=>0x00000000401a7400 JavaThread "CompilerThread1" daemon [_thread_in_native, id=29552, stack(0x00000000416ca000,0x00000000417cb000)]
0x000000004019bc00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=29551, stack(0x00000000415c9000,0x00000000416ca000)]
0x000000004019a400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=29550, stack(0x00000000414c8000,0x00000000415c9000)]
0x0000000040176400 JavaThread "Finalizer" daemon [_thread_blocked, id=29549, stack(0x000000004097a000,0x0000000040a7b000)]
0x0000000040175000 JavaThread "Reference Handler" daemon [_thread_blocked, id=29548, stack(0x0000000040879000,0x000000004097a000)]
0x0000000040113000 JavaThread "main" [_thread_in_vm, id=29546, stack(0x00000000413c7000,0x00000000414c8000)]

Other Threads:
0x000000004016fc00 VMThread [stack: 0x0000000040b09000,0x0000000040c0a000] [id=29547]
0x00000000401ab000 WatcherThread [stack: 0x00000000418cc000,0x00000000419cd000] [id=29554]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
def new generation total 42496K, used 9220K [0x00007fbaa84d0000, 0x00007fbaab2e0000, 0x00007fbaada20000)
eden space 37824K, 14% used [0x00007fbaa84d0000, 0x00007fbaa8a53ac0, 0x00007fbaaa9c0000)
from space 4672K, 76% used [0x00007fbaaa9c0000, 0x00007fbaaad3d7b0, 0x00007fbaaae50000)
to space 4672K, 0% used [0x00007fbaaae50000, 0x00007fbaaae50000, 0x00007fbaab2e0000)
tenured generation total 94144K, used 48464K [0x00007fbaada20000, 0x00007fbab3610000, 0x00007fbab84d0000)
the space 94144K, 51% used [0x00007fbaada20000, 0x00007fbab0974090, 0x00007fbab0974200, 0x00007fbab3610000)
compacting perm gen total 86016K, used 85928K [0x00007fbab84d0000, 0x00007fbabd8d0000, 0x00007fbac84d0000)
the space 86016K, 99% used [0x00007fbab84d0000, 0x00007fbabd8ba3b8, 0x00007fbabd8ba400, 0x00007fbabd8d0000)
No shared spaces configured.

Dynamic libraries:
40000000-40009000 r-xp 00000000 08:05 424775 /usr/lib/jvm/java-6-sun-1.6.0.07/jre/bin/java
40108000-4010a000 rwxp 00008000 08:05 424775 /usr/lib/jvm/java-6-sun-1.6.0.07/jre/bin/java
4010a000-4054b000 rwxp 4010a000 00:00 0 [heap]
4054b000-4054e000 ---p 4054b000 00:00 0
4054e000-4064c000 rwxp 4054e000 00:00 0
4064c000-4064f000 ---p 4064c000 00:00 0

...

VM Arguments:
jvm_args: -Djava.library.path=/usr/share/java/ -Djava.library.path=/usr/lib/jni/ -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx256m -XX:MaxPermSize=256m
java_command: /opt/java/eclipse-3.4/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar -os linux -ws gtk -arch x86_64 -showsplash -launcher /opt/java/eclipse-3.4/eclipse -name Eclipse --launcher.library /opt/java/eclipse-3.4/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.101.R34x_v20080731/eclipse_1115.so -startup /opt/java/eclipse-3.4/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar -exitdata 1190018 -vm /usr/bin/java -vmargs -Djava.library.path=/usr/share/java/ -Djava.library.path=/usr/lib/jni/ -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx256m -XX:MaxPermSize=256m -jar /opt/java/eclipse-3.4/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=/home/diego/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
USERNAME=diego
LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.07/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.07/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.07/jre/../lib/amd64:/usr/lib64/xulrunner-addons
SHELL=/bin/bash
DISPLAY=:0.0

Signal Handlers:
SIGSEGV: [libjvm.so+0x661750], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x661750], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x504550], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGXFSZ: [libjvm.so+0x504550], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x504550], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x5067c0], sa_mask[0]=0x00000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x506520], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: [libjvm.so+0x506520], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGTERM: [libjvm.so+0x506520], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x506520], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004


--------------- S Y S T E M ---------------

OS:lenny/sid

uname:Linux 2.6.24-22-generic #1 SMP Mon Nov 24 19:35:06 UTC 2008 x86_64
libc:glibc 2.7 NPTL 2.7
rlimit: STACK 8192k, CORE 0k, NPROC 12221, NOFILE 1024, AS infinity
load average:0.49 0.31 0.27

CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 15 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3

Memory: 4k page, physical 1537752k(21980k free), swap 3148700k(3103580k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (10.0-b23) for linux-amd64 JRE (1.6.0_07-b06), built on Jun 10 2008 01:53:27 by "java_re" with gcc 3.2.2 (SuSE Linux)

time: Mon Dec 29 22:56:29 2008
elapsed time: 490 seconds



As we can see, the problem is not in subclipse or subversive but in the java virtual machine. It's true, that the problem only showed up when we use subversion, but this is another story.
So, to obtain the solution, download jdk-6u11-linux-x64.bin from Sun and install it.
Next step is to tell Eclipse to use this newly installed java.
Edit eclipe.ini and add these lines

-showsplash
org.eclipse.platform
-vm
/opt/java/jdk1.6/bin/java
-vmargs
-Djava.library.path=/usr/share/java/
-Djava.library.path=/usr/lib/jni/
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx256m
-XX:MaxPermSize=256m



Problem solved !
No crashes till now...

Android Intent Playground 2.0 (Installation)

These are the simplest steps to install Android Intent Playground using the emulator.


Download site
Go to http://codtech.com/downloads/android and download AndroidIntentPlayground.apk.
To be able to download it you need to attach an sdcard image to the emulator using -sdcard sdcard.img.

Install blocked
Click on the recently downloaded application to install it.
If you receive an Install blocked message you have to enable installation of applications form unknown sources, not only from Android Market.



Enable installation from unknown sources
Go to Settings and enable Unknown sources.

Install application
Once the settings are correct the application can be installed.



Launch the application
After being successfully installed launch the application and you will be presented with Android Intent Playground main screen.



Play with intents
Fell free to play with intents. Using Menu -> Random is a good way to get started.