NativeVTK has stopped

1

I'm trying to build on the example provided in the directory android example NativeVTK.

I took the sample code provided and decided to modify it to simply include the vtkInteractorMultiTouchCamera. The compilation is ok, I can make and install my application without any error or warning.

However when launching the application on a Nexus 10 tablet, it stops working. The error log I get with adb logcat is a bit long but I will provide it here after the code itself.

I made sure before asking that the sample code provided in the example initially works without problem.

So the code first is this very simple file:

#include <jni.h>
#include <errno.h>
#include <android/log.h>
#include <android_native_app_glue.h>

#include "vtkNew.h"

#include "vtkActor.h"
#include "vtkCamera.h"
#include "vtkConeSource.h"
#include "vtkDebugLeaks.h"
#include "vtkGlyph3D.h"
#include "vtkPolyData.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderWindow.h"
#include "vtkRenderer.h"
#include "vtkSphereSource.h"
#include "vtkTextActor.h"
#include "vtkTextProperty.h"
#include "vtkInteractorStyleMultiTouchCamera.h"
#include "vtkAndroidRenderWindowInteractor.h"

#ifndef LOG
#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "NativeVTK", __VA_ARGS__))
#define LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, "NativeVTK", __VA_ARGS__))
#endif

/**
 * This is the main entry point of a native application that is using
 * android_native_app_glue.  It runs in its own thread, with its own
 * event loop for receiving input events and doing other things.
 */
