2016-11-06 135 views
2

我運行的AsyncTaskjava.lang.OutOfMemoryError:無法分配JNI信封總是安卓的Java

java.lang.OutOfMemoryError: Could not allocate JNI Env 
                     at java.lang.Thread.nativeCreate(Native Method) 
                     at java.lang.Thread.start(Thread.java:1063) 
                     at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:921) 
                     at java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:989) 
                     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1131) 
                     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
                     at java.lang.Thread.run(Thread.java:818) 

下一次我運行應用程序,並執行相同的任務,我得到這個錯誤,第一次任務完成沒有任何porblem並沒有崩潰,當我返回按退出該應用程序,然後回來做同樣的任務,它表明這個錯誤

[ 11-06 22:20:02.741 1174: 1219 D/   ] 
                   NULL == 

surf->write_back_color_buffer 
11-06 22:20:02.741 1174-1219/com.package A/OpenGLRenderer: Encountered EGL error 12291 EGL_BAD_ALLOC during rendering 
11-06 22:20:02.741 1174-1219/com.package A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 1219 (RenderThread) 

從未有過這個問題之前

回答

2

好,呃, ror是由於輸入流,我忘記關閉在一個模塊,所以如果你們使用任何流,請仔細檢查它,並確保你關閉所有流你打開:)

+0

你可以分享你的代碼與最初的問題? – 0x8BADF00D