google / gitiles

A simple browser for Git repositories.
https://gerrit.googlesource.com/gitiles/
Other
582 stars 174 forks source link

error: nativePtr is null #138

Closed JIANGsssss closed 6 years ago

JIANGsssss commented 6 years ago

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;
   }
jrn commented 6 years ago

This is the bug tracker for a repository browser. I think you were looking for some other project's bug tracker.

jrn commented 6 years ago

Closing since there's nothing we can do about this report.