May be like this ?
Thanks.
Laco.

On Thu, 2011-06-09 at 11:49 +0200, LacaK wrote:
Here is attached debug output with {$DEFINE DSDebug}.
It seems, that exception is related to Append/Insert (it does not depend if dataset is empty before or not) followed by accesing OldValue

Can't you just post the backtrace?
Joost.


Program received signal SIGSEGV, Segmentation fault.
0x0045c772 in GETFIELDISNULL (NULLMASK=0x0, X=1)
    at 
C:/Programy/lazarus/fpc/2.5.1/source/packages/fcl-db/src/base/bufdataset.pas:686
686       result := ord(NullMask[x div 8]) and (1 shl (x mod 8)) > 0

(gdb) backtrace
#0  0x0045c772 in GETFIELDISNULL (NULLMASK=0x0, X=1)
    at 
C:/Programy/lazarus/fpc/2.5.1/source/packages/fcl-db/src/base/bufdataset.pas:686
#1  0x0045f085 in TCUSTOMBUFDATASET__GETFIELDDATA (FIELD=0x6200c4, 
    BUFFER=0x16bdc00, this=<error reading variable>)
    at 
C:/Programy/lazarus/fpc/2.5.1/source/packages/fcl-db/src/base/bufdataset.pas:1797
#2  0x0045efe6 in TCUSTOMBUFDATASET__GETFIELDDATA (FIELD=0x6200c4, 
    BUFFER=0x16bdc00, NATIVEFORMAT=true, this=<error reading variable>)
    at 
C:/Programy/lazarus/fpc/2.5.1/source/packages/fcl-db/src/base/bufdataset.pas:1766
#3  0x00433441 in TFIELD__GETDATA (BUFFER=0x16bdc00, NATIVEFORMAT=true, 
    this=<error reading variable>)
    at 
C:/Programy/lazarus/fpc/2.5.1/source/packages/fcl-db/src/base/fields.inc:566
#4  0x00433389 in TFIELD__GETDATA (BUFFER=0x16bdc00, 
    this=<error reading variable>)
    at 
C:/Programy/lazarus/fpc/2.5.1/source/packages/fcl-db/src/base/fields.inc:551
#5  0x00434c68 in TSTRINGFIELD__GETVALUE (AVALUE=0x0, 
    this=<error reading variable>)
    at 
C:/Programy/lazarus/fpc/2.5.1/source/packages/fcl-db/src/base/fields.inc:1102
#6  0x00434a98 in TSTRINGFIELD__GETASVARIANT (this=<error reading variable>, 
    result=...)
    at 
C:/Programy/lazarus/fpc/2.5.1/source/packages/fcl-db/src/base/fields.inc:1066
#7  0x00433036 in TFIELD__GETOLDVALUE (this=<error reading variable>, 
    result=...)
    at 
C:/Programy/lazarus/fpc/2.5.1/source/packages/fcl-db/src/base/fields.inc:474
#8  0x00401cde in TTESTOLDVALUE__SHOW (MSG=0x46e3c0 'Before ApplyUpdates', 
    FIELD=0x6200c4, this=<error reading variable>) at testOldValue.pas:128
#9  0x00401840 in TTESTOLDVALUE__DORUN (this=<error reading variable>)
    at testOldValue.pas:71
#10 0x0042b124 in CUSTAPP_TCUSTOMAPPLICATION_$__RUN ()
#11 0x00401f62 in main () at testOldValue.pas:163
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to