delphi - Access Violation in NTDLL using IXMLDocument -


i continually access violation @ read of address 0xfeeefeee debugger stops on ntdll.ntraiseexception, can not debug further loop condition telling me app has faulted @ ... use step or run... , takes me beginning. happens in ide (delphi xe2) 32 bit. application using following bits of code

var   xmldoc: ixmldocument;  begin    if fod.execute //file open dialog    begin     try        try          xmldoc := newxmldocument(); //txmldocument.create(nil);          result := fod.filename;          xmldoc.filename := xmlfilename;          xmldoc.active := true; 

when file opens call functions loaded xml data binding wizard (file new other xml) parse xml file opened in proc above. intent create csv file , use sqlldr export data oracle database. outside of ide works find, , can leave application running showing data in sring grid overnight in ide crashes within minutes. call stack shows me nothing usefull. can see have tried txmdocument.create, newxml no avail. have tried putting object on form , using instance no avail. please have ideas. (windows 7 64 bit, complining 32 bit due oracle depenancies)

edit, call stack debug dcus switched on shows nothing of use references ole32.dll , other nt related dlls

the code app shown below (some of it)

function txmlform.openfile: string; var   xmldoc: ixmldocument; begin   if fod.execute   begin     try       try         xmldoc := newxmldocument(); //txmldocument.create(nil);         result := fod.filename;         xmldoc.filename := xmlfilename;         xmldoc.active := true;         sb1.panels[1].text := fod.filename;               // xmldoc := nil;       end;     except       on e: exception         showmessage('excpetion in opening or creating xml document. ' + e.message);     end;   end   else     result := ''; end; 

the openfile called type of procedure

procedure txmlform.standardprofile1click(sender: tobject); var   stand: standard.ixmlprofiledata;   i, x: integer; begin   xmlfilename := openfile;   if xmlfilename <> ''   begin     stand := standard.loadprofiledata(xmlfilename);     sg1.rowcount := stand.count;     sg1.colcount := stand.device[stand.count - 1].count + 7;     // sg1.colcount := 55;     sg1.cells[0, 0] := 'serialno';     sg1.cells[1, 0] := 'mfgserialno';     sg1.cells[2, 0] := 'supplytype';     sg1.cells[3, 0] := 'servicepointno';     sg1.cells[4, 0] := 'parametercode';     sg1.cells[5, 0] := 'intervalperiod';     sg1.cells[6, 0] := 'starttime';     // x := 0 47     // sg1.cells[7 + x, 0] := 'interval' + inttostr(x);     x := 0 stand.device[stand.count - 1].count - 1       sg1.cells[7 + x, 0] := 'interval' + inttostr(x);      := 0 stand.count - 1     begin       sg1.cells[0, + 1] := stand.device[i].serialno;       sg1.cells[1, + 1] := stand.device[i].mfgserialno;       sg1.cells[2, + 1] := stand.device[i].supplytype;       sg1.cells[3, + 1] := stand.device[i].servicepointno;       sg1.cells[4, + 1] := stand.device[i].parametercode;       sg1.cells[5, + 1] := stand.device[i].intervalperiod;       sg1.cells[6, + 1] := stand.device[i].starttime;       // x := 0 47       x := 0 stand.device[stand.count - 1].count - 1 // 47        begin         if stand.device[i].interval[x] = ''           sg1.cells[7 + x, + 1] := 'true'         else           sg1.cells[7 + x, + 1] := stand.device[i].interval[x];       end;     end;   end; end; 

as stated before have tried using txmdocument, ixmldocument , using create , newxmdocument still gives errors. debug dcus' makes no difference. have tired using fastmm4 in project header , madexcept don't catch error.

you don't show code handling xmldoc; maybe you're freeing it?

"when txmldocument created without owner, behaves interfaced object. is, when references interface released, txmldocument instance automatically freed. when txmldocument created owner, however, behaves other component, , freed owner." see delphi - txmldocument created @ run-time generates av, component on form working

also when done with, set xmldoc := nil;


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -