Results 1 to 13 of 13

Thread: Out of memory

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    UK
    Posts
    506

    Out of memory

    Can someone please have a look at the project attached, it's a file transfer program I've been working on. When transferring larger files (around > 1mb) the app crashes with an out of memory error, it used to be out of stack space but after playing me playing around with it, it's started saying out of memory.

    The error message only appears when the programs compiled, the VB IDE just halts.
    Also the main code is all in a class module named clsEngine.

    Cheers, adehh.
    Attached Files Attached Files

  2. #2

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    UK
    Posts
    506
    It listens for incoming file requests on port 25222, on load.

  4. #4
    Lively Member DsgnrsTLZAdmin's Avatar
    Join Date
    Jan 2004
    Location
    Jackson, Georgia
    Posts
    74
    When I run it I'm getting an automation error. If your getting an error and then it says "out of memory" then thats just a bug in vb. I have found that on some errors it says that. Its not our of memory theres just a compile error you have to fix. Maybe then one it shows for me. screen shot below
    Attached Images Attached Images  
    Designers Toolz Admin
    http://www.designerstoolz.com/

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    UK
    Posts
    506
    I'm understanding that if a compile error existed it wouldn't compile or is a compile error a bug in the code that only comes into place after the program is compiled?

    I can't work out where an error could be in the code, it's a relatively simple file transfer program, what I have noticed is that as a file is sending, the more it sends, the slower the transfer gets and the memory usage of the process climbs up to around a peak of 4mb at the same time. I've replaced any Dim statements with Static statements where possible thinking that would make any sort of difference and the program seemed to be able to last longer.

    The most I've ever sent of a 6mb file is 3mb, I'm clueless as to why this happens.

    Cheers.
    Last edited by adzzzz; Jan 25th, 2004 at 01:16 PM.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    UK
    Posts
    506
    I also have no idea about the automation error you're getting, maybe winsock is a bit too temperamental when it's referenced.

  7. #7
    Lively Member DsgnrsTLZAdmin's Avatar
    Join Date
    Jan 2004
    Location
    Jackson, Georgia
    Posts
    74
    I'm understanding that if a compile error existed it wouldn't compile or is a compile error a bug in the code that only comes into place after the program is compiled?

    A compile error occurs during the compile as that code with the error atempted to be compiled.


    As for the main question, whats wrong with this I really dont know. If you want, go to my buddies site,

    http://www.amphibiousentertainment.com/

    and download open source for his ftp program and look though the coding to get idea of how it should be
    Designers Toolz Admin
    http://www.designerstoolz.com/

  8. #8
    Lively Member DsgnrsTLZAdmin's Avatar
    Join Date
    Jan 2004
    Location
    Jackson, Georgia
    Posts
    74
    I'm understanding that if a compile error existed it wouldn't compile or is a compile error a bug in the code that only comes into place after the program is compiled?

    A compile error occurs during the compile as that code with the error is atempted to be compiled.


    As for the main question, whats wrong with this I really dont know. If you want, go to my buddies site,

    http://www.amphibiousentertainment.com/

    and download open source for his ftp program and look though the coding to get idea of how it should be
    Designers Toolz Admin
    http://www.designerstoolz.com/

  9. #9
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    adzzzz

    The answer to your problems: http://support.microsoft.com/?scid=313984

    Well, Some of them at least. I found out how it works and have some suggestions if you want them.

  10. #10
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    adzzzz,

    Made some changes to your program to speed up transfers and to correct your Winsock problem.


    Marked changes with:

    ' RJ - 20040125

  11. #11
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    Your locking up to much ram. Are you storing data in memory or writing it straight to file???

    I have this problem all the time at work because my projects are large and resource intensive. Before running close all forms in the IDE especially the graphical ones
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  12. #12

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2002
    Location
    UK
    Posts
    506
    Hey cheers for that randem, I'll have a good look at that when I get round to installing VB again (new PC). It's hard telling what everything does in notepad.

    How well do your modifications work with larger files, please fill me in on your success rate\s as mine are quite low.

    Cheers again, adehh.

    BodwadUK: Data is being written straight to a file as each chunk is received, though I believe it's the send-side of the transfer that actually fails.

  13. #13
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    adzzzz,


    You want statistics:

    Transfer a 16.05 MB file on a 100mb network, with a program chunk size of 4096

    Your program - 856.125 Seconds

    Modified Program - 14.787 Secinds

    Good Enough?
    Last edited by randem; Jan 27th, 2004 at 08:11 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width