[VSDK] Crash with VDK_Cursor::ExecuteSQL

Eric Forget forgete at cafederic.com
Fri Nov 28 02:45:06 CST 2003


Hi Ruslan,

The next line will crash.

cursor.ExecuteSQL("SELECT Table2.RecID FROM Table1, Table2");

If I replace with the next line it won¹t crash crash.

cursor.ExecuteSQL("SELECT Table2.RecID FROM Table2");

Originally I had something like: "SELECT DISTINCT Table2.RecID FROM Table1,
Table2 ORDER BY Table2.Name". I've just tried to reduce it for your
debugging.

Table2 is just 2 VDK_String:

    mName( "Name", 512 ),
    mLowerName( "LowerName", 512, NULL, fIndexed | fUnique )

Table1 has a lot of fields, with 1 VDK_ObjectPtr pointing to Table2.

At that point, the database has just been created. The diagnose says "All
right!"...

I didn't change a thing to the database structure. I just removed the
database to create a new one. It really looks like an uninitialized
variable...

Any idea?

Éric

___________________________________________________________________

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000004

Thread 0 Crashed:
 #0   0x004b5888 in OBL_CursorTable_Indirect::LockRecords()
(OBL_CursorTable_Indirect::LockRecords() + 324)
 #1   0x004b571c in OBL_CursorTable_Indirect::BuildTable(OBL_Parser*)
(OBL_CursorTable_Indirect::BuildTable(OBL_Parser*) + 60)
 #2   0x004710f8 in OBL_Cursor::BuildCursorTable()
(OBL_Cursor::BuildCursorTable() + 48)
 #3   0x00470b08 in OBL_Cursor::Execute() (OBL_Cursor::Execute() + 76)
 #4   0x0045e818 in VDK_Cursor::ExecuteSql_WithNoUnion(char const*)
(VDK_Cursor::ExecuteSql_WithNoUnion(char const*) + 60)

PPC Thread State:
  srr0: 0x004b5888 srr1: 0x0000f030                vrsave: 0x00000000
    cr: 0x44022442  xer: 0x00000007   lr: 0x004b59f0  ctr: 0x900011c0
    r0: 0x004b59f0   r1: 0xbfffe3e0   r2: 0x00002ca0   r3: 0x00000000
    r4: 0x01118400   r5: 0x00521830   r6: 0x0052692c   r7: 0x00000001
    r8: 0x00000008   r9: 0x00000002  r10: 0x0000030e  r11: 0x00000000
   r12: 0x00000001  r13: 0x00000000  r14: 0x00000000  r15: 0x00000001
   r16: 0x00000001  r17: 0x00000000  r18: 0x00528640  r19: 0x00528638
   r20: 0x00000001  r21: 0x01118390  r22: 0x00000000  r23: 0xbfffe440
   r24: 0x01118624  r25: 0x0051575c  r26: 0x00000002  r27: 0x00521838
   r28: 0x00000002  r29: 0x00000000  r30: 0x01118610  r31: 0x004b575c

___________________________________________________________________

 Eric Forget                       Cafederic
 ForgetE at cafederic.com             <http://www.cafederic.com/>

 Fingerprint <86D5 38F5 E1FD 5D9C 71C3  BAA3 797E 70A4 6210 C684>




More information about the Valentina mailing list