1

Good Afternoon,

I've always had a bunch of Renderscript scripts to achieve canny edge detection. This has been working flawlessly up to now.

Unfortunately with a new device (Samsung Galaxy S7) all scripts seem to be failing to be compiled by bcc.

I've searched a lot on google tracker and SO but nothing that made change to the exceptions involved. I also tried to update my android environment to the latest configuration and tried several gradle build configurations. Unfortunately i couldn't get it to work and always throws me the same exception.

I then started thinking that it might be the actual C99 scripts but they are setup like other projects i have with Renderscript - that actually work on this Samsung S7.

The error messages that seem critical are:

  E/RenderScript: Unable to open shared library (/xxx/package.name.xxx.cache/librs.gauss_5x1.so): (null)
  E/RenderScript: Unable to open shared library (/xxx/package.name.xxx.cache/librs.gauss_1x5.so): undefined symbol: root.expand
  E/RenderScript: Unable to open shared library (/xxx/package.name.xxx.cache/librs.canny_sobel.so): undefined symbol: root.expand
  E/RenderScript: Unable to open shared library (/xxx/package.name.xxx.cache/librs.canny_nms.so): undefined symbol: root.expand
  E/RenderScript: Child process "/system/bin/bcc" terminated with status 11
  E/RenderScript: bcc: FAILS to compile 'canny_nms'

This causes then at Android Java layer the fatal exception:

E/AndroidRuntime: FATAL EXCEPTION: main                                            
   android.renderscript.RSRuntimeException: Loading of ScriptC script failed.
   at android.renderscript.ScriptC.<init>(ScriptC.java:63)
   at android.support.v8.renderscript.ScriptCThunker.<init>(ScriptCThunker.java:39)
   at android.support.v8.renderscript.ScriptC.<init>(ScriptC.java:62)
   at com.novarumreader.renderscripttest.ScriptC_canny_nms.<init>(ScriptC_canny_nms.java:42)
   at com.novarumreader.renderscripttest.ScriptC_canny_nms.<init>(ScriptC_canny_nms.java:34)
 ....                                                                                   

Any orientation in how to address the issue will be much appreciated.

Thank you so much for you time,

Antonio

  • Do you really need the Support library? Try setting settingrenderscriptSupportModeEnabled false in Gradle. – Settembrini Jul 16 '16 at 11:07
  • Hello Settembrini, yes i do need the support library. I fixed the issue by refactoring some code that didnt compile in BCC in specific for the Samsung S7. I raised the issue within google but certainly this will be a Samsung RS driver implementation issue. – Antonio Lopes Jul 18 '16 at 09:48
  • @Settembrini How did you get on with getting data[] camera array with Camera2 at 30FPS on a good number of devices without blocking UI (on Imageavailablelistener)? – Antonio Lopes Jul 19 '16 at 13:42
  • Good point, Antonio. Actually, this listener should not per se block the UI. But nevertheless, I must admit that I didn't manage to implement a reliable way (comparable with the simple but stable Camera1 mechanism) of getting the preview pics in a high frequency. Also I didn't yet find any convincing example of doing so. My own experiments ended more or less here: http://stackoverflow.com/q/36048189/5148048. My Impression is that Camera2 is somewhat "overambitious", at least I didn't understand it really, to be honest. I stay with Camera1 and watch SO for the time being... good luck. – Settembrini Jul 19 '16 at 20:26

0 Answers0