Link to home
Start Free TrialLog in
Avatar of halfondj
halfondj

asked on

'Out of String Space' error - How do I fix this problem?

I'm currently trying to debug an application written by someone else.  When parsing a large XML file, an error message displays saying 'Out of String Space'.  I found in the program a lot of dead code, as well as unused variables.  After commenting that out, the file parsing got further, but I'm still getting an 'Out of String Space' error.

Where do I go from here?  How does one debug this kind of problem?

It's quite important that I rectify this problem ASAP, as the software has to be released into production soon.

Thanks.
Avatar of dfiala13
dfiala13

For reference:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vamsgOutOfStrSpace.asp

Since you seem to be able to read part of the file, I am guessing that the file wasn't created in UNIX.  VB can choke when reading files with an newline character it doesn't recognize (in other words it tries to read the whole file).

Strings are messy memory hogs.  Are you parsing the XML using your own string functions or are you using the Microsoft XML tools (MSXML)?  


Avatar of halfondj

ASKER

To dfiala13:  Thanks for the reply.  Unfortunately, the MS web page was of no help - I've seen it before.

>>  Are you parsing the XML using your own string functions or are you using the Microsoft XML tools (MSXML)?
The component object is being used - MSXML2.DOMDocument.
ASKER CERTIFIED SOLUTION
Avatar of dfiala13
dfiala13

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I just started debugging the program today and haven't gotten very familiar with it, but from what I know so far, a very large XML file is read into memory via DOM and the file is parsed for specific information.  I'm not too sure with what results from parsing the file.  I think an Access database is populated and other processing occurs - what, I don't know yet.  On Monday, I will continue to review the code with my co-worker [who is more familiar with the code than I am] and will provide EE with more information.

Before Monday, I am trying to get ideas to what could be done to make the code more efficient.  Your idea of using SAX was certainly a good start.

Is it difficult to convert an application using DOM to SAX?

Thanks again.
It shouldn't be, just a different way of thinking about the problem.  Hard to tell exactly what issues you might face without seeing the code.
We're reviewing the code now and will probably look into using SAX.

Thanks.