QString causes Core Dump in App with JNI - qt

I am trying to run the complex application with JNI on 64-bit linux machine and it causes core dump.
Seems it crashes in C++ part of code. I localized the issue, but can't figure the reason out.
I have in my project.cc
...
namespace someNamespace
{
const QString PROJECT_ROOT_TAG = "Project";
Project::Project()
{
m_projectXml = QDomDocument(PROJECT_ROOT_TAG);
...
}
....
}
So, here PROJECT_ROOT_TAG is being corrupted. If I am passing "Project" to QDomDocument, application works fine, even if I am changing QString to char * it works fine, also if I am initializing PROJECT_ROOT_TAG in the constructor in the constructor, instead of global scope, it works... moreover, in the global scope there are other QString initializations also, and if I am doing one of mentioned workarounds with PROJECT_ROOT_TAG, others are just work fine.
I will thankful for any hint or information, which can help me to figure out memory corrucpyion reason.
I am adding hs_err_pid30056.log output also. Hope there is enough information to understand the problem:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00002aaade1060d7, pid=30056, tid=1083652416
#
# JRE version: 6.0_21-b06
# Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0-b16 mixed mode linux-amd64 )
# Problematic frame:
# C [libproject_jni.so+0x18f10d7] _ZN7QStringaSERKS_+0x17
#
# 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 (0x000000005e078800): JavaThread "main" [_thread_in_native, id=30057, stack(0x0000000040873000,0x0000000040974000)]
siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000000000000000
Registers:
RAX=0x0000000000000000, RBX=0x00002aaad809fb78, RCX=0x00002aaad809fc00, RDX=0x0000000000004301
RSP=0x00000000409711b0, RBP=0x00002aaadeb863e8, RSI=0x00002aaadeb863e8, RDI=0x00002aaad809fb78
R8 =0x0000000000000004, R9 =0x0000000000000003, R10=0x0000000000000000, R11=0x00002aaade1060c0
R12=0x00002aaadeb863e8, R13=0x000000005e1083f0, R14=0x00007fff158441a8, R15=0x0000000000000009
RIP=0x00002aaade1060d7, EFL=0x0000000000010202, CSGSFS=0x0000000000000033, ERR=0x0000000000000006
TRAPNO=0x000000000000000e
Top of Stack: (sp=0x00000000409711b0)
0x00000000409711b0: 0000000000000003 00002aaad809fa90
0x00000000409711c0: 00002aaad809fb40 00002aaade0b44f2
0x00000000409711d0: 00002aaad809fa90 0000000000000004
0x00000000409711e0: 0000000040971240 00002aaad809fa90
0x00000000409711f0: 00002aaadeb863e8 00002aaade0b45d6
0x0000000040971200: 0000000000000001 0000000040971270
0x0000000040971210: 0000000000000102 00002aaadd43781e
0x0000000040971220: 0000000040971290 00002aaadeb81800
0x0000000040971230: 00002aaae01b2578 000000000000001c
0x0000000040971240: 0000000000000000 00002aaad809f0d0
0x0000000040971250: 00002aaadeb81800 00002aaad809f480
0x0000000040971260: 0000000000000001 0000000000000102
0x0000000040971270: 0000000040971290 00002aaadd39f250
0x0000000040971280: 0000000000000000 000000010000ffff
0x0000000040971290: 00000000409712a0 00002aaadd39f285
0x00000000409712a0: 00002aaade9ba000 00002acd868ec443
0x00000000409712b0: 00002aaadd2c1a50 00000000ffffffff
0x00000000409712c0: 00002aaad80435c0 000000005e1083f0
0x00000000409712d0: 00007fff158441a8 0000000000000009
0x00000000409712e0: 0000000000000000 00002acd868ec505
0x00000000409712f0: 0000000000144120 0000000000000001
0x0000000040971300: 0000000000000000 00002aaadc8b4dd8
0x0000000040971310: 00002acd86d18978 0000000000000010
0x0000000040971320: 00002aaad8038720 00002aaad80435c0
0x0000000040971330: 0000000000000017 00002aaad8043878
0x0000000040971340: 00000000409714f0 00002acd868efffe
0x0000000040971350: ffffffff80000001 01002aaa80000001
0x0000000040971360: 00000000409718d0 0000000040971630
0x0000000040971370: 00002aaac8e76418 0000000000000000
0x0000000040971380: 0000000040971580 0000000080000001
0x0000000040971390: 00002aaad8043500 00002acd8797493f
0x00000000409713a0: 0000000000000009 00002acd868ec086
Instructions: (pc=0x00002aaade1060d7)
0x00002aaade1060c7: 6c 24 f8 48 89 fb 48 83 ec 18 48 89 f5 48 8b 06
0x00002aaade1060d7: f0 ff 00 0f 95 c2 48 8b 07 f0 ff 08 0f 95 c2 84
Stack: [0x0000000040873000,0x0000000040974000], sp=0x00000000409711b0, free space=3f80000000000000018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libproject_jni.so+0x18f10d7] _ZN7QStringaSERKS_+0x17
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j java.lang.ClassLoader$NativeLibrary.load(Ljava/lang/String;)V+0
j java.lang.ClassLoader.loadLibrary0(Ljava/lang/Class;Ljava/io/File;)Z+300
j java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)V+347
j java.lang.Runtime.loadLibrary0(Ljava/lang/Class;Ljava/lang/String;)V+54
j java.lang.System.loadLibrary(Ljava/lang/String;)V+7
j someapp.system.Project.<clinit>()V+2
v ~StubRoutines::call_stub
j someapp.system.ProjectProxy.<init>()V+126
j someapp.system.ProjectProxy.getInstance(Ljava/lang/String;)Lsomeapp/system/ProjectProxy;+33
j someapp.main.Q.main([Ljava/lang/String;)V+121
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x00002aaad8001800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=30066, stack(0x0000000041680000,0x0000000041781000)]
0x000000005e129800 JavaThread "CompilerThread1" daemon [_thread_blocked, id=30065, stack(0x0000000042260000,0x0000000042361000)]
0x000000005e126000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=30064, stack(0x000000004215f000,0x0000000042260000)]
0x000000005e124000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=30063, stack(0x000000004205e000,0x000000004215f000)]
0x000000005e0ff800 JavaThread "Finalizer" daemon [_thread_blocked, id=30062, stack(0x0000000041f5d000,0x000000004205e000)]
0x000000005e0fd800 JavaThread "Reference Handler" daemon [_thread_blocked, id=30061, stack(0x0000000041e5c000,0x0000000041f5d000)]
=>0x000000005e078800 JavaThread "main" [_thread_in_native, id=30057, stack(0x0000000040873000,0x0000000040974000)]
Other Threads:
0x000000005e0f9000 VMThread [stack: 0x0000000041d5b000,0x0000000041e5c000] [id=30060]
0x00002aaad800c000 WatcherThread [stack: 0x000000004199d000,0x0000000041a9e000] [id=30067]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
PSYoungGen total 74880K, used 2567K [0x00002aaac8e40000, 0x00002aaace1d0000, 0x00002aaad38e0000)
eden space 64192K, 4% used [0x00002aaac8e40000,0x00002aaac90c1f80,0x00002aaacccf0000)
from space 10688K, 0% used [0x00002aaacd760000,0x00002aaacd760000,0x00002aaace1d0000)
to space 10688K, 0% used [0x00002aaacccf0000,0x00002aaacccf0000,0x00002aaacd760000)
PSOldGen total 171264K, used 0K [0x00002aaab38e0000, 0x00002aaabe020000, 0x00002aaac8e40000)
object space 171264K, 0% used [0x00002aaab38e0000,0x00002aaab38e0000,0x00002aaabe020000)
PSPermGen total 21248K, used 5014K [0x00002aaaae4e0000, 0x00002aaaaf9a0000, 0x00002aaab38e0000)
object space 21248K, 23% used [0x00002aaaae4e0000,0x00002aaaae9c5808,0x00002aaaaf9a0000)
Dynamic libraries:
40000000-40009000 r-xp 00000000 00:20 760137 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/bin/java
40108000-4010a000 rwxp 00008000 00:20 760137 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/bin/java
40873000-40876000 ---p 40873000 00:00 0
40876000-40974000 rwxp 40876000 00:00 0
41680000-41683000 ---p 41680000 00:00 0
41683000-41781000 rwxp 41683000 00:00 0
4179b000-4179c000 ---p 4179b000 00:00 0
4179c000-4189c000 rwxp 4179c000 00:00 0
4189c000-4189d000 ---p 4189c000 00:00 0
4189d000-4199d000 rwxp 4189d000 00:00 0
4199d000-4199e000 ---p 4199d000 00:00 0
4199e000-41a9e000 rwxp 4199e000 00:00 0
41d5b000-41d5c000 ---p 41d5b000 00:00 0
41d5c000-41e5c000 rwxp 41d5c000 00:00 0
41e5c000-41e5f000 ---p 41e5c000 00:00 0
41e5f000-41f5d000 rwxp 41e5f000 00:00 0
41f5d000-41f60000 ---p 41f5d000 00:00 0
41f60000-4205e000 rwxp 41f60000 00:00 0
4205e000-42061000 ---p 4205e000 00:00 0
42061000-4215f000 rwxp 42061000 00:00 0
4215f000-42162000 ---p 4215f000 00:00 0
42162000-42260000 rwxp 42162000 00:00 0
42260000-42263000 ---p 42260000 00:00 0
42263000-42361000 rwxp 42263000 00:00 0
5e071000-5e35b000 rwxp 5e071000 00:00 0 [heap]
2aaaaaaab000-2aaaaaabf000 r-xs 000d5000 00:22 240625 /loc/lib/classes/someapp.jar
2aaaaaabf000-2aaaaaad3000 r-xs 000d5000 00:22 240625 /loc/lib/classes/someapp.jar
2aaaaab03000-2aaaaab0a000 r-xp 00000000 08:02 4602279 /lib64/librt-2.5.so
2aaaaab0a000-2aaaaad0a000 ---p 00007000 08:02 4602279 /lib64/librt-2.5.so
2aaaaad0a000-2aaaaad0b000 r-xp 00007000 08:02 4602279 /lib64/librt-2.5.so
2aaaaad0b000-2aaaaad0c000 rwxp 00008000 08:02 4602279 /lib64/librt-2.5.so
2aaaaad0c000-2aaaaad19000 r-xp 00000000 00:20 1459403 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/libverify.so
2aaaaad19000-2aaaaae18000 ---p 0000d000 00:20 1459403 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/libverify.so
2aaaaae18000-2aaaaae1b000 rwxp 0000c000 00:20 1459403 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/libverify.so
2aaaaae1b000-2aaaaae43000 r-xp 00000000 00:20 1296232 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/libjava.so
2aaaaae43000-2aaaaaf43000 ---p 00028000 00:20 1296232 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/libjava.so
2aaaaaf43000-2aaaaaf4a000 rwxp 00028000 00:20 1296232 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/libjava.so
2aaaaaf4a000-2aaaaaf4b000 r-xp 2aaaaaf4a000 00:00 0
2aaaaaf4b000-2aaaaaf4c000 rwxp 2aaaaaf4b000 00:00 0
2aaaaafa1000-2aaaaafb6000 r-xp 00000000 08:02 4602261 /lib64/libnsl-2.5.so
2aaaaafb6000-2aaaab1b5000 ---p 00015000 08:02 4602261 /lib64/libnsl-2.5.so
2aaaab1b5000-2aaaab1b6000 r-xp 00014000 08:02 4602261 /lib64/libnsl-2.5.so
2aaaab1b6000-2aaaab1b7000 rwxp 00015000 08:02 4602261 /lib64/libnsl-2.5.so
2aaaab1b7000-2aaaab1b9000 rwxp 2aaaab1b7000 00:00 0
2aaaab1b9000-2aaaab1c0000 r-xp 00000000 00:20 625905 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/native_threads/libhpi.so
2aaaab1c0000-2aaaab2c1000 ---p 00007000 00:20 625905 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/native_threads/libhpi.so
2aaaab2c1000-2aaaab2c3000 rwxp 00008000 00:20 625905 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/native_threads/libhpi.so
2aaaab2c3000-2aaaab2c4000 rwxp 2aaaab2c3000 00:00 0
2aaaab2c4000-2aaaab2f9000 r-xs 00000000 08:02 4245520 /var/db/nscd/passwd
2aaaab2f9000-2aaaab301000 rwxs 00000000 08:02 5359777
/tmp/30056
2aaaab301000-2aaaab30f000 r-xp 00000000 00:20 1459404 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/libzip.so
2aaaab30f000-2aaaab411000 ---p 0000e000 00:20 1459404 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/libzip.so
2aaaab411000-2aaaab414000 rwxp 00010000 00:20 1459404 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/libzip.so
2aaaab414000-2aaaab685000 rwxp 2aaaab414000 00:00 0
2aaaab685000-2aaaae415000 rwxp 2aaaab685000 00:00 0
2aaaae415000-2aaaae41f000 rwxp 2aaaae415000 00:00 0
2aaaae41f000-2aaaae4d5000 rwxp 2aaaae41f000 00:00 0
2aaaae4e0000-2aaaaf9a0000 rwxp 2aaaae4e0000 00:00 0
2aaaaf9a0000-2aaab38e0000 rwxp 2aaaaf9a0000 00:00 0
2aaab38e0000-2aaabe020000 rwxp 2aaab38e0000 00:00 0
2aaabe020000-2aaac8e40000 rwxp 2aaabe020000 00:00 0
2aaac8e40000-2aaace1d0000 rwxp 2aaac8e40000 00:00 0
2aaace1d0000-2aaad38e0000 rwxp 2aaace1d0000 00:00 0
2aaad38e0000-2aaad38eb000 rwxp 2aaad38e0000 00:00 0
2aaad38eb000-2aaad390a000 rwxp 2aaad38eb000 00:00 0
2aaad390a000-2aaad395e000 rwxp 2aaad390a000 00:00 0
2aaad395e000-2aaad39b4000 rwxp 2aaad395e000 00:00 0
2aaad39b4000-2aaad39df000 rwxp 2aaad39b4000 00:00 0
2aaad39df000-2aaad3a0a000 rwxp 2aaad39df000 00:00 0
2aaad3a0a000-2aaad3a5f000 rwxp 2aaad3a0a000 00:00 0
2aaad3a5f000-2aaad3ab6000 rwxp 2aaad3a5f000 00:00 0
2aaad3ab6000-2aaad3ac1000 rwxp 2aaad3ab6000 00:00 0
2aaad3ac1000-2aaad3ae0000 rwxp 2aaad3ac1000 00:00 0
2aaad3ae0000-2aaad3c77000 r-xs 03014000 00:20 1882902 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/rt.jar
2aaad3c77000-2aaad3fae000 rwxp 2aaad3c77000 00:00 0
2aaad3fae000-2aaad7584000 r-xp 00000000 08:02 4409698 /usr/lib/locale/locale-archive
2aaad7584000-2aaad7616000 r-xp 00000000 00:20 848793 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/libawt.so
2aaad7616000-2aaad7715000 ---p 00092000 00:20 848793 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/libawt.so
2aaad7715000-2aaad772e000 rwxp 00091000 00:20 848793 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/libawt.so
2aaad772e000-2aaad7753000 rwxp 2aaad772e000 00:00 0
2aaad7753000-2aaad7795000 r-xp 00000000 00:20 777105 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/xawt/libmawt.so
2aaad7795000-2aaad7894000 ---p 00042000 00:20 777105 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/xawt/libmawt.so
2aaad7894000-2aaad789f000 rwxp 00041000 00:20 777105 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/xawt/libmawt.so
2aaad789f000-2aaad78a1000 rwxp 2aaad789f000 00:00 0
2aaad78f8000-2aaad7908000 r-xp 00000000 08:02 4412612 /usr/lib64/libXext.so.6.4.0
2aaad7908000-2aaad7b08000 ---p 00010000 08:02 4412612 /usr/lib64/libXext.so.6.4.0
2aaad7b08000-2aaad7b09000 rwxp 00010000 08:02 4412612 /usr/lib64/libXext.so.6.4.0
2aaad7b09000-2aaad7c0e000 r-xp 00000000 08:02 4412610 /usr/lib64/libX11.so.6.2.0
2aaad7c0e000-2aaad7e0e000 ---p 00105000 08:02 4412610 /usr/lib64/libX11.so.6.2.0
2aaad7e0e000-2aaad7e15000 rwxp 00105000 08:02 4412610 /usr/lib64/libX11.so.6.2.0
2aaad8000000-2aaad80a4000 rwxp 2aaad8000000 00:00 0
2aaad80a4000-2aaadc000000 ---p 2aaad80a4000 00:00 0
2aaadc000000-2aaadc005000 r-xp 00000000 08:02 4412660 /usr/lib64/libXtst.so.6.1.0
2aaadc005000-2aaadc205000 ---p 00005000 08:02 4412660 /usr/lib64/libXtst.so.6.1.0
2aaadc205000-2aaadc206000 rwxp 00005000 08:02 4412660 /usr/lib64/libXtst.so.6.1.0
2aaadc206000-2aaadc20e000 r-xp 00000000 08:02 4412643 /usr/lib64/libXi.so.6.0.0
2aaadc20e000-2aaadc40d000 ---p 00008000 08:02 4412643 /usr/lib64/libXi.so.6.0.0
2aaadc40d000-2aaadc40e000 rwxp 00007000 08:02 4412643 /usr/lib64/libXi.so.6.0.0
2aaadc40e000-2aaadc410000 r-xp 00000000 08:02 4410327 /usr/lib64/libXau.so.6.0.0
2aaadc410000-2aaadc60f000 ---p 00002000 08:02 4410327 /usr/lib64/libXau.so.6.0.0
2aaadc60f000-2aaadc610000 rwxp 00001000 08:02 4410327 /usr/lib64/libXau.so.6.0.0
2aaadc610000-2aaadc615000 r-xp 00000000 08:02 4410438 /usr/lib64/libXdmcp.so.6.0.0
2aaadc615000-2aaadc814000 ---p 00005000 08:02 4410438 /usr/lib64/libXdmcp.so.6.0.0
2aaadc814000-2aaadc815000 rwxp 00004000 08:02 4410438 /usr/lib64/libXdmcp.so.6.0.0
2aaadc815000-2aaade7ba000 r-xp 00000000 00:22 3413919 /loc/amd64/lib/libproject_jni.so
2aaade7ba000-2aaade9ba000 ---p 01fa5000 00:22 3413919 /loc/amd64/lib/libproject_jni.so
2aaade9ba000-2aaadeb82000 rwxp 01fa5000 00:22 3413919 /loc/amd64/lib/libproject_jni.so
2aaadeb82000-2aaadef70000 rwxp 2aaadeb82000 00:00 0
2aaadef70000-2aaadefc7000 r-xp 00000000 08:02 494236 /etc/ld.so.cache
2aaadefc7000-2aaadefea000 r-xp 00000000 08:02 4409992 /usr/lib64/libpng12.so.0.10.0
2aaadefea000-2aaadf1ea000 ---p 00023000 08:02 4409992 /usr/lib64/libpng12.so.0.10.0
2aaadf1ea000-2aaadf1eb000 rwxp 00023000 08:02 4409992 /usr/lib64/libpng12.so.0.10.0
2aaadf1eb000-2aaadf26a000 r-xp 00000000 08:02 4410113 /usr/lib64/libfreetype.so.6.3.10
2aaadf26a000-2aaadf46a000 ---p 0007f000 08:02 4410113 /usr/lib64/libfreetype.so.6.3.10
2aaadf46a000-2aaadf46f000 rwxp 0007f000 08:02 4410113 /usr/lib64/libfreetype.so.6.3.10
2aaadf46f000-2aaadf478000 r-xp 00000000 08:02 4412614 /usr/lib64/libXrender.so.1.3.0
2aaadf478000-2aaadf677000 ---p 00009000 08:02 4412614 /usr/lib64/libXrender.so.1.3.0
2aaadf677000-2aaadf678000 rwxp 00008000 08:02 4412614 /usr/lib64/libXrender.so.1.3.0
2aaadf678000-2aaadf67b000 r-xp 00000000 08:02 4412637 /usr/lib64/libXrandr.so.2.0.0
2aaadf67b000-2aaadf87a000 ---p 00003000 08:02 4412637 /usr/lib64/libXrandr.so.2.0.0
2aaadf87a000-2aaadf87b000 rwxp 00002000 08:02 4412637 /usr/lib64/libXrandr.so.2.0.0
2aaadf87b000-2aaadf885000 r-xp 00000000 08:02 4412749 /usr/lib64/libXcursor.so.1.0.2
2aaadf885000-2aaadfa84000 ---p 0000a000 08:02 4412749 /usr/lib64/libXcursor.so.1.0.2
2aaadfa84000-2aaadfa85000 rwxp 00009000 08:02 4412749 /usr/lib64/libXcursor.so.1.0.2
2aaadfa85000-2aaadfa87000 r-xp 00000000 08:02 4412641 /usr/lib64/libXinerama.so.1.0.0
2aaadfa87000-2aaadfc86000 ---p 00002000 08:02 4412641 /usr/lib64/libXinerama.so.1.0.0
2aaadfc86000-2aaadfc87000 rwxp 00001000 08:02 4412641 /usr/lib64/libXinerama.so.1.0.0
2aaadfc87000-2aaadfcaa000 r-xp 00000000 00:20 3789387 /remote/buildprocess/lnxbuildpkgs/rev9/tcl-package/lib/tclx8.4/shlib/libtclx-O.so
2aaadfcaa000-2aaadfea9000 ---p 00023000 00:20 3789387 /remote/buildprocess/lnxbuildpkgs/rev9/tcl-package/lib/tclx8.4/shlib/libtclx-O.so
2aaadfea9000-2aaadfeab000 rwxp 00022000 00:20 3789387 /remote/buildprocess/lnxbuildpkgs/rev9/tcl-package/lib/tclx8.4/shlib/libtclx-O.so
2aaadfeab000-2aaadff95000 r-xp 00000000 00:21 31135113 /depotbld/RHEL5.5/gcc-4.7.2/lib64/libstdc++.so.6.0.17
2aaadff95000-2aaae0194000 ---p 000ea000 00:21 31135113 /depotbld/RHEL5.5/gcc-4.7.2/lib64/libstdc++.so.6.0.17
2aaae0194000-2aaae019c000 r-xp 000e9000 00:21 31135113 /depotbld/RHEL5.5/gcc-4.7.2/lib64/libstdc++.so.6.0.17
2aaae019c000-2aaae019e000 rwxp 000f1000 00:21 31135113 /depotbld/RHEL5.5/gcc-4.7.2/lib64/libstdc++.so.6.0.17
2aaae019e000-2aaae01b3000 rwxp 2aaae019e000 00:00 0
2aaae01b3000-2aaae01c0000 r-xp 00000000 08:02 4602242 /lib64/libgcc_s-4.1.2-20080825.so.1
2aaae01c0000-2aaae03c0000 ---p 0000d000 08:02 4602242 /lib64/libgcc_s-4.1.2-20080825.so.1
2aaae03c0000-2aaae03c1000 rwxp 0000d000 08:02 4602242 /lib64/libgcc_s-4.1.2-20080825.so.1
2aaae03c1000-2aaae03d5000 r-xp 00000000 08:02 4602289 /lib64/libz.so.1.2.3
2aaae03d5000-2aaae05d4000 ---p 00014000 08:02 4602289 /lib64/libz.so.1.2.3
2aaae05d4000-2aaae05d5000 rwxp 00013000 08:02 4602289 /lib64/libz.so.1.2.3
2aaae05d5000-2aaae05da000 r-xp 00000000 08:02 4412747 /usr/lib64/libXfixes.so.3.1.0
2aaae05da000-2aaae07d9000 ---p 00005000 08:02 4412747 /usr/lib64/libXfixes.so.3.1.0
2aaae07d9000-2aaae07da000 rwxp 00004000 08:02 4412747 /usr/lib64/libXfixes.so.3.1.0
2acd868df000-2acd868fb000 r-xp 00000000 08:02 4602244 /lib64/ld-2.5.so
2acd868fb000-2acd868fd000 rwxp 2acd868fb000 00:00 0
2acd86afb000-2acd86afc000 r-xp 0001c000 08:02 4602244 /lib64/ld-2.5.so
2acd86afc000-2acd86afd000 rwxp 0001d000 08:02 4602244 /lib64/ld-2.5.so
2acd86afd000-2acd86b13000 r-xp 00000000 08:02 4602275 /lib64/libpthread-2.5.so
2acd86b13000-2acd86d12000 ---p 00016000 08:02 4602275 /lib64/libpthread-2.5.so
2acd86d12000-2acd86d13000 r-xp 00015000 08:02 4602275 /lib64/libpthread-2.5.so
2acd86d13000-2acd86d14000 rwxp 00016000 08:02 4602275 /lib64/libpthread-2.5.so
2acd86d14000-2acd86d19000 rwxp 2acd86d14000 00:00 0
2acd86d19000-2acd86d20000 r-xp 00000000 00:20 800667 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/jli/libjli.so
2acd86d20000-2acd86e21000 ---p 00007000 00:20 800667 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/jli/libjli.so
2acd86e21000-2acd86e23000 rwxp 00008000 00:20 800667 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/jli/libjli.so
2acd86e23000-2acd86e25000 r-xp 00000000 08:02 4602257 /lib64/libdl-2.5.so
2acd86e25000-2acd87025000 ---p 00002000 08:02 4602257 /lib64/libdl-2.5.so
2acd87025000-2acd87026000 r-xp 00002000 08:02 4602257 /lib64/libdl-2.5.so
2acd87026000-2acd87027000 rwxp 00003000 08:02 4602257 /lib64/libdl-2.5.so
2acd87027000-2acd87175000 r-xp 00000000 08:02 4602251 /lib64/libc-2.5.so
2acd87175000-2acd87375000 ---p 0014e000 08:02 4602251 /lib64/libc-2.5.so
2acd87375000-2acd87379000 r-xp 0014e000 08:02 4602251 /lib64/libc-2.5.so
2acd87379000-2acd8737a000 rwxp 00152000 08:02 4602251 /lib64/libc-2.5.so
2acd8737a000-2acd87381000 rwxp 2acd8737a000 00:00 0
2acd87381000-2acd87b5b000 r-xp 00000000 00:20 1898779 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/server/libjvm.so
2acd87b5b000-2acd87c5d000 ---p 007da000 00:20 1898779 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/server/libjvm.so
2acd87c5d000-2acd87dee000 rwxp 007dc000 00:20 1898779 /remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/server/libjvm.so
2acd87dee000-2acd87e29000 rwxp 2acd87dee000 00:00 0
2acd87e80000-2acd87f02000 r-xp 00000000 08:02 4602259 /lib64/libm-2.5.so
2acd87f02000-2acd88101000 ---p 00082000 08:02 4602259 /lib64/libm-2.5.so
2acd88101000-2acd88102000 r-xp 00081000 08:02 4602259 /lib64/libm-2.5.so
2acd88102000-2acd88103000 rwxp 00082000 08:02 4602259 /lib64/libm-2.5.so
7fff15831000-7fff15849000 rwxp 7ffffffe6000 00:00 0 [stack]
7fff159c3000-7fff159c6000 r-xp 7fff159c3000 00:00 0 [vdso]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 [vsyscall]
VM Arguments:
jvm_args: -Xmx512m -Djava.library.path=/loc/src/app/someapp/../../../amd64/lib -Djava.util.prefs.systemRoot=/remote/other/.java -Dsun.java2d.pmoffscreen=true
java_command: /loc/src/app/someapp/../../../lib/classes/someapp.jar -h /loc/src/app/someapp/../../..
Launcher Type: SUN_STANDARD
Environment Variables:
LD_LIBRARY_PATH=/remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64/server:/remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/lib/amd64:/remote/buildprocess/lnxbuildpkgs/rev9/jdk1.6.0_21/jre/../lib/amd64:/depot/gcc-4.7.2/lib:/usr/openwin/lib
SHELL=/bin/tcsh
DISPLAY=rhel:77
HOSTTYPE=x86_64-linux
OSTYPE=linux
MACHTYPE=x86_64
Signal Handlers:
SIGSEGV: [libjvm.so+0x7311c0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x7311c0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x5f5da0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: [libjvm.so+0x5f5da0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGXFSZ: [libjvm.so+0x5f5da0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGILL: [libjvm.so+0x5f5da0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x5f85c0], sa_mask[0]=0x00000000, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x5f8310], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: [libjvm.so+0x5f8310], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGTERM: [libjvm.so+0x5f8310], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x5f8310], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
--------------- S Y S T E M ---------------
OS:Red Hat Enterprise Linux Client release 5.7 (Tikanga)
uname:Linux 2.6.18-274.el5 #1 SMP Fri Jul 8 17:36:59 EDT 2011 x86_64
libc:glibc 2.5 NPTL 2.5
rlimit: STACK 10240k, CORE infinity, NPROC 139264, NOFILE 1024, AS infinity
load average:0.01 0.54 1.33
CPU:total 2 (1 cores per cpu, 1 threads per core) family 15 model 37 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, mmxext, 3dnow, 3dnowext
Memory: 4k page, physical 16435616k(454712k free), swap 11406140k(11406060k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (17.0-b16) for linux-amd64 JRE (1.6.0_21-b06), built on Jun 22 2010 01:10:00 by "java_re" with gcc 3.2.2 (SuSE Linux)
time: Mon Jun 17 16:41:49 2013
elapsed time: 0 seconds

Related

How to make this graph (heat map like) which represents bat activity during the year depending on the time of night

I'd like to make this graph on R:
Bat activity during the year regarding the time of the night. Each yellow dot is an individual. Blue curves are the sunset and sunrise during the year
This is the plot:
My excel file looks like this.
Date Sunrise Sunset Hours_after_sunset
16/08/2020 06:34 20:56 01:05
17/07/2020 05:53 21:42 01:26
11/08/2020 06:27 21:05 02:17
30/09/2020 07:42 19:20 06:45
24/04/2020 06:31 20:49 05:01
01/07/2020 05:38 21:53 04:13
18/07/2020 05:54 21:41 01:42
04/08/2020 06:17 21:18 01:47
13/08/2020 06:30 21:02 05:14
30/06/2020 05:37 21:53 01:37
15/08/2020 06:33 20:58 01:22
04/09/2020 07:03 20:17 07:25
07/09/2020 07:07 20:11 03:30
28/06/2020 05:36 21:54 02:10
01/07/2020 05:38 21:53 04:13
19/08/2020 06:39 20:50 01:32
09/04/2020 07:01 20:26 07:11
16/05/2020 05:55 21:22 01:14
17/06/2020 05:33 21:52 05:36
22/07/2020 05:59 21:36 03:00
11/08/2020 06:27 21:05 08:42
10/08/2020 06:25 21:07 02:36
08/08/2020 06:23 21:11 07:19
05/08/2020 06:18 21:16 03:33
24/08/2020 06:46 20:40 02:12
16/08/2020 06:34 20:56 04:01
24/08/2020 06:46 20:40 04:18
19/08/2020 06:39 20:50 02:27
22/08/2020 06:43 20:44 05:00
22/08/2020 06:43 20:44 01:56
17/09/2020 07:22 19:49 06:01
Hoping you can help me.
Something like this? Plot of the data you posted, sorted by date

Fatal signal 11 (SIGSEGV), code 1, fault addr 0x20 in tid 2327

I have a problem in debugging code in android using xamarin forms application crash in master detail and give me this error
I tried to clean , build and delete bin and obj no solution works
I use xamarin.forms 4.0
vs 2019 16.1.1
=================================================================
Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
=================================================================
Basic Fault Adddress Reporting
=================================================================
Memory around native instruction pointer (0x7d689fd678):0x7d689fd668 00 1c 40 b9 c0 03 5f d6 fd 7b bf a9 fd 03 00 91 ..#..._..{......
0x7d689fd678 08 20 40 b9 a8 00 c8 37 88 01 e0 37 00 00 40 f9 . #....7...7..#.
0x7d689fd688 fd 7b c1 a8 c0 03 5f d6 60 08 00 b0 01 0a 00 f0 .{...._.`.......
0x7d689fd698 03 0a 00 f0 00 24 06 91 21 80 08 91 63 8c 0a 91 .....$..!...c...
No native Android stacktrace (see debuggerd output).
===============================================06-01 15:23:19.407 E/mono-rt ( 2327): /proc/self/maps:
==================
Managed Stacktrace:
=================================================================
=================================================================06-01 15:23:19.407 E/mono-rt ( 2327): 12c00000-52c00000 rw-p 00000000 00:01 18226 /dev/ashmem/dalvik-main space (region space) (deleted)
06-01 15:23:19.407 E/mono-rt ( 2327): 6fdee000-70096000 rw-p 00000000 103:09 28170 /data/dalvik-cache/arm64/system#framework#boot.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70096000-7019c000 rw-p 00000000 103:09 28174 /data/dalvik-cache/arm64/system#framework#boot-core-libart.art
06-01 15:23:19.407 E/mono-rt ( 2327): 7019c000-701e6000 rw-p 00000000 103:09 28176 /data/dalvik-cache/arm64/system#framework#boot-conscrypt.art
06-01 15:23:19.407 E/mono-rt ( 2327): 701e6000-7021c000 rw-p 00000000 103:09 28177 /data/dalvik-cache/arm64/system#framework#boot-okhttp.art
06-01 15:23:19.407 E/mono-rt ( 2327): 7021c000-70220000 rw-p 00000000 103:09 28180 /data/dalvik-cache/arm64/system#framework#boot-legacy-test.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70220000-70263000 rw-p 00000000 103:09 28182 /data/dalvik-cache/arm64/system#framework#boot-bouncycastle.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70263000-7029e000 rw-p 00000000 103:09 28201 /data/dalvik-cache/arm64/system#framework#boot-ext.art
06-01 15:23:19.407 E/mono-rt ( 2327): 7029e000-70a8b000 rw-p 00000000 103:09 28204 /data/dalvik-cache/arm64/system#framework#boot-framework.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70a8b000-70b17000 rw-p 00000000 103:09 28316 /data/dalvik-cache/arm64/system#framework#boot-telephony-common.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70b17000-70b20000 rw-p 00000000 103:09 28329 /data/dalvik-cache/arm64/system#framework#boot-voip-common.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70b20000-70b29000 rw-p 00000000 103:09 28350 /data/dalvik-cache/arm64/system#framework#boot-ims-common.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70b29000-70b4d000 rw-p 00000000 103:09 28406 /data/dalvik-cache/arm64/system#framework#boot-apache-xml.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70b4d000-70b75000 rw-p 00000000 103:09 28409 /data/dalvik-cache/arm64/system#framework#boot-org.apache.http.legacy.boot.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70b75000-70b76000 rw-p 00000000 103:09 28414 /data/dalvik-cache/arm64/system#framework#boot-android.hidl.base-V1.0-java.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70b76000-70b79000 rw-p 00000000 103:09 28424 /data/dalvik-cache/arm64/system#framework#boot-android.hidl.manager-V1.0-java.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70b79000-70c04000 rw-p 00000000 103:09 28425 /data/dalvik-cache/arm64/system#framework#boot-hwEmui.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70c04000-70c2b000 rw-p 00000000 103:09 28432 /data/dalvik-cache/arm64/system#framework#boot-hwTelephony-common.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70c2b000-70c64000 rw-p 00000000 103:09 28494 /data/dalvik-cache/arm64/system#framework#boot-hwframework.art
06-01 15:23:19.407 E/mono-rt ( 2327): 70c64000-70c66000 rw-p 00000000 103:09 28500 /data/dalvik-cache/arm64/system#framework#boot-org.simalliance.openmobileapi.art
06-01 15:23:19.408 E/mono-rt ( 2327): 70c66000-70c67000 rw-p 00000000 103:09 28502 /data/dalvik-cache/arm64/system#framework#boot-org.ifaa.android.manager.art
06-01 15:23:19.408 E/mono-rt ( 2327): 70c67000-70c6d000 rw-p 00000000 103:09 28506 /data/dalvik-cache/arm64/system#framework#boot-hwaps.art
06-01 15:23:19.408 E/mono-rt ( 2327): 70c6d000-70c73000 rw-p 00000000 103:09 28511 /data/dalvik-cache/arm64/system#framework#boot-hwcustEmui.art
06-01 15:23:19.408 E/mono-rt ( 2327): 70c73000-70c78000 rw-p 00000000 103:09 28513 /data/dalvik-cache/arm64/system#framework#boot-hwcustframework.art
06-01 15:23:19.408 E/mono-rt ( 2327): 70c78000-70c7f000 rw-p 00000000 103:09 28524 /data/dalvik-cache/arm64/system#framework#boot-hwcustTelephony-common.art
06-01 15:23:19.409 F/libc ( 2327): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x20 in tid 2327 (nyname.Ministry)
Any solution for this error ?
kamal The crash information you provided is not enough for a diagnosis. As you can see, it reads, "No native Android stacktrace (see debuggerd output)."
Could you please share some code, of what you were trying to do?
It could be an issue with improper asynchronous programming. To figure out where exactly the app is crashing, you could:
Create a System Catchpoint exception,
Launch a profiler to track the error,
(and should) Use try-catch statements, to basically figure out exactly what line the code is crashing on, & what's the internal stack trace.

Use factors to plot dates out of sequence

I am trying to plot months and days that cross over different years, but not display the year. I can use factors to force the dates to be out of order. If i have a single year of data this code works. but for multiple years i am running into trouble duplicating leap year, and also getting the plot to work.
Error: Column x must be length 1 or 730, not 365
I would like to use the factors to plot the years seasonaly one over the other for each "%m-%d".
Thank you.
dates <- format(seq(from = as.Date("2016-12-01"), to = as.Date("2018-11-30"),
by = "days"), format = "%m-%d")
values = c(rnorm(length(dates)/2, 8, 1.5), rnorm(length(dates)/2, 16, 2))
fDates <- factor(dates, dates)
plot_ly(x = ~fDates, y = ~values, type = "scatter", mode = "lines")
EDIT: This is the desired range for the x-axis. I use the factor to force the levels to conform to this order. I just need to be able to plot multiple years %m-%d against these x axis coordinates.
[1] 12-01 12-02 12-03 12-04 12-05 12-06 12-07 12-08 12-09 12-10 12-11 12-12 12-13 12-14 12-15 12-16 12-17 12-18 12-19 12-20 12-21
[22] 12-22 12-23 12-24 12-25 12-26 12-27 12-28 12-29 12-30 12-31 01-01 01-02 01-03 01-04 01-05 01-06 01-07 01-08 01-09 01-10 01-11
[43] 01-12 01-13 01-14 01-15 01-16 01-17 01-18 01-19 01-20 01-21 01-22 01-23 01-24 01-25 01-26 01-27 01-28 01-29 01-30 01-31 02-01
[64] 02-02 02-03 02-04 02-05 02-06 02-07 02-08 02-09 02-10 02-11 02-12 02-13 02-14 02-15 02-16 02-17 02-18 02-19 02-20 02-21 02-22
[85] 02-23 02-24 02-25 02-26 02-27 02-28 03-01 03-02 03-03 03-04 03-05 03-06 03-07 03-08 03-09 03-10 03-11 03-12 03-13 03-14 03-15
[106] 03-16 03-17 03-18 03-19 03-20 03-21 03-22 03-23 03-24 03-25 03-26 03-27 03-28 03-29 03-30 03-31 04-01 04-02 04-03 04-04 04-05
[127] 04-06 04-07 04-08 04-09 04-10 04-11 04-12 04-13 04-14 04-15 04-16 04-17 04-18 04-19 04-20 04-21 04-22 04-23 04-24 04-25 04-26
[148] 04-27 04-28 04-29 04-30 05-01 05-02 05-03 05-04 05-05 05-06 05-07 05-08 05-09 05-10 05-11 05-12 05-13 05-14 05-15 05-16 05-17
[169] 05-18 05-19 05-20 05-21 05-22 05-23 05-24 05-25 05-26 05-27 05-28 05-29 05-30 05-31 06-01 06-02 06-03 06-04 06-05 06-06 06-07
[190] 06-08 06-09 06-10 06-11 06-12 06-13 06-14 06-15 06-16 06-17 06-18 06-19 06-20 06-21 06-22 06-23 06-24 06-25 06-26 06-27 06-28
[211] 06-29 06-30 07-01 07-02 07-03 07-04 07-05 07-06 07-07 07-08 07-09 07-10 07-11 07-12 07-13 07-14 07-15 07-16 07-17 07-18 07-19
[232] 07-20 07-21 07-22 07-23 07-24 07-25 07-26 07-27 07-28 07-29 07-30 07-31 08-01 08-02 08-03 08-04 08-05 08-06 08-07 08-08 08-09
[253] 08-10 08-11 08-12 08-13 08-14 08-15 08-16 08-17 08-18 08-19 08-20 08-21 08-22 08-23 08-24 08-25 08-26 08-27 08-28 08-29 08-30
[274] 08-31 09-01 09-02 09-03 09-04 09-05 09-06 09-07 09-08 09-09 09-10 09-11 09-12 09-13 09-14 09-15 09-16 09-17 09-18 09-19 09-20
[295] 09-21 09-22 09-23 09-24 09-25 09-26 09-27 09-28 09-29 09-30 10-01 10-02 10-03 10-04 10-05 10-06 10-07 10-08 10-09 10-10 10-11
[316] 10-12 10-13 10-14 10-15 10-16 10-17 10-18 10-19 10-20 10-21 10-22 10-23 10-24 10-25 10-26 10-27 10-28 10-29 10-30 10-31 11-01
[337] 11-02 11-03 11-04 11-05 11-06 11-07 11-08 11-09 11-10 11-11 11-12 11-13 11-14 11-15 11-16 11-17 11-18 11-19 11-20 11-21 11-22
[358] 11-23 11-24 11-25 11-26 11-27 11-28 11-29 11-30
365 Levels: 12-01 12-02 12-03 12-04 12-05 12-06 12-07 12-08 12-09 12-10 12-11 12-12 12-13 12-14 12-15 12-16 12-17 12-18 ... 11-30

Time series is throwing up error message

I am trying to conduct a time series analysis based on this dataset:
time POINT_Y POINT_X
00:00 106.78 207.44
00:30 106.61 207.6
01:00 103.72 208.33
01:30 102.57 207.35
02:00 102.27 206.3
02:30 101.6 206.43
03:00 100.66 206.73
03:30 101.11 206.5
04:00 100.95 206.63
04:30 102.02 206.27
05:00 105.83 207.93
05:30 106.98 207.15
06:00 107.32 206.28
06:30 108.36 204.7
07:00 107.97 203.41
07:30 107.76 202.63
08:00 107.85 201.13
08:30 107.6 198.74
It has been set as:
austriacus<-read.table("austriacus.txt",header=T).
The time series function: x.ts<-ts(POINT_X,time) is not working and is producing the following error message: Error in is.data.frame(data) : object 'POINT_X' not found
Any ideas on this?
Try the zoo and chron packages:
Lines <- "time POINT_Y POINT_X
00:00 106.78 207.44
00:30 106.61 207.6
01:00 103.72 208.33
01:30 102.57 207.35
02:00 102.27 206.3
02:30 101.6 206.43
03:00 100.66 206.73
03:30 101.11 206.5
04:00 100.95 206.63
04:30 102.02 206.27
05:00 105.83 207.93
05:30 106.98 207.15
06:00 107.32 206.28
06:30 108.36 204.7
07:00 107.97 203.41
07:30 107.76 202.63
08:00 107.85 201.13
08:30 107.6 198.74
"
library(zoo)
library(chron)
to.times <- function(x) times(paste0(x, ":00"))
# z <- read.zoo("myfile", header = TRUE, FUN = to.times)
z <- read.zoo(text = Lines, header = TRUE, FUN = to.times)
plot(z)

Troubles in applying the zoo aggregate function to a time series

We have the following function to compute monthly returns from a daily series of prices:
PricesRet = diff(Prices)/lag(Prices,k=-1)
tail(PricesRet)
# Monthly simple returns
MonRet = aggregate(PricesRet+1, as.yearmon, prod)-1
tail(MonRet)
The problem is that it returns wrong values, take for example the simple return for the month of Feb 2013, the function returns a return -0.003517301 while it should have been -0.01304773.
Why that happens?
Here are the last prices observations:
> tail(Prices,30)
Prices
2013-01-22 165.5086
2013-01-23 165.2842
2013-01-24 168.4845
2013-01-25 170.6041
2013-01-28 169.7373
2013-01-29 169.8724
2013-01-30 170.6554
2013-01-31 170.7210
2013-02-01 173.8043
2013-02-04 172.2145
2013-02-05 172.8400
2013-02-06 172.8333
2013-02-07 171.3586
2013-02-08 170.5602
2013-02-11 171.2172
2013-02-12 171.4126
2013-02-13 171.8687
2013-02-14 170.7955
2013-02-15 171.2848
2013-02-19 170.9482
2013-02-20 171.6355
2013-02-21 170.0300
2013-02-22 169.9319
2013-02-25 170.9035
2013-02-26 168.6822
2013-02-27 168.5180
2013-02-28 168.4935
2013-03-01 169.6546
2013-03-04 169.3076
2013-03-05 169.0579
Here are price returns:
> tail(PricesRet,50)
PricesRet
2012-12-18 0.0055865274
2012-12-19 -0.0015461900
2012-12-20 -0.0076140194
2012-12-23 0.0032656346
2012-12-26 0.0147750923
2012-12-27 0.0013482760
2012-12-30 -0.0004768131
2013-01-01 0.0128908541
2013-01-02 -0.0047646818
2013-01-03 0.0103372029
2013-01-06 -0.0024547278
2013-01-07 -0.0076920352
2013-01-08 0.0064368720
2013-01-09 0.0119663301
2013-01-10 0.0153828814
2013-01-13 0.0050590540
2013-01-14 -0.0053324785
2013-01-15 -0.0027043105
2013-01-16 0.0118840383
2013-01-17 -0.0005876459
2013-01-21 -0.0145541598
2013-01-22 -0.0013555548
2013-01-23 0.0193624621
2013-01-24 0.0125802978
2013-01-27 -0.0050807744
2013-01-28 0.0007959058
2013-01-29 0.0046096266
2013-01-30 0.0003844082
2013-01-31 0.0180603867
2013-02-03 -0.0091473127
2013-02-04 0.0036322298
2013-02-05 -0.0000390941
2013-02-06 -0.0085320734
2013-02-07 -0.0046591956
2013-02-10 0.0038517581
2013-02-11 0.0011412046
2013-02-12 0.0026607502
2013-02-13 -0.0062440496
2013-02-14 0.0028645616
2013-02-18 -0.0019651341
2013-02-19 0.0040206637
2013-02-20 -0.0093543648
2013-02-21 -0.0005764665
2013-02-24 0.0057176118
2013-02-25 -0.0129979321
2013-02-26 -0.0009730782
2013-02-27 -0.0001453191
2013-02-28 0.0068911863
2013-03-03 -0.0020455332
2013-03-04 -0.0014747845
The results of the function is instead:
> tail(data.frame(MonRet))
MonRet
ott 2012 -0.000848156
nov 2012 0.009833881
dic 2012 0.033406884
gen 2013 0.087822700
feb 2013 -0.023875638
mar 2013 -0.003517301
Your returns are wrong. The return for 2013-01-23 should be:
> 165.2842/165.5086-1
[1] -0.001355821
but you have 0.0193624621. I suspect this is because Prices is an xts object, not a zoo object. lag.xts breaks the convention in lag.ts and lag.zoo of k=1 implying a "lag" of (t+1) for the more common convention of using k=1 to imply a "lag" of (t-1).

Resources