Subject AW: [IBO] invalid block type encountered (147)
Author Rolf Bredemeier
Hi Helen,



>> With ib_query1.ib_transaction do
>> begin
>> if not (Started and InTransaction) then
>> StartTransaction;
>> end;



thanks for reply!

I sended today some screenshots from callstack Delphi to Jason.

Perhaps he can figure out, what mistake i made.



Rolf



Von: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] Im Auftrag von Helen Borrie
Gesendet: Mittwoch, 22. Juni 2011 04:41
An: IBObjects@yahoogroups.com
Betreff: Re: [IBO] invalid block type encountered (147)





At 08:14 PM 21/06/2011, you wrote:
>Hi all,
>
>in Firebird 2.5.0 is a bug:
>http://firebird.1100200.n4.nabble.com/FB-Tracker-Created-CORE-3389-isc-dsql-exec-immed2-with-ze
r
>o-transaction-handle-could-lead-to-a-BUGCH-td3382984.html
>
>In short: caused by an invalid transaction handle.
>
>Before i updated to IBO v.4.9.14 i never had any trouble with this bug.
>But now, our server recently chrashes with log entry:
>internal Firebird consistency check (invalid block type encountered (147), file: exe.cpp line:
>1010)
>
>I could not figure out why. a little indication my be following scenario:
>- open a query
>- fetch records
>- while processing data, an error occurs, for example divide by zero
>- the query is NOT closed (missing try-except block in my application)
>- then application shows error window, the user click ok and continue with work
>- then the same query is used in an other procedure:
>- qry.close
>- qry.sql.text='...'
>- qry.open ---> crash!
>
>But i'am not sure. It's hard to simulate.
>
>The only way to fix was an update to firebird 2.5.1. in this version, the bug CORE-3389 is
>fixed.
>With that update, no errors anymore.
>
>Is there someone with similar effects?
>It there a way, to check before executiong a query for valid transaction handle?

Maybe this?

With ib_query1.ib_transaction do
begin
if not (Started and InTransaction) then
StartTransaction;
end;

Helen





[Non-text portions of this message have been removed]