[fpc-devel] XML Stream capacity
I'm using fcl-xml to parse a XML data from a TMemoryStream/TStringStream and noted it can parse streams with a maximum capacity of 4096 bytes, why can't it receive bigger streams?. The maximum capacity is defined in the constructor of TXMLStreamInputSource, in XMLRead.pp. --- constructor TXMLStreamInputSource.Create(AStream: TStream; AOwnStream: Boolean); begin FStream := AStream; FCapacity := 4096; <-- here's the max capacity allowed ... --- My testing code is this: var lDoc: TXMLDocument; lStr: TStringStream; begin lStr := TStringStream.Create(Memo1.Text); lDoc := TXMLDocument.Create; try ReadXMLFile(lDoc, lStr); finally lDoc.Free; lStr.Free; end; end. Leonardo M. Ramé http://leonardorame.blogspot.com ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] XML Stream capacity
Leonardo M. Ramé wrote: I'm using fcl-xml to parse a XML data from a TMemoryStream/TStringStream and noted it can parse streams with a maximum capacity of 4096 bytes, why can't it receive bigger streams?. The maximum capacity is defined in the constructor of TXMLStreamInputSource, in XMLRead.pp. This value has nothing to do with total possible stream size, it is only the size of buffer used while reading. The maximum size of XML data that can be read with DOM on a 32-bit machine is about 40 to 150 MBytes (depending on the data structure). Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] XML Stream capacity
Thanks Sergey. I tought that was why my program was stopping with an assertion in procedure TNodePool.AddExtent of dom.pp, the assertion dissapears when I work with smaller XML files. BTW: the file worked with older versions of fcl-xml, now I'm using the trunk version because it no longer deppends on AVL_Tree, that wasn'n thread safe. I attached the file I'm using for testing. Leonardo M. Ramé http://leonardorame.blogspot.com --- On Thu, 1/14/10, Sergei Gorelkin wrote: > From: Sergei Gorelkin > Subject: Re: [fpc-devel] XML Stream capacity > To: "FPC developers' list" > Date: Thursday, January 14, 2010, 12:51 PM > Leonardo M. Ramé wrote: > > I'm using fcl-xml to parse a XML data from a > TMemoryStream/TStringStream and noted it can parse streams > with a maximum capacity of 4096 bytes, why can't it receive > bigger streams?. > > > > The maximum capacity is defined in the constructor of > TXMLStreamInputSource, in XMLRead.pp. > > > This value has nothing to do with total possible stream > size, it is only the size of buffer used while reading. > The maximum size of XML data that can be read with DOM on a > 32-bit machine is about 40 to 150 MBytes (depending on the > data structure). > > Sergei > ___ > fpc-devel maillist - fpc-devel@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-devel > 283355 2009-10-15 08:20:00 2009-10-15 08:39:00 A MAMCH22S - ELSCINT CR 18682009 U 1947-08-04 D.N.I. 18682009 2 340601 2009-10-17 08:20:00 ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] ODBC
On 12 Jan 2010, at 19:12, Thomas Nelson wrote: > I seem to have come across a minor problem and don’t know how to fix it. > > Utilizing the \examples\odbc\testodbc.pp module with FPC 2.2.4 everything > compiles fine > > When I upgraded to FPC 2.4.0 I get an error message (please see attached > screen shot) > > Which says “Import Library not found for ODBC” – this results in a fatal > error. Try using the odbcsqldyn unit instead of the odbcsql unit. In r13495, a {$linklib odbc} statement was added for the latter unit, which presumably requires the presence of an import library on Windows. Jonas___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] ODBC
On Thu, 14 Jan 2010, Jonas Maebe wrote: On 12 Jan 2010, at 19:12, Thomas Nelson wrote: I seem to have come across a minor problem and don’t know how to fix it. Utilizing the \examples\odbc\testodbc.pp module with FPC 2.2.4 everything compiles fine When I upgraded to FPC 2.4.0 I get an error message (please see attached screen shot) Which says “Import Library not found for ODBC” – this results in a fatal error. Try using the odbcsqldyn unit instead of the odbcsql unit. In r13495, a {$linklib odbc} statement was added for the latter unit, which presumably requires the presence of an import library on Windows. Indeed. If you do, do not forget to call InitialiseODBC; before you do anything ODBC related. Michael.___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] XML Stream capacity
Leonardo M. Ramé wrote: Thanks Sergey. I tought that was why my program was stopping with an assertion in procedure TNodePool.AddExtent of dom.pp, the assertion dissapears when I work with smaller XML files. BTW: the file worked with older versions of fcl-xml, now I'm using the trunk version because it no longer deppends on AVL_Tree, that wasn'n thread safe. I attached the file I'm using for testing. Does r14644 solve the problem? Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] XML Stream capacity
Yes!, thank you very much Sergei. Leonardo M. Ramé http://leonardorame.blogspot.com --- On Thu, 1/14/10, Sergei Gorelkin wrote: > From: Sergei Gorelkin > Subject: Re: [fpc-devel] XML Stream capacity > To: "FPC developers' list" > Date: Thursday, January 14, 2010, 2:24 PM > Leonardo M. Ramé wrote: > > Thanks Sergey. > > > > I tought that was why my program was stopping with an > assertion in procedure TNodePool.AddExtent of dom.pp, the > assertion dissapears when I work with smaller XML files. > > > > BTW: the file worked with older versions of fcl-xml, > now I'm using the trunk version because it no longer > deppends on AVL_Tree, that wasn'n thread safe. > > > > I attached the file I'm using for testing. > > > Does r14644 solve the problem? > > Sergei > > ___ > fpc-devel maillist - fpc-devel@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-devel > ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] Damaged .ppu problem
Hello people, I've discovered that (at least on win32) the compiler (2.2.2 and 2.4.0) refuse to overwrite an invalid PPU file. It just stops. One typical case is when PPU creation had previously failed due to disk problems (e.g. out of room) or compilation abort, whatever, resulting in 0-size ppu file(s). In such case I have to find and manually delete the damaged ppu files, or otherwise compilation fails. This is somewhat inconvenient. I don't have a patch, sorry. Should I fill some bugreport? Nikolai ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Damaged .ppu problem
Nikolai Zhubr schrieb: > Hello people, > > I've discovered that (at least on win32) the compiler (2.2.2 and 2.4.0) > refuse to overwrite an invalid PPU file. It just stops. > > One typical case is when PPU creation had previously failed due to disk > problems (e.g. out of room) or compilation abort, whatever, resulting in > 0-size ppu file(s). In such case I have to find and manually delete the > damaged ppu files, or otherwise compilation fails. This is somewhat > inconvenient. I don't have a patch, sorry. Should I fill some bugreport? I don't think that people will be happy if the compiler just deletes their ppus if it can't read it for any reason. The compiler cannot know if it can recreate the ppu when it deletes it. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] RE: ODBC
Thank you all very much – Making the changes you suggested fixed my problems. Back to work now :) Thomas Nelson Director Information Technology, Information Systems CoxHealth thomas.nel...@coxhealth.com Phone: (417) 269-8961 Mobile: (417) 459-3528 Fax: (417) 269-2133 CoxHealth – a Top 100 Integrated Health Care Network CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. _ From: Thomas Nelson Sent: Tuesday, January 12, 2010 13:13 To: 'fpc-devel@lists.freepascal.org' Subject: ODBC All, I seem to have come across a minor problem and don’t know how to fix it. Utilizing the \examples\odbc\testodbc.pp module with FPC 2.2.4 everything compiles fine When I upgraded to FPC 2.4.0 I get an error message (please see attached screen shot) Which says “Import Library not found for ODBC” – this results in a fatal error. This is on Windows XP system After doing the basic compiler install, I updated that with the base_w32_v24.zip file (for the rtl) and the fpc.2.4.1.i386-win32.zip to get the latest updates. I am sure I missed something somewhere, can you point me in the proper direction – have I missed something somewhere? << OLE Object: Picture (Device Independent Bitmap) >> Thanks for all your help Tom ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Damaged .ppu problem
I don't think that people will be happy if the compiler just deletes their ppus if it can't read it for any reason. The compiler cannot know if it can recreate the ppu when it deletes it. Can't it just be made to treat a damaged/unreadable ppu in the same way as an outdated or incompatible (afaict fpc already has ways to deal with ppus that are from the wrong compiler version or built with the wrong version of a unit they depend on) ppu? ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Damaged .ppu problem
15.01.2010 0:01, Florian Klaempfl: I don't think that people will be happy if the compiler just deletes their ppus if it can't read it for any reason. The compiler cannot know if it can recreate the ppu when it deletes it. Well, when a user asks compiler to compile, doesn't it also mean "and whichever intermediate file(s) are wrong or missing, try to (re-)create them automatically"? What's the point of being so carefull about unreadable PPUs? If a user have some very important PPUs s/he care about, then s/he could: - set read-only file permissions for these PPUs, - move source files away from these PPUs to avoid auto recompilation, - make backups as necessary. Nikolai ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] Damaged .ppu problem
Nikolai Zhubr schrieb: > 15.01.2010 0:01, Florian Klaempfl: >> I don't think that people will be happy if the compiler just deletes >> their ppus if it can't read it for any reason. The compiler cannot know >> if it can recreate the ppu when it deletes it. > > Well, when a user asks compiler to compile, doesn't it also mean > "and whichever intermediate file(s) are wrong or missing, try to > (re-)create them automatically"? > > What's the point of being so carefull about unreadable PPUs? Simply because it means that something really strange happened. Maybe it is only a wrong compiler version but it could be also a corrupted file system and then starting to delete files is really bad. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel