title: Could not allocate CursorWindow '/pos-db' of size 2097152 due to error -24
body: <h1>Exception Information</h1>
  
  <pre><code>cannot open file at line 30176 of [00bb9c9ce4]
   (14) os_unix.c:30176: (24) open(/data/data/c/databases/pos-db-journal) - 
   (14) cannot open file at line 30176 of [00bb9c9ce4]
   (14) os_unix.c:30176: (24) open(/data/data/c/pos-db-journal) - 
   (14) statement aborts at 14: [SELECT T."_id",T."PRINTDATA",T."POSITION",T."DOUBLEFORMAT",
   T."PRINTERMODE",T."INSERTTIME" FROM "PRINT_DATA_ITEM" T] unable to open database file
   E/SQLiteQuery: exception: unable to open database file (code 14); query: SELECT T."_id",T.
   "PRINTDATA",T."POSITION",T."DOUBLEFORMAT",T."PRINTERMODE",T."INSERTTIME" FROM "PRINT_DATA_ITEM" T
  </code></pre>
  
  <h1>part code：</h1>
  
  <pre><code> private PrinterTask(Context context) {
          this.mContext = context;
          helper = new DaoMaster.DevOpenHelper(context, "pos-db", null);
          db = helper.getWritableDatabase();
          mDaoMaster = new DaoMaster(db);
          mDaoSession = mDaoMaster.newSession();
          mPrintDataItemDao = mDaoSession.getPrintDataItemDao();
          mRequestDataItemDao = mDaoSession.getRequestDataItemDao();
      }
  //
   public void startPrintThread() {
          dataIsExist = true;
          //
          if (!threadIsRuning) {
              thread = new Thread() {
                  @Override
                  public void run() {
                      super.run();
                      threadIsRuning = true;
                      List&lt;PrintDataItem&gt; list; 
                      while (dataIsExist) {
                          list = mPrintDataItemDao.loadAll();
                           if (list != null &amp;&amp; list.size() &gt; 0) {
                          KLog.d("startPrintThread", String.valueOf(++count) + "  " + String.valueOf(list.size()));
                      }
                      threadIsRuning = false;
                  }
              };
              thread.start();
          }
  </code></pre>
  
  <p>when the count is added to about 600000 ,app will exist without any omen. then logcat output these info.</p>
  
  <h2>log output：</h2>
  
  <pre><code>（1）Could not create epoll instance. errno=24
  （2）CursorWindow(26673): Could not allocate CursorWindow of size 2097152 due to error -24
  （3）F/Looper  (26673): Could not create wake pipe.  errno=24
  I/qtaguid (20825): Failed write_ctrl(s 0 10051) res=-1 errno=1
   FATAL EXCEPTION: Thread-118`enter code here`
  </code></pre>
  
  <p>what i can do so solve this problem? I will appreciate it!</p>