mNativeInstance==0 and this must throw new IllegalArgumentException("nativePtr is null"),so I think this api may be something wrong
Shader.getNativeInstance()
{
verifyNativeInstance();
if (mNativeInstance == 0) {
mNativeInstance = createNativeInstance(mLocalMatrix == null
? 0 : mLocalMatrix.native_instance);
mCleaner = NoImagePreloadHolder.sRegistry.registerNativeAllocation(
this, mNativeInstance);// mNativeInstance==0 and this must throw new IllegalArgumentException("nativePtr is null"),so I think this api may be something wrong
}
return mNativeInstance;
}
Shader.createNativeInstance(long nativeMatrix) {
return 0;
}
NativeAllocationRegistry.Runnable registerNativeAllocation(Object referent, long nativePtr) {
--
if (referent == null) {
throw new IllegalArgumentException("referent is null");
}
if (nativePtr == 0) {
throw new IllegalArgumentException("nativePtr is null");
}
CleanerThunk thunk;
CleanerRunner result;
try {
thunk = new CleanerThunk();
Cleaner cleaner = Cleaner.create(referent, thunk);
result = new CleanerRunner(cleaner);
registerNativeAllocation(this.size);
} catch (VirtualMachineError vme /* probably OutOfMemoryError */) {
applyFreeFunction(freeFunction, nativePtr);
throw vme;
} // Other exceptions are impossible.
// Enable the cleaner only after we can no longer throw anything, including OOME.
thunk.setNativePtr(nativePtr);
return result;
}
mNativeInstance==0 and this must throw new IllegalArgumentException("nativePtr is null"),so I think this api may be something wrong