<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Lucida Console";
panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I’ve been chasing a problem for the last few days regarding OSG and Android. Today I finally decided to work forward from the osgAndroidExcmpleGLES2 from the osg example source. The issue manifested very quickly in the application startup
so I am fairly sure I’ve built my Android ARM OSG libraries incorrectly. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The symptom seems to be a block of uninitialized memory being passed to a dlfree call . The back trace can start from numerous sources based on the example code, but the failure is always based in std::allocator<char> >::~basic_string().
I would normally blame STL incompatibilities, but with the osgAndroidExampleGLES2 I can confirm that both the APK and the OSG libs were compiled against gnustl_static so I wouldn’t expect this to be the core conflict.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Does anyone have an idea on common pitfalls which could cause this type of behavior?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">4.087.028_msm8974_LNX.LA.3.5.2.2_RB1__release_AU ()<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/Adreno-EGL( 7544): OpenGL ES Shader Compiler Version: E031.24.00.15<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/Adreno-EGL( 7544): Build Date: 07/31/14 Thu<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/Adreno-EGL( 7544): Local Branch:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/Adreno-EGL( 7544): Remote Branch: quic/LNX.LA.3.5.2.2_rb1<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/Adreno-EGL( 7544): Local Patches: NONE<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/Adreno-EGL( 7544): Reconstruct Branch: AU_LINUX_ANDROID_LNX.LA.3.5.2.2_RB1.04.04.04.087.028 + NOTHING<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">W/EGLview ( 7544): creating OpenGL ES 2.0 context<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">W/IInputConnectionWrapper( 1460): showStatusIcon on inactive InputConnection<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">D/dalvikvm( 7544): Trying to load lib /data/app-lib/osg.AndroidExample-1/libosgNativeLib.so 0x41be9e18<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/ActivityManager( 777): Displayed osg.AndroidExample/.osgViewer: +278ms<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/Timeline( 777): Timeline: Activity_windows_visible id: ActivityRecord{41ac1290 u0 osg.AndroidExample/.osgViewer t155}
time:183309031<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/WindowManager( 777): Screen frozen for +256ms due to Window{41a71c80 u0 Starting osg.AndroidExample}<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/Timeline( 7544): Timeline: Activity_idle id: android.os.BinderProxy@41be1018 time:183309056<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">F/libc ( 7544): invalid address or address of corrupt block 0x772b385c passed to dlfree<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">F/libc ( 7544): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 7568 (Thread-1245)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): Build fingerprint: 'samsung/kltetmo/kltetmo:4.4.2/KOT49H/G900TUVU1BNH5:user/release-keys'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): Revision: '14'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): pid: 7544, tid: 7568, name: Thread-1245 >>> osg.AndroidExample <<<<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): Abort message: 'invalid address or address of corrupt block 0x772b385c passed to dlfree'<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): r0 00000000 r1 40121d6e r2 deadbaad r3 401258e2<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): r4 772b385c r5 40130180 r6 400d1000 r7 772b3864<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): r8 78bf6b60 r9 75e40168 sl 78bf6288 fp 75e40170<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): ip 00000001 sp 75e40118 lr 400f370b pc 400f370c cpsr 60000030<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d0 2064696c61766e69 d1 2073736572646461<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d2 657264646120726f d3 6f6320666f207373<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d4 5056746f446e202a d5 70732020200a203b<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d6 2b2072616c756365 d7 67694c5f6c67203d<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d8 0000000000000000 d9 0000000000000000<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d10 0000000000000000 d11 0000000000000000<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d12 0000000000000000 d13 0000000000000000<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d14 0000000000000000 d15 0000000000000000<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d16 202020200a200a20 d17 465f6c6720202020<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d18 6f6c6f43746e6f72 d19 6f6c6f63203d2072<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d20 20200a200a203b72 d21 2020200a207d2020<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d22 200a2065736c6520 d23 20200a207b202020<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d24 3f8fcf32d797aef0 d25 3f3052f5e30e9be2<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d26 3f435c6a06d3f812 d27 3f12f714115285d3<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d28 3f145163e2128ba2 d29 3fb5442cbe6c5c90<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): d30 bef375cbdb605373 d31 3f72b7bd6def46f5<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): scr 60000012<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359):<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): backtrace:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): #00 pc 0001170c /system/lib/libc.so (dlfree+1191)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): #01 pc 0000dc5b /system/lib/libc.so (free+10)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): #02 pc 0006953c /data/app-lib/osg.AndroidExample-1/libosgSim.so (std::basic_string<char, std::c
har_traits<char>, std::allocator<char> >::~basic_string()+92)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): #03 pc 0003510d /data/app-lib/osg.AndroidExample-1/libosgSim.so (osgSim::OverlayNode::getOverla
yData(osgUtil::CullVisitor*)+788)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359):<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): stack:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e400d8 78bf630c<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e400dc 75e400e0 [stack:7568]<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e400e0 78bf62b8<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e400ec 40130180<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e400f0 400d1000<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e400f4 400f4a65 /system/lib/libc.so<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e400f8 40121d6e /system/lib/libc.so<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e400fc 75e4010c [stack:7568]<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e40100 401258e2 /system/lib/libc.so<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e40104 400f370b /system/lib/libc.so (dlfree+1190)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e40108 40121d6e /system/lib/libc.so<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e4010c 772b385c<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e40110 401258e2 /system/lib/libc.so<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e40114 00000000<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): #00 75e40118 4012c000 /system/lib/libc.so<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e4011c 75e4016c [stack:7568]<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e40120 78bf5400<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e40124 75e4016c [stack:7568]<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e40128 78bf54d0<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e4012c 400efc5d /system/lib/libc.so (free+12)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): #01 75e40130 00000000<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e40134 7769f540 /data/app-lib/osg.AndroidExample-1/libosgSim.so (std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string()+96)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): #02 75e40138 78bf5400<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e4013c 75e4016c [stack:7568]<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e40140 78bf5588<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359): 75e40144 7766b111 /data/app-lib/osg.AndroidExample-1/libosgSim.so (osgSim::OverlayNode::ge
tOverlayData(osgUtil::CullVisitor*)+792)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.0pt;font-family:"Lucida Console"">I/DEBUG ( 359):<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span lang="PT-BR" style="font-family:"Arial","sans-serif"">Steven A White,
</span></b><b><span lang="PT-BR" style="font-size:8.0pt;font-family:"Arial","sans-serif"">Ph.D
</span></b><b><span style="font-family:"Arial","sans-serif""><o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="PT-BR" style="font-size:8.0pt;font-family:"Arial","sans-serif"">Southeast Division<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="PT-BR" style="font-size:8.0pt;font-family:"Arial","sans-serif"">Applied Research Associates, Inc.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="PT-BR" style="font-size:8.0pt;font-family:"Arial","sans-serif"">8537 Six Forks Road, Suite 600<o:p></o:p></span></p>
<p class="MsoNormalCxSpMiddle"><span lang="PT-BR" style="font-size:8.0pt;font-family:"Arial","sans-serif"">T: (919)582-3300
</span><span style="font-size:9.0pt"><o:p></o:p></span></p>
<p class="MsoNormalCxSpMiddle"><span style="font-size:9.0pt"><img width="118" height="42" id="Picture_x0020_1" src="cid:image002.png@01D0B7EC.030F65D0" alt="Description: Description: ARALogo Small.png"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>