Reading from raw to database doesn't read all lines
<p>I'm trying to read from a .txt file to SQLite database. It works fine on an emulator, reads all lines (about 10000), but testing the app on a real device, it only reads some of the lines (5-100). I've checked LogCat, but it doesn't show any errors. Is there a problem in the code?</p>

<p><strong>Loading words:</strong></p>

<pre><code>private void loadWords() throws IOException {
        Log.d(TAG, "Loading words...");
        final Resources resources = mHelperContext.getResources();
        InputStream inputStream = resources.openRawResource(R.raw.definitions);
        BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));

        try 
        {
            String line;
            while ((line = reader.readLine()) != null) 
            {
                String[] strings = TextUtils.split(line, ";");
                if (strings.length &lt; 2) continue;
                long id = addWord(strings[0].trim(), strings[1].trim());

                if (id &lt; 0) 
                {
                    Log.e(TAG, "unable to add word: " + strings[0].trim());
                }
            }
        } 
        finally 
        {
            reader.close();
        }
        Log.d(TAG, "DONE loading words.");
    }
</code></pre>

<p><strong>Adding words to database:</strong></p>

<pre><code> public long addWord(String word, String definition) {
        ContentValues initialValues = new ContentValues();
        initialValues.put(KEY_WORD, word);
        initialValues.put(KEY_DEFINITION, definition);

        return mDatabase.insert(FTS_VIRTUAL_TABLE, null, initialValues);
    }
</code></pre>
