# Problem integrating CNSDK

**URL:** https://forums.leialoft.com/t/problem-integrating-cnsdk/4064
**Category:** Core SDK Android
**Created:** [December 28, 2023, 1:18am UTC](https://forums.leialoft.com/t/problem-integrating-cnsdk/4064 "2023-12-28T01:18:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lostart](https://avatars.discourse-cdn.com/v4/letter/l/8797f3/32.png) [@lostart](https://forums.leialoft.com/u/lostart)
#### Post date: [December 28, 2023, 1:18am UTC](https://forums.leialoft.com/t/problem-integrating-cnsdk/4064/1 "2023-12-28T01:18:02Z")

</div>

Integrated Leia CNSDK into existing 3D model viewer android app.

Able to init the SDK and start the backlight OK.

But when attempting to postprocess after rendering into the SxS (Side-by-side) OpenGL viewports, get catastrophic crash with stacktrace:

```auto
V [LeiaSDK] [trace] [HTS-Binder] onMessage(Frame)
V [LeiaSDK] [trace] [HTS-Binder] onMessage(Frame)
A Cmdline: <app package>
A pid: 15252, tid: 15904, name: GLThread 215 >>> <app package> <<<
A #01 pc 000000000038bf10 /data/app/~~xEZqOu9ZMVo-7eybq_5-ew==/<app package>-DEcP4x3LQOdX6HRk98f6Lw==/base.apk!libleiaSDK-faceTrackingInService.so (BuildId: 35228cc0a8fbd1f887f4bc3557490cfd7dba7b67)
A #02 pc 000000000038dcec /data/app/~~xEZqOu9ZMVo-7eybq_5-ew==/<app package>-DEcP4x3LQOdX6HRk98f6Lw==/base.apk!libleiaSDK-faceTrackingInService.so (BuildId: 35228cc0a8fbd1f887f4bc3557490cfd7dba7b67)
A #03 pc 000000000032b544 /data/app/~~xEZqOu9ZMVo-7eybq_5-ew==/<app package>-DEcP4x3LQOdX6HRk98f6Lw==/base.apk!libleiaSDK-faceTrackingInService.so (BuildId: 35228cc0a8fbd1f887f4bc3557490cfd7dba7b67)
A #04 pc 0000000000310498 /data/app/~~xEZqOu9ZMVo-7eybq_5-ew==/<app package>-DEcP4x3LQOdX6HRk98f6Lw==/base.apk!libleiaSDK-faceTrackingInService.so (BuildId: 35228cc0a8fbd1f887f4bc3557490cfd7dba7b67)
A #05 pc 0000000000310a14 /data/app/~~xEZqOu9ZMVo-7eybq_5-ew==/<app package>-DEcP4x3LQOdX6HRk98f6Lw==/base.apk!libleiaSDK-faceTrackingInService.so (leia_interlacer_opengl_do_post_process+20) (BuildId: 35228cc0a8fbd1f887f4bc3557490cfd7dba7b67)
A #06 pc 0000000000ca4014 /data/app/~~xEZqOu9ZMVo-7eybq_5-ew==/<app package>-DEcP4x3LQOdX6HRk98f6Lw==/base.apk!libnative-lib.so (leia::sdk::InterlacerOpenGL::DoPostProcess(int, int, bool, unsigned int)+68) (BuildId: a95320e5ed3a62cb4c09633fde5086805cf882c8)
...
V [LeiaSDK] [trace] [HTS-Binder] onMessage(Frame)

```

Any insight appreciated if anyone else has solved this, thank you

---

<div class="post-metadata">

### Author: ![hshakula](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@hshakula](https://forums.leialoft.com/u/hshakula)
#### Post date: [December 28, 2023, 10:45pm UTC](https://forums.leialoft.com/t/problem-integrating-cnsdk/4064/2 "2023-12-28T22:45:37Z")

</div>

Which sample were you following? Do you use native or Java API? Is this project open sourced? If not, can you share a build? (I can debug it if there are no active protection layer integrated that would prevent me from doing so)

---

<div class="post-metadata">

### Author: ![lostart](https://avatars.discourse-cdn.com/v4/letter/l/8797f3/32.png) [@lostart](https://forums.leialoft.com/u/lostart)
#### Post date: [January 5, 2024, 3:56pm UTC](https://forums.leialoft.com/t/problem-integrating-cnsdk/4064/3 "2024-01-05T15:56:03Z")

</div>

Thank you George, apologies for the delay.

Using the [CNSDKGettingStartedGLAndroidNative](https://github.com/LeiaInc/CNSDKGettingStartedGLAndroidNative) sample project

The target android app for CNSDK integration uses several C++ 3rd party libraries for loading models, image manipulation etc; it’s kotlin on the managed side but makes heavy use of JNI/NDK/C++ on the native side. Also integrates optional ARCore support, so camera permission declared in manifest and obviously required to be granted if user wishes to make use of that feature.

App is a closed source personal hobby project.

---

<div class="post-metadata">

### Author: ![hshakula](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@hshakula](https://forums.leialoft.com/u/hshakula)
#### Post date: [January 5, 2024, 5:52pm UTC](https://forums.leialoft.com/t/problem-integrating-cnsdk/4064/4 "2024-01-05T17:52:02Z")

</div>

From the information you shared so far I cannot help you. You can’t share an apk either?
