Too many errors?  
Author Message
advantara(removethis)





PostPosted: Wed Aug 08 14:35:31 CDT 2007 Top

Visual Studio C++ >> Too many errors?

Hi,

I'm running a process that had over 500 errors trying to open files using
FILE* with _fsopen. At around 500 errors the program stops opening other
files and I get an error message from errno "Invalid argument". This file
open routine works fine if the error level is not exhorbitant. Any clues?
Thanks
Ellie

Visual Studio153  
 
 
nathan





PostPosted: Wed Aug 08 14:35:31 CDT 2007 Top

Visual Studio C++ >> Too many errors?

>I'm running a process that had over 500 errors trying to open files using
>FILE* with _fsopen. At around 500 errors the program stops opening other
>files and I get an error message from errno "Invalid argument". This file
>open routine works fine if the error level is not exhorbitant. Any clues?

Fix the first 500 errors? (Tip: it might help if you specify *what*
the error is!). I have a feeling that the first errors aren't errors
as much as resource leaks -- you're not closing down the file(s) you
do open successfully. The Sysinternals tools, at
http://www.microsoft.com/technet/sysinternals/default.mspx , have some
very useful tools that'll tell you what file(s) your app does have
open.

Nathan Mates

--
<*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
# Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein
 
 
Ellie





PostPosted: Wed Aug 08 15:36:34 CDT 2007 Top

Visual Studio C++ >> Too many errors? Thank you for your response. It is not a resource leak. All of that has been
checked and double checked. The program opens more files when it doesn't
have any errors and doesn't give me a problem. Why am I getting a "Invalid
argument" for something that is not an "Invalid argument"? I have had
trouble with too large file sizes and had to use low level file handling for
other things with this program. If I had too many files open from not
closing files, then why isn't the error "No more file handles" or something
like that?






>>I'm running a process that had over 500 errors trying to open files using
>>FILE* with _fsopen. At around 500 errors the program stops opening other
>>files and I get an error message from errno "Invalid argument". This file
>>open routine works fine if the error level is not exhorbitant. Any clues?
>
> Fix the first 500 errors? (Tip: it might help if you specify *what*
> the error is!). I have a feeling that the first errors aren't errors
> as much as resource leaks -- you're not closing down the file(s) you
> do open successfully. The Sysinternals tools, at
> http://www.microsoft.com/technet/sysinternals/default.mspx , have some
> very useful tools that'll tell you what file(s) your app does have
> open.
>
> Nathan Mates
>
> --
> <*> Nathan Mates - personal webpage http://www.visi.com/~nathan/
> # Programmer at Pandemic Studios -- http://www.pandemicstudios.com/
> # NOT speaking for Pandemic Studios. "Care not what the neighbors
> # think. What are the facts, and to how many decimal places?" -R.A.
> Heinlein


 
 
DavidBender





PostPosted: Sat Aug 11 20:44:01 CDT 2007 Top

Visual Studio C++ >> Too many errors? Ellie,

It would be helpful for us if you could include the error message for those
first 500. Without knowing the root problem then tracing for a solution
could leave us in a wil-goose chase.

I suggest debugging your code step-by-step and keep an eye out for the first
error instance. Then check out who, what and why for that error. And if you
get "Invlaid argument" check the syntax on that line of code.

Thats as much as I can help with the issue based on the info provided. Hope
this was helpful.