,   CyberForum.ru

"Attempt to re-open an already-closed object" SQLite - Android


 
Android Android http://www.cyberforum.ru/android-dev/thread1416961.html
"alien shooter" . ...
Android , - ( ... http://www.cyberforum.ru/android-dev/thread1416904.html
" " Android
, " " ( , -). ...
Android - , ,
! , , ... ! ... ! ! ? ? ...
Android http://www.cyberforum.ru/android-dev/thread1416836.html
. . ?? ?? ...
Android Debugger, ? . , Android Studio . . ...

Naomis
6 / 6 / 1
: 11.03.2015
: 210
: 1
09.04.2015, 20:31  []
Armagedo
, ?
Rube.
, - ?
, , , ...

... . ...
"FATAL EXCEPTION: main " , , .
Prolog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
04-09 20:16:13.882  31989-31989/com.example.kirukato.coolstdreg I/Process﹕ Sending signal. PID: 31989 SIG: 9
04-09 20:16:24.393      580-580/com.example.kirukato.coolstdreg D/libEGL﹕ loaded /vendor/lib/egl/libEGL_adreno.so
04-09 20:16:24.393      580-580/com.example.kirukato.coolstdreg D/libEGL﹕ loaded /vendor/lib/egl/libGLESv1_CM_adreno.so
04-09 20:16:24.393      580-580/com.example.kirukato.coolstdreg D/libEGL﹕ loaded /vendor/lib/egl/libGLESv2_adreno.so
04-09 20:16:24.393      580-580/com.example.kirukato.coolstdreg I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:316>: EGL 1.4 QUALCOMM build:  (CL4169980)
    OpenGL ES Shader Compiler Version: 17.01.10.SPL
    Build Date: 11/04/13 Mon
    Local Branch:
    Remote Branch:
    Local Patches:
    Reconstruct Branch:
04-09 20:16:24.433      580-580/com.example.kirukato.coolstdreg D/OpenGLRenderer﹕ Enabling debug mode 0
04-09 20:16:28.107      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕     
04-09 20:16:28.127      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕ - 
04-09 20:16:28.147      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕ Ĩ '' 
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕ !
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕    --- if (edtMan.getSelectedItem() != null) ---
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕ ----if    -----
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕ ----if -----   checkMan = true;
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕ ----if -----   checkMan = true;-- 
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕ ----if-----    cur = db.GetCatalogValueByName(.........);
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕  edtMan.getSelectedItem().toString()------
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/DB__ACTIVITY﹕ ----  GetCatalogValueByName----
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/DB__ACTIVITY﹕ ---  . select _id from man where name = ' '
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/DB__ACTIVITY﹕ select _id from man where name = ' '
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/DB__ACTIVITY﹕ 1
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕ ----if-----    cur = db.GetCatalogValueByName(.........);-------
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕ ----if-----    _id ---- cManID = cur.getInt(...._id")-----
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕ ----if-----    _id ---- cManID = cur.getInt(...._id")-----
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕   E  --- if (edtET.getSelectedItem() != null) ---
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/DB__ACTIVITY﹕ ----  GetCatalogValueByName----
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/DB__ACTIVITY﹕ ---  . select _id from event_type where name = '   '
04-09 20:16:29.008      580-580/com.example.kirukato.coolstdreg V/DB__ACTIVITY﹕ select _id from event_type where name = '   '
04-09 20:16:29.018      580-580/com.example.kirukato.coolstdreg V/DB__ACTIVITY﹕ 1
04-09 20:16:29.018      580-580/com.example.kirukato.coolstdreg V/EVENT__ACTIVITY﹕    --- if (edtMeet.getSelectedItem() != null) ---
04-09 20:16:29.018      580-580/com.example.kirukato.coolstdreg V/DB__ACTIVITY﹕ ----  GetCatalogValueByName----
04-09 20:16:29.018      580-580/com.example.kirukato.coolstdreg V/DB__ACTIVITY﹕ ---  . select _id from event_type where name = ' '
04-09 20:16:29.018      580-580/com.example.kirukato.coolstdreg V/DB__ACTIVITY﹕ select _id from event_type where name = ' '
04-09 20:16:29.018      580-580/com.example.kirukato.coolstdreg V/DB__ACTIVITY﹕ 0
04-09 20:16:29.018      580-580/com.example.kirukato.coolstdreg D/AndroidRuntime﹕ Shutting down VM
04-09 20:16:29.018      580-580/com.example.kirukato.coolstdreg W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x4154d8b0)
04-09 20:16:29.038      580-580/com.example.kirukato.coolstdreg E/AndroidRuntime﹕ FATAL EXCEPTION: main
    android.database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0
            at android.database.AbstractCursor.checkPosition(AbstractCursor.java:424)
            at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:136)
            at android.database.AbstractWindowedCursor.getInt(AbstractWindowedCursor.java:68)
            at com.example.kirukato.coolstdreg.EventActivity$1.onClick(EventActivity.java:119)
            at android.view.View.performClick(View.java:4421)
            at android.view.View$PerformClick.run(View.java:17903)
            at android.os.Handler.handleCallback(Handler.java:730)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:213)
            at android.app.ActivityThread.main(ActivityThread.java:5225)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:525)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:741)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
            at dalvik.system.NativeStart.main(Native Method)
, , - .

8
"meeting"
Java
1
Log.v(TAG, cur.getCount() + "");

Prolog
1
DB__ACTIVITY﹕ 0
Java
1
2
3
4
5
6
7
8
Log.v(TAG, "   --- if (edtMeet.getSelectedItem() != null) ---" );
                if (edtMeet.getSelectedItem() != null)
                {
                    checkMeet = true;
                    cur = db.GetCatalogValueByName("event_type", "_id", "name", edtMeet.getSelectedItem().toString());
                    cMeetID = cur.getInt(cur.getColumnIndex("_id"));
                    //db.addRec("event", DB.EVENT_COLUMN_MEETING, cMeetID );
                }
Java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
public Cursor GetCatalogValueByName(String CatalogFullName,
                                        String FieldFullName,
                                        String ConditionField,
                                        String Value)
    {
        //Open();
 
        Log.v(TAG, "----  GetCatalogValueByName----");
 
        Log.v(TAG,"---  ." + " select " + FieldFullName + " from " + CatalogFullName +
                " where " + ConditionField + " = '" + Value + "'" );
 
        Cursor cur = mDB.rawQuery(" select " + FieldFullName +
                " from " + CatalogFullName +
                " where " + ConditionField + " = '" + Value + "'"
                , null);
 
        Log.v(TAG, " select " + FieldFullName +
                " from " + CatalogFullName +
                " where " + ConditionField + " = '" + Value + "'");
 
        cur.moveToFirst();
        //Close();
 
        Log.v(TAG, cur.getCount() + "");
 
        return cur;
    }
- ?
0
 
- , ,
-
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
@Mail.ru