?
Solved

Stack Overflow Exception

Posted on 2005-05-04
3
Medium Priority
?
377 Views
Last Modified: 2010-04-23
I receive a stack overflow exception with the following code.  The file being openned is 120mb.

        Dim b() As Byte
        Dim bfile As Integer
        bfile = FreeFile()
        FileOpen(bfile, ZipFile, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)

        ReDim b(LOF(bfile) - 1)
        FileGet(bfile, b)
        FileClose(bfile)
0
Comment
Question by:shawnlehner
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
doobdave earned 1000 total points
ID: 13933892
Hi,
does the exception occur on the line where you open the file?
FileOpen(bfile, ZipFile, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared) ' <--

If so, try running task manager as you step through the code and see how much memory you have available on your machine.

Is this the only thing that your app is doing at that moment? If not, try to isolate that code block and run it on its own in a separate app and see if the problem still occurs.

Let me know if this helps or not,

David
0
 
LVL 4

Author Comment

by:shawnlehner
ID: 13941234
checked memory usage... i think its a variable problem
0
 
LVL 8

Expert Comment

by:doobdave
ID: 13958842
Hi,

can I ask why you gave me a grade C?

Please read the help section:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/help.jsp#hs3

subheading: "Grade quickly and fairly"

If you found the answer to your question by yourself, then maybe you could have asked to delete the question, otherwise, if my comment help you in the right direction without giving you the full solution, you should probably have given a B.

Best Regards,

David
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question