Crash on AddRecord

Francois Van Lerberghe fvanlerberghe at freegates.be
Fri Apr 20 16:25:39 CDT 2012


Hi Ruslan,

Indeed, the table in witch I want to insert the record have one method field
that use LOCATE() function :
    LOCATE(Category,'ASEDPTO')

This field is created like this (class way) :
    sortedCat = new VByte("Category order",
                          EVFLag.fNone,
                          "LOCATE(Category,'ASEDPTO')" )

The field ³Category² is included in the cursor, but not the method field
"Category order" that use it.
I haven¹t any method field in the cursor.

Basically, my method is used to add one record from one database to another.
The pseudo code is :
- open the ³From² database (done at the beginning of the application)
- open the ³To² database
- check witch records from the ³From² database are missing in the ³To²
database
- for each missing record
    - create a cursor with all fields, except method fields, + RecID from
the ³From² DB
    - create the ³To² cursor to add the record in the ³To² DB.
    this cursor have the exact same fields that the ³from² cursor
    - copy each fields from fromCursor to toCursor
    - ToCursor.AddRecord  <-- crash

I¹ve initialized the Valentina engine with 21 Mb cache.
The databases are in 4 files

The crash occur in one table, for one record only (in this table, I must
insert 6 records).
I¹ve tried to exclude this record. The 5 other records are inserted without
problem...
But now, in another table in witch I¹ve also a method field using LOCATE(),
the crash occur at the 3d inserted record (no problem with the previous)

I¹ve cloned the ToDB, inserting all its records from all tables in a fresh
newly created database.
No problem during the inserts.
Now, IŒve tried to use this new database as the ³To² database. Same crash
:-(

And this crash only with V4RB 4.8, 4.9 and 5.
The crash does NOT occur with V4RB 4.3

François Van Lerberghe
Rue Thier Monty, 15 A
4570 Marchin
Belgique


le 20/04/12 21:30, Ruslan Zasukhin <ruslan_zasukhin at valentina-db.com> a
écrit :

> Crash logs show crash neear to ENode_Func_Locate
> 
> This means something with LOCATE() function happens.
> You have some METHOD which this function.
> 
> Also not clear why CURSOR, which you going to use for AddRcords()
> Contains a METHOD field, which is read only.
> 
> Please check this METHOD and try remove it from cursor ..
> 
> If this helps let us know.
> Anyway not good that in crashes in such case also.
> READ ONLY method should just do nothing on AddRecord()
> Even if you specify them in cursor ... Just no sense



More information about the Valentina mailing list