Subject | Re: [IBO] Integer Overflow Exception |
---|---|
Author | Robert Wagner |
Post date | 2006-03-14T08:50:49Z |
Hi Helen,
Helen Borrie schrieb:
from the old into the new database.
I just rechecked the database properties with IB_SQL:
ODS 10.1, page size 4096, dialect 3
the exception class is EIntOverflow.
in the message. I am pretty sure that it is a Delphi message and not a
message coming from the database.
Many thanks in advance.
Robert Wagner
Stack trace explanations:
- M.exe is my application,
- TdmSaveLoad.GetAnzWerteMessdauer is a procedure which basically does
execute the statement below:
t1.messdauer is defined as double porecision
and t1.abtastrate is an integer
Stmt := 'select t1.MESSDAUER, t1.ABTASTRATE from t2 ' +
'join t1 on t1.SYS_PK = t2.FK_MESSUNG_1 ' +
'where t2.SYS_PK = ' + IntToStr (FK_Messung2);
with qryTmp do begin
Close;
SQL.Clear;
SQL.Text := Stmt;
Open;
if (EOF) then begin
Messdauer := 0;
AnzWerte := 0;
end
else begin
Messdauer := FieldByName ('MESSDAUER').AsFloat;
AnzWerte := Trunc (FieldByName ('ABTASTRATE').AsFloat *
Messdauer);
end;
Close;
end;
Stack trace:
exception class : EIntOverflow
exception message : Integerüberlauf.
main thread ($d24):
M.exe IBODataset 3242 TIBODataset.InternalGetFieldData
M.exe IBODataset 3220 TIBODataset.GetFieldData
M.exe Db TDataSet.GetFieldData
M.exe Controls TWinControl.MainWndProc
M.exe Forms StdWndProc
user32.dll WCSToMBEx
user32.dll DefWindowProcA
user32.dll CallWindowProcA
M.exe Controls TWinControl.DefaultHandler
M.exe Forms TCustomForm.DefaultHandler
M.exe Controls TControl.WndProc
M.exe Controls TWinControl.WndProc
M.exe Forms TCustomForm.WndProc
M.exe Controls TWinControl.MainWndProc
M.exe Forms StdWndProc
M.exe Controls TControl.WndProc
M.exe Controls TWinControl.WndProc
M.exe Forms TCustomForm.WndProc
M.exe Controls TWinControl.MainWndProc
M.exe Forms StdWndProc
M.exe System @TryFinallyExit
M.exe System SysGetMem
M.exe System @GetMem
user32.dll CallWindowProcW
M.exe System @TryFinallyExit
M.exe System SysGetMem
M.exe System @GetMem
M.exe Controls TControl.WndProc
user32.dll CallWindowProcA
M.exe Controls TWinControl.DefaultHandler
M.exe Forms TCustomForm.DefaultHandler
M.exe Forms TCustomForm.WMGetMinMaxInfo
M.exe Controls TControl.WndProc
M.exe Controls TWinControl.WndProc
user32.dll CallWindowProcA
WS2_32.dll recv
M.exe System @TryFinallyExit
M.exe System SysGetMem
M.exe System @GetMem
M.exe System @TryFinallyExit
M.exe System SysGetMem
M.exe System @TryFinallyExit
M.exe System SysGetMem
M.exe IB_Components 26709 TIB_Dataset.SysFetchNext
M.exe IBODataset 6198 TIBODataset.GetRecord
M.exe Db TDataSet.GetNextRecord
M.exe Db TDataSet.GetNextRecord
M.exe Db TField.GetData
M.exe Db TFloatField.GetAsFloat
M.exe SaveLoad 857 TdmSaveLoad.GetAnzWerteMessdauer
Helen Borrie schrieb:
>The database was created from scratch and after that the data was pumped
> At 09:45 AM 14/03/2006, you wrote:
> >Hi there,
> >
> >I converted a BDE / FB 1.51 (Dialect 1) application to IBO 4.6.A / FB
> >1.53 (Dialect 3).
>
> Are you sure you converted the database? To make a dialect 1
> database into a dialect 3 database, you would need to recreate the
> database in dialect 3 and pump the data. If you merely restored a
> backup, and/or used gfix to change the dialect, the data are *not*
> converted from dialect 1 to dialect 3.
from the old into the new database.
I just rechecked the database properties with IB_SQL:
ODS 10.1, page size 4096, dialect 3
> >The application used one TDatabase and many TQuery objects in aThe exact message is: 'Integerüberlauf' (which means: integer overflow),
> >DataModule
> >which were converted to their TIOBDataBase and TIBOQuery equivalents.
> >The queries do nothing fancy, mainly selects and some parametrized
> >insert / update statements.
> >
> >At first glance the application seemed to work as well as before, but
> >after a longer test period the exception 'Integer overflow' occurred
> >while
> > saving data to the database.
>
> What is the exact message?
the exception class is EIntOverflow.
> >The exception always occurs in line 3242 in unitMessage text is above, there are no additional numbers or any other text
> >IBODataSet.InternalGetFieldData at the following statement:
> >
> > tmpData := pointer( longint( ARecBuf ) +
> > longint( SQLData ) -
> > longint( InternalDataset.Fields.RowBuffer ));
> >
> >This function is called by TIBODataset.GetFieldData, line 3220 in
> >IBODataSet.
> >
> >The exception does not always occur after saving the same amount of
> >data.
> >Sometimes it occurs after saving ten times, sometimes I can save fifty
> >or more times
> >data to the database, but sooner or later the exception occurs.
> >
> >Does anybody have a clue, why the 'Integer Overflow' exception is raised
> >by IBODataSet?
>
> First, let's be clear whether the message is coming from Delphi or
> from the database. Report the exact message, including its identfier
> and any numbers you see in the message output.
in the message. I am pretty sure that it is a Delphi message and not a
message coming from the database.
> >I am using Delphi 5 and IBO 4.6.A. As already said, I use FB 1.53Stack Trace is below my signature.
> >(SuperServer). The database is dialect 3.
>
> The symptoms you describe seem, on the surface, more like a mismatch
> between the client dialect and the data stored in the database so,
> e.g., you are going to get overflow of fixed numerics at a much lower
> precision than if the data were in the format that the client
> interface expects.
>
> >If it helps I can provide a (madExcept) stack trace of the situation
> >when the exception is raised.
>
> Could be useful if you are able to eliminate the causes mentioned above.
>
> Helen
Many thanks in advance.
Robert Wagner
Stack trace explanations:
- M.exe is my application,
- TdmSaveLoad.GetAnzWerteMessdauer is a procedure which basically does
execute the statement below:
t1.messdauer is defined as double porecision
and t1.abtastrate is an integer
Stmt := 'select t1.MESSDAUER, t1.ABTASTRATE from t2 ' +
'join t1 on t1.SYS_PK = t2.FK_MESSUNG_1 ' +
'where t2.SYS_PK = ' + IntToStr (FK_Messung2);
with qryTmp do begin
Close;
SQL.Clear;
SQL.Text := Stmt;
Open;
if (EOF) then begin
Messdauer := 0;
AnzWerte := 0;
end
else begin
Messdauer := FieldByName ('MESSDAUER').AsFloat;
AnzWerte := Trunc (FieldByName ('ABTASTRATE').AsFloat *
Messdauer);
end;
Close;
end;
Stack trace:
exception class : EIntOverflow
exception message : Integerüberlauf.
main thread ($d24):
M.exe IBODataset 3242 TIBODataset.InternalGetFieldData
M.exe IBODataset 3220 TIBODataset.GetFieldData
M.exe Db TDataSet.GetFieldData
M.exe Controls TWinControl.MainWndProc
M.exe Forms StdWndProc
user32.dll WCSToMBEx
user32.dll DefWindowProcA
user32.dll CallWindowProcA
M.exe Controls TWinControl.DefaultHandler
M.exe Forms TCustomForm.DefaultHandler
M.exe Controls TControl.WndProc
M.exe Controls TWinControl.WndProc
M.exe Forms TCustomForm.WndProc
M.exe Controls TWinControl.MainWndProc
M.exe Forms StdWndProc
M.exe Controls TControl.WndProc
M.exe Controls TWinControl.WndProc
M.exe Forms TCustomForm.WndProc
M.exe Controls TWinControl.MainWndProc
M.exe Forms StdWndProc
M.exe System @TryFinallyExit
M.exe System SysGetMem
M.exe System @GetMem
user32.dll CallWindowProcW
M.exe System @TryFinallyExit
M.exe System SysGetMem
M.exe System @GetMem
M.exe Controls TControl.WndProc
user32.dll CallWindowProcA
M.exe Controls TWinControl.DefaultHandler
M.exe Forms TCustomForm.DefaultHandler
M.exe Forms TCustomForm.WMGetMinMaxInfo
M.exe Controls TControl.WndProc
M.exe Controls TWinControl.WndProc
user32.dll CallWindowProcA
WS2_32.dll recv
M.exe System @TryFinallyExit
M.exe System SysGetMem
M.exe System @GetMem
M.exe System @TryFinallyExit
M.exe System SysGetMem
M.exe System @TryFinallyExit
M.exe System SysGetMem
M.exe IB_Components 26709 TIB_Dataset.SysFetchNext
M.exe IBODataset 6198 TIBODataset.GetRecord
M.exe Db TDataSet.GetNextRecord
M.exe Db TDataSet.GetNextRecord
M.exe Db TField.GetData
M.exe Db TFloatField.GetAsFloat
M.exe SaveLoad 857 TdmSaveLoad.GetAnzWerteMessdauer