Page 1 of 1
TOraLoader Error
Posted: Mon 13 May 2013 18:46
by jdredd
Using Delphi 7
Version of ODAC is 7.0.0.3
Application is processing about 160,000 small blobs (4-8k each) into a simple table.
This seems to happen once its finished.
Exception EAssertionFailed in module imguu.exe at 001369F0.
TOraLob.Free RefCount = 0 (D:\Projects\Delphi\Dac\Common\Source\MemData.pas, line 8006).
I got the 8.0.2 update, and same error about the MemData ... Any ideas?
Re: TOraLoader Error
Posted: Tue 14 May 2013 09:46
by AlexP
Hello,
You are using an obsolete ODAC version, please try to reproduce the problem on the latest trial ODAC version 9.0.1
http://www.devart.com/odac/download.html , and if the problem repeats, contact us again.
Re: TOraLoader Error
Posted: Thu 16 May 2013 08:09
by jdredd
Thanks AlexP, instead of getting trial, I just had work pay for a license renewal with
source code this time around. Once I receive it, ill rerun my tests and maybe see
where the error is happening in the ODAC code, and report back.
Re: TOraLoader Error
Posted: Fri 17 May 2013 20:39
by jdredd
9.0.1 with source code installed now, still getting the error.
---------------------------
Application Error
---------------------------
Exception EAssertionFailed in module Mapmate.exe at 00139AF8.
TOraLob.Free RefCount = 0 (C:\Program Files\Devart\Odac for Delphi 7\Source\MemData.pas, line 8143).
---------------------------
OK
---------------------------
It is error out in the procedure TSharedObject.Free;
Re: TOraLoader Error
Posted: Fri 17 May 2013 21:44
by jdredd
After looking at where it was actually error out at and thinking about it,
I looked at our code, and found the problem, i think.
After setting the blob in the OraTable
this was being called
oratable1.Getblob('imageblob').release;
I changed it over to
oratable1.Getblob('imageblob').FreeBlob;
And no more error now.
Does this look correct?
start of loop...
..
oratable1.Edit;
oratable1.Getblob('imageblob').LoadFromFile(fn); // load file into blob
oratable1.Post;
oratable1.GetBlob('imageblob').FreeBlob; // free the blob that was loaded
..
end of loop..
Re: TOraLoader Error
Posted: Wed 22 May 2013 13:18
by AlexP
Hello,
You don't need to call the release and FreeBlob methods, since clearing will be performed on closing DataSet. If you want to reduce memory using when working with LOB fields, you should set the DeferredLobRead property to True in DataSet and use a separate parametrized query for data editing, and clear the BLOB parameter in this query
Re: TOraLoader Error
Posted: Wed 18 Sep 2013 19:00
by jdredd
What if you don't close your dataset until 1,000,000+ blob posts in a row?
It appeared the freeblob call did not work fully and eventually leaks
enough to error out with memory issues.
Would you recommend to just open/close the dataset after each post?
Re: TOraLoader Error
Posted: Thu 19 Sep 2013 09:08
by AlexP
Hello,
As I wrote you earlier, to decrease memory, you should use parametrized queries in separate OraQueries to insert large amounts of data
Re: TOraLoader Error
Posted: Wed 04 Jun 2014 15:13
by jdredd
Revisiting this one... its been awhile.
AlexP wrote:As I wrote you earlier, to decrease memory, you should use parametrized queries in separate OraQueries to insert large amounts of data
I am unsure what you mean exactly by this?
Instead of using a Table object, use a query object instead?
If so, what would be the proper method to string that up and get the blob into the query insert and then insure the memory usage doesn't go crazy.
Just upgraded to 9.3.9 on D7
Re: TOraLoader Error
Posted: Thu 05 Jun 2014 07:24
by AlexP
If you insert data using the methods INSERT..POST, then data is stored in an open DataSet. Therefore you get an Out of Memory error at a large volumes of data. If you insert data using the INSERT INTO .... DML queryб the data will be inserted to a table on the server and won't accumulate in the DataSet.