void android_main(struct android_app* state)
{
  // Make sure glue isn't stripped.
  app_dummy();

  vtkSmartPointer<vtkAndroidRenderWindowInteractor> renderWindowInteractor = vtkSmartPointer<vtkAndroidRenderWindowInteractor>::New();
  renderWindowInteractor->SetAndroidApplication(state);

  vtkSmartPointer<vtkSphereSource> sphereSource =vtkSmartPointer<vtkSphereSource>::New();
  sphereSource->SetCenter(1.0, 0.0, 0.0);
  sphereSource->Update();

  // Create a mapper and actor
  vtkSmartPointer<vtkPolyDataMapper> sphereMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
  sphereMapper->SetInputConnection(sphereSource->GetOutputPort());

  vtkSmartPointer<vtkActor> sphereActor = vtkSmartPointer<vtkActor>::New();
  sphereActor->SetMapper(sphereMapper);

  // Create a cone
  vtkSmartPointer<vtkConeSource> coneSource =vtkSmartPointer<vtkConeSource>::New();

  // Create a mapper and actor
  vtkSmartPointer<vtkPolyDataMapper> coneMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
  coneMapper->SetInputConnection(coneSource->GetOutputPort());

  vtkSmartPointer<vtkActor> coneActor = vtkSmartPointer<vtkActor>::New();
  coneActor->SetMapper(coneMapper);
  vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();
  vtkSmartPointer<vtkRenderWindow> renderWindow =    vtkSmartPointer<vtkRenderWindow>::New();
  renderWindow->AddRenderer(renderer);
  renderWindowInteractor->SetRenderWindow(renderWindow);

  // Add the actors to the scene
  renderer->AddActor(sphereActor);
  renderer->AddActor(coneActor);
  renderer->SetBackground(.1,.2,.3); // Background color dark blue
  renderWindow->Render();
  vtkSmartPointer<vtkInteractorStyleMultiTouchCamera> style = vtkSmartPointer<vtkInteractorStyleMultiTouchCamera>::New(); 

  renderWindowInteractor->SetInteractorStyle( style );
  renderWindowInteractor->Start();

Now the error I get is (sorry if it's kind of long again) here. I had to cut it because it was too long for a post on SO. The complete error is available here:

I/ActivityManager(  413): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.kitware.NativeVTK/android.app.NativeActivity bnds=[1914,663][2106,855]} from pid 676
I/ActivityManager(  413): Start proc com.kitware.NativeVTK for activity com.kitware.NativeVTK/android.app.NativeActivity: pid=2924 uid=10053 gids={50053, 1028}
D/dalvikvm( 2924): Late-enabling CheckJNI
I/dalvikvm( 2924): Turning on JNI app bug workarounds for target SDK version 12...
V/threaded_app( 2924): Creating: 0x722126e0
V/threaded_app( 2924): Config: mcc=0 mnc=0 lang=en cnt=US orien=2 touch=3 dens=320 keys=1 nav=1 keysHid=3 navHid=0 sdk=18 size=4 long=1 modetype=1 modenight=1
V/threaded_app( 2924): Start: 0x722126e0
V/threaded_app( 2924): activityState=10
V/threaded_app( 2924): Resume: 0x722126e0
W/VTK     ( 2924): Handling Command
V/threaded_app( 2924): activityState=11
W/VTK     ( 2924): Handling Command
V/threaded_app( 2924): InputQueueCreated: 0x722126e0 -- 0x7221f7d0
V/threaded_app( 2924): APP_CMD_INPUT_CHANGED
V/threaded_app( 2924): Attaching input queue to looper
W/VTK     ( 2924): Handling Command
V/threaded_app( 2924): NativeWindowCreated: 0x722126e0 -- 0x7222def0
V/threaded_app( 2924): APP_CMD_INIT_WINDOW
W/VTK     ( 2924): Handling Command
W/VTK     ( 2924): Creating Window
V/threaded_app( 2924): WindowFocusChanged: 0x722126e0 -- 1
D/libEGL  ( 2924): loaded /vendor/lib/egl/libGLES_mali.so
D/mali_winsys( 2924): new_window_surface returns 0x3000
I/ActivityManager(  413): Displayed com.kitware.NativeVTK/android.app.NativeActivity: +248ms
W/VTK     ( 2924): Done Creating Window start
W/VTK     ( 2924): Done first render
E/VTK     ( 2924): ERROR: In /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkShaderProgram.cxx, line 369
E/VTK     ( 2924): vtkShaderProgram (0x766f6c68): 1: #ifdef GL_ES
E/VTK     ( 2924): 2: #ifdef GL_FRAGMENT_PRECISION_HIGH
E/VTK     ( 2924): 3: precision highp float;
E/VTK     ( 2924): 4: #else
E/VTK     ( 2924): 5: precision mediump float;
E/VTK     ( 2924): 6: #endif
E/VTK     ( 2924): 7: #endif
E/VTK     ( 2924): 8: 
E/VTK     ( 2924): 9: #if GL_ES==1 && __VERSION__<300
E/VTK     ( 2924): 10: #extension GL_OES_standard_derivatives : enable
E/VTK     ( 2924): 11: #endif
E/VTK     ( 2924): 12: 
E/VTK     ( 2924): 13: 
E/VTK     ( 2924): 14: /*=========================================================================
E/VTK     ( 2924): 15: 
E/VTK     ( 2924): 16:   Program:   Visualization Toolkit
E/VTK     ( 2924): 17:   Module:    vtkPolyDataFS.glsl
E/VTK     ( 2924): 18: 
E/VTK     ( 2924): 19:   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
E/VTK     ( 2924): 20:   All rights reserved.
E/VTK     ( 2924): 21:   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
E/VTK     ( 2924): 22: 
E/VTK     ( 2924): 23:      This software is distributed WITHOUT ANY WARRANTY; without even
E/VTK     ( 2924): 24:      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
E/VTK     ( 2924): 25:      PURPOSE.  See the above copyright notice for more information.
E/VTK     ( 2924): 26: 
E/VTK     ( 2924): 27: =========================================================================*/
E/VTK     ( 2924): 28: // Template for the polydata mappers fragment shader
E/VTK     ( 2924): 29: 
E/VTK     ( 2924): 30: uniform int PrimitiveIDOffset;
E/VTK     ( 2924): 31: 
E/VTK     ( 2924): 32: // VC position of this fragment
E/VTK     ( 2924): 33: varying vec4 vertexVCVSOutput;
E/VTK     ( 2924): 34: 
E/VTK     ( 2924): 35: // optional color passed in from the vertex shader, vertexColor
E/VTK     ( 2924): 36: uniform float opacityUniform; // the fragment opacity
E/VTK     ( 2924): 37: uniform vec3 ambientColorUniform; // intensity weighted color
E/VTK     ( 2924): 38: uniform vec3 diffuseColorUniform; // intensity weighted color
E/VTK     ( 2924): 39: uniform vec3 specularColorUniform; // intensity weighted color
E/VTK     ( 2924): 40: uniform float specularPowerUniform;
E/VTK     ( 2924): 41: 
E/VTK     ( 2924): 42: 
E/VTK     ( 2924): 43: // optional surface normal declaration
E/VTK     ( 2924): 44: uniform int cameraParallel;
E/VTK     ( 2924): 45: 
E/VTK     ( 2924): 46: // extra lighting parameters
E/VTK     ( 2924): 47: //VTK::Light::Dec
E/VTK     ( 2924): 48: 
E/VTK     ( 2924): 49: // Texture coordinates
E/VTK     ( 2924): 50: //VTK::TCoord::Dec
E/VTK     ( 2924): 51: 
E/VTK     ( 2924): 52: // picking support
E/VTK     ( 2924): 53: //VTK::Picking::Dec
E/VTK     ( 2924): 54: 
E/VTK     ( 2924): 55: // Depth Peeling Support
E/VTK     ( 2924): 56: //VTK::DepthPeeling::Dec
E/VTK     ( 2924): 57: 
E/VTK     ( 2924): 58: // clipping plane vars
E/VTK     ( 2924): 59: //VTK::Clip::Dec
E/VTK     ( 2924): 60: 
E/VTK     ( 2924): 61: // the output of this shader
E/VTK     ( 2924): 62: //VTK::Output::Dec
E/VTK     ( 2924): 63: 
E/VTK     ( 2924): 64: // Apple Bug
E/VTK     ( 2924): 65: //VTK::PrimID::Dec
E/VTK     ( 2924): 66: 
E/VTK     ( 2924): 67: void main()
E/VTK     ( 2924): 68: {
E/VTK     ( 2924): 69:   // Apple Bug
E/VTK     ( 2924): 70:   //VTK::PrimID::Impl
E/VTK     ( 2924): 71: 
E/VTK     ( 2924): 72:   //VTK::Clip::Impl
E/VTK     ( 2924): 73: 
E/VTK     ( 2924): 74:   vec3 ambientColor;
E/VTK     ( 2924): 75:   vec3 diffuseColor;
E/VTK     ( 2924): 76:   float opacity;
E/VTK     ( 2924): 77:   vec3 specularColor;
E/VTK     ( 2924): 78:   float specularPower;
E/VTK     ( 2924): 79:   ambientColor = ambientColorUniform;
E/VTK     ( 2924): 80:   diffuseColor = diffuseColorUniform;
E/VTK     ( 2924): 81:   opacity = opacityUniform;
E/VTK     ( 2924): 82:   specularColor = specularColorUniform;
E/VTK     ( 2924): 83:   specularPower = specularPowerUniform;
E/VTK     ( 2924): 84: 
E/VTK     ( 2924): 85: 
E/VTK     ( 2924): 86:   // VC position of this fragment
E/VTK     ( 2924): 87:   vec4 vertexVC = vertexVCVSOutput;
E/VTK     ( 2924): 88: 
E/VTK     ( 2924): 89:   // Generate the normal if we are not passed in one
E/VTK     ( 2924): 90:   vec3 fdx = normalize(vec3(dFdx(vertexVC.x),dFdx(vertexVC.y),dFdx(vertexVC.z)));
E/VTK     ( 2924): 91:   vec3 fdy = normalize(vec3(dFdy(vertexVC.x),dFdy(vertexVC.y),dFdy(vertexVC.z)));
E/VTK     ( 2924): 92:   vec3 normalVCVSOutput = normalize(cross(fdx,fdy));
E/VTK     ( 2924): 93:   if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }
E/VTK     ( 2924): 94:   if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }
E/VTK     ( 2924): 95: 
E/VTK     ( 2924): 96:   float df = max(0.0, normalVCVSOutput.z);
E/VTK     ( 2924): 97:   float sf = pow(df, specularPower);
E/VTK     ( 2924): 98:   vec3 diffuse = df * diffuseColor;
E/VTK     ( 2924): 99:   vec3 specular = sf * specularColor;
E/VTK     ( 2924): 100:   gl_FragData[0] = vec4(ambientColor + diffuse + specular, opacity);
E/VTK     ( 2924): 101: 
E/VTK     ( 2924): 102:   //VTK::TCoord::Impl
E/VTK     ( 2924): 103: 
E/VTK     ( 2924): 104:   if (gl_FragData[0].a <= 0.0)
E/VTK     ( 2924): 105:     {
E/VTK     ( 2924): 106:     discard;
E/VTK     ( 2924): 107:     }
E/VTK     ( 2924): 108: 
E/VTK     ( 2924): 109:   //VTK::DepthPeeling::Impl
E/VTK     ( 2924): 110: 
E/VTK     ( 2924): 111:   //VTK::Picking::Impl
E/VTK     ( 2924): 112: 
E/VTK     ( 2924): 113: }
E/VTK     ( 2924): 114: 
E/VTK     ( 2924): ERROR: In /Users/.../Desktop/VTKNew/Rendering/OpenGL2/vtkShaderProgram.cxx, line 370
E/VTK     ( 2924): vtkShaderProgram (0x766f6c68): 0:10: P0001: Extension directive must occur before any non-preprocessor tokens
E/VTK     ( 2924): 0:90: L0002: No matching function for call to 'dFdx'
E/VTK     ( 2924): 0:91: L0002: No matching function for call to 'dFdy'
E/VTK     ( 2924): 0:92: L0002: Undeclared variable 'fdx'
E/VTK     ( 2924): 0:93: L0002: Undeclared variable 'normalVCVSOutput'
F/libc    ( 2924): Fatal signal 11 (SIGSEGV) at 0x0000003c (code=1), thread 2938 (tware.NativeVTK)
I/DEBUG   (  125): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  125): Build fingerprint: 'google/mantaray/manta:4.3/JWR66V/737497:user/release-keys'
I/DEBUG   (  125): Revision: '8'
I/DEBUG   (  125): pid: 2924, tid: 2938, name: tware.NativeVTK  >>> com.kitware.NativeVTK <<<
I/DEBUG   (  125): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000003c
I/DEBUG   (  125):     r0 00000000  r1 741ac238  r2 00000000  r3 00000000
I/DEBUG   (  125):     r4 739a1414  r5 7221e898  r6 73770f30  r7 72212940
I/DEBUG   (  125):     r8 73770f30  r9 743b5e00  sl 72212990  fp 743b50cc
I/DEBUG   (  125):     ip 7397bfc4  sp 743b50a0  lr 739c7d08  pc 739c999c  cpsr 20070010
I/DEBUG   (  125):     d0  535643566c616d4f  d1  616c6365646e5575
I/DEBUG   (  125):     d2  6972617620646574  d3  6f6e2720656c6270
I/DEBUG   (  125):     d4  203a313030305020  d5  6f69736e65747845
I/DEBUG   (  125):     d6  746365726964206e  d7  7473756d20657669
I/DEBUG   (  125):     d8  0000000000000000  d9  0000000000000000
I/DEBUG   (  125):     d10 0000000000000000  d11 0000000000000000
I/DEBUG   (  125):     d12 0000000000000000  d13 0000000000000000
I/DEBUG   (  125):     d14 0000000000000000  d15 0000000000000000
I/DEBUG   (  125):     d16 00000000757d123c  d17 0000000000000004
I/DEBUG   (  125):     d18 00000000757d1238  d19 00000000757da6c8
I/DEBUG   (  125):     d20 3e5cc6ba580dda9f  d21 0000000000000028
I/DEBUG   (  125):     d22 000000000003f668  d23 000000000003f640
I/DEBUG   (  125):     d24 0000000000000068  d25 0000000000000188
I/DEBUG   (  125):     d26 0000000000000120  d27 b94377ce858a5d48
I/DEBUG   (  125):     d28 3ff0000000000000  d29 4000000000000000
I/DEBUG   (  125):     d30 3ff921fb54400000  d31 3dd0b4611a626331
I/DEBUG   (  125):     scr 60000014
I/DEBUG   (  125): 
I/DEBUG   (  125): backtrace:
I/DEBUG   (  125):     #00  pc 0061299c  /data/app-lib/com.kitware.NativeVTK-1/libNativeVTK.so (vtkShaderProgram::FindUniform(char const*)+36)
I/DEBUG   (  125):     #01  pc 00610d04  /data/app-lib/com.kitware.NativeVTK-1/libNativeVTK.so (vtkShaderProgram::SetUniformi(char const*, int)+32)
I/DEBUG   (  125): 
I/DEBUG   (  125): stack:
I/DEBUG   (  125):          743b5060  743b5084  [stack:2938]
I/DEBUG   (  125):          743b5064  7408deb8  /data/app-lib/com.kitware.NativeVTK-1/libNativeVTK.so (std::basic_istringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_istringstream()+124)
I/DEBUG   (  125):          743b5068  00000027  
I/DEBUG   (  125):          743b506c  757d54e8  
I/DEBUG   (  125):          743b5070  743b531c  [stack:2938]
I/DEBUG   (  125):          743b5074  73784fc8  /data/app-lib/com.kitware.NativeVTK-1/libNativeVTK.so (vtkAndroidOutputWindow::DisplayErrorText(char const*)+292)
I/DEBUG   (  125):          743b5078  757d58d0  
I/DEBUG   (  125):          743b507c  757d54e8  
I/DEBUG   (  125):          743b5080  742b4b4c  
I/DEBUG   (  125):          743b5084  7420d60c  /data/app-lib/com.kitware.NativeVTK-1/libNativeVTK.so
I/DEBUG   (  125):          743b5088  00000000  
I/DEBUG   (  125):          743b508c  7420d6c0  /data/app-lib/com.kitware.NativeVTK-1/libNativeVTK.so
I/DEBUG   (  125):          743b5090  757d5a7c  
I/DEBUG   (  125):          743b5094  757d5c10  
I/DEBUG   (  125):          743b5098  df0027ad  
I/DEBUG   (  125):          743b509c  00000000  
I/DEBUG   (  125):     #00  743b50a0  741ac238  /data/app-lib/com.kitware.NativeVTK-1/libNativeVTK.so
I/DEBUG   (  125):          743b50a4  00000000  
I/DEBUG   (  125):          743b50a8  742b4b2c  
I/DEBUG   (  125):          743b50ac  00000008  
I/DEBUG   (  125):          743b50b0  757d5a7c  
I/DEBUG   (  125):          743b50b4  74230b50  /data/app-lib/com.kitware.NativeVTK-1/libNativeVTK.so
I/DEBUG   (  125):          743b50b8  00000006  
I/DEBUG   (  125):          743b50bc  00000000  
I/DEBUG   (  125):          743b50c0  00001002  
I/DEBUG   (  125):          743b50c4  739a1414  /data/app-lib/com.kitware.NativeVTK-1/libNativeVTK.so (vtkOpenGLShaderCache::ReadyShaderProgram(std::map<vtkShader::Type, vtkShader*, std::less<vtkShader::Type>, std::allocator<std::pair<vtkShader::Type const, vtkShader*> > >))
I/DEBUG   (  125):          743b50c8  743b5104  [stack:2938]
I/DEBUG   (  125):          743b50cc  739c7d08  /data/app-lib/com.kitware.NativeVTK-1/libNativeVTK.so (vtkShaderProgram::SetUniformi(char const*, int)+36)
I/DEBUG   (  125):          743b50d0  00000000  
I/DEBUG   (  125):          743b50d4  00000000  
I/DEBUG   (  125):          743b50d8  741ac238  /data/app-lib/com.kitware.NativeVTK-1/libNativeVTK.so
I/DEBUG   (  125):          743b50dc  00000000  
I/DEBUG   (  125): 
I/DEBUG   (  125): memory near r1:
I/DEBUG   (  125):     741ac218 6c696166 61206465 72657466 64705520  
I/DEBUG   (  125):     741ac228 53657461 65646168 00000072 00000020  
I/DEBUG   (  125):     741ac238 6d697250 76697469 4f444965 65736666  
I/DEBUG   (  125):     741ac248 00000074 74726576 434d7865 00000000  
I/DEBUG   (  125):     741ac258 6f727245 65732072 6e697474 76272067  
I/DEBUG   (  125):     741ac268 65747265 27434d78 206e6920 64616873  
I/DEBUG   (  125):     741ac278 56207265 002e4f41 6d726f6e 434d6c61  
I/DEBUG   (  125):     741ac288 00000000 6f727245 65732072 6e697474  
I/DEBUG   (  125):     741ac298 6e272067 616d726f 27434d6c 206e6920  
I/DEBUG   (  125):     741ac2a8 64616873 56207265 002e4f41 6f6f6374  
I/DEBUG   (  125):     741ac2b8 434d6472 00000000 6f727245 65732072  
I/DEBUG   (  125):     741ac2c8 6e697474 74272067 726f6f63 27434d64  
I/DEBUG   (  125):     741ac2d8 206e6920 64616873 56207265 002e4f41  
I/DEBUG   (  125):     741ac2e8 6c616373 6f437261 00726f6c 6f727245  
I/DEBUG   (  125):     741ac2f8 65732072 6e697474 73272067 616c6163  
I/DEBUG   (  125):     741ac308 6c6f4372 2027726f 73206e69 65646168  
I/DEBUG   (  125): 
                                //Cut here 
I/DEBUG   (  125): 
I/DEBUG   (  125): code around lr:
I/DEBUG   (  125):     739c7ce8 e28db008 e24dd02c e50b0028 e50b102c  
I/DEBUG   (  125):     739c7cf8 e50b2030 e51b0028 e51b102c eb00071b  
I/DEBUG   (  125):     739c7d08 e1a03000 e50b3010 e51b3010 e3730001  
I/DEBUG   (  125):     739c7d18 1a00002c e51b3028 e2834044 e24b3014  
I/DEBUG   (  125):     739c7d28 e1a00003 eb1abb3c e24b2018 e24b3014  
I/DEBUG   (  125):     739c7d38 e1a00002 e51b102c e1a02003 eb1b7111  
I/DEBUG   (  125):     739c7d48 e24b201c e24b3018 e1a00002 e59f20d4  
I/DEBUG   (  125):     739c7d58 e08f2002 e1a01002 e1a02003 ebfef0de  
I/DEBUG   (  125):     739c7d68 e24b2020 e24b301c e1a00002 e1a01003  
I/DEBUG   (  125):     739c7d78 e59f30b4 e08f3003 e1a02003 ebfc134a  
I/DEBUG   (  125):     739c7d88 e24b3020 e1a00004 e1a01003 eb1b6ff5  
I/DEBUG   (  125):     739c7d98 e24b3020 e1a00003 eb1b6cad e24b301c  
I/DEBUG   (  125):     739c7da8 e1a00003 eb1b6caa e24b3018 e1a00003  
I/DEBUG   (  125):     739c7db8 eb1b6ca7 e24b3014 e1a00003 eb1abb18  
I/DEBUG   (  125):     739c7dc8 e3a03000 ea000014 e51b0010 e51b1030  
I/DEBUG   (  125):     739c7dd8 ebf69b9f e3a03001 ea00000f e24b3020  
D/NativeCrashListener(  413): Closing socket connection: FileDescriptor[211]
I/BootReceiver(  413): Copying /data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE)
W/ActivityManager(  413):   Force finishing activity com.kitware.NativeVTK/android.app.NativeActivity
W/InputDispatcher(  413): channel '42382fa8 com.kitware.NativeVTK/android.app.NativeActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
E/InputDispatcher(  413): channel '42382fa8 com.kitware.NativeVTK/android.app.NativeActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
W/InputDispatcher(  413): Attempted to unregister already unregistered input channel '42382fa8 com.kitware.NativeVTK/android.app.NativeActivity (server)'
I/WindowState(  413): WIN DEATH: Window{42382fa8 u0 com.kitware.NativeVTK/android.app.NativeActivity}
I/WindowManager(  413): Screenshot Window{42382fa8 u0 com.kitware.NativeVTK/android.app.NativeActivity EXITING} was all black! mSurfaceLayer=21010 minLayer=21000 maxLayer=21010
W/ActivityManager(  413): Exception thrown during pause
W/ActivityManager(  413): android.os.DeadObjectException
W/ActivityManager(  413):   at android.os.BinderProxy.transact(Native Method)
W/ActivityManager(  413):   at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:635)
W/ActivityManager(  413):   at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1014)
W/ActivityManager(  413):   at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3897)
W/ActivityManager(  413):   at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3829)
W/ActivityManager(  413):   at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:8473)
W/ActivityManager(  413):   at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:8350)
W/ActivityManager(  413):   at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:9029)
W/ActivityManager(  413):   at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:8584)
W/ActivityManager(  413):   at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
I/ActivityManager(  413): Process com.kitware.NativeVTK (pid 2924) has died.
D/Zygote  (  127): Process 2924 terminated by signal (11)
D/mali_winsys(  676): new_window_surface returns 0x3000
W/InputMethodManagerService(  413): Got RemoteException sending setActive(false) notification to pid 2924 uid 10053

After some testing it would appear that I get this error when calling renderWindowInteractor->Start(); and renderWindow->Render();. When I comment them both out the application runs (but of course nothing happens).

android
c++
vtk
asked on Stack Overflow Oct 30, 2015 by LBes • edited Oct 30, 2015 by Azad

1 Answer

2

It is an issue in that version of VTK with some OpenGL ES 2.0 devices. You can switch to ES 3.0 and the issue should go away. I have also created a topic to fix the issue for ES 2.0 moving forward here

https://gitlab.kitware.com/vtk/vtk/merge_requests/855

answered on Stack Overflow Oct 30, 2015 by Ken Martin

User contributions licensed under CC BY-SA 3.0