android - RenderScript: Assertion failed in rsObjectBase.cpp -
i saw lot of following error messages in logcat output of app:
e/renderscript: rsassert failed: msysrefcount > 0, in frameworks/rs/rsobjectbase.cpp @ 147
despite of app did work crash sigsegv after starting renderscript code couple of times.
i able track down problem (well, think). had function in renderscript code returned rs_allocation
, defined , used this:
rs_allocation gtmp1; rs_allocation gtmp2; static rs_allocation blur(float size) { if (some_criterion()) return gtmp1; else return gtmp2; } ... rs_allocation tmp = blur(size);
after changing function definition following error message went away , app has not crashed since:
static bool blur(float size) { if (some_criterion()) return false; else return true; } ... bool blurred = blur(size); rs_allocation tmp = blurred ? gtmp2 : gtmp1;
now question is, why make difference? after rs_allocation
defined int
pointer in rs_types.rsh. nothing fancy should happening when function returns rs_allocation
, right?
Comments
Post a Comment