|
You can find a surprising number of application authentication keys for various services rummaging through GitHub as well.
|
|
|
|
|
Click here[^] for more information.
/ravi
|
|
|
|
|
Someone needs a whack with a clue bat.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
From the docs for Image.FromFile
Quote: Exceptions
OutOfMemoryException
The file does not have a valid image format.
-or-
GDI+ does not support the pixel format of the file.
...and using something like UnsupportedFormatException is too hard?
cheers
Chris Maunder
|
|
|
|
|
... because they thrash round chewing up memory trying to find a valid format?
Wouldn't surprise me in the least.
[edit] Removed joke icon in light of other messages in this thread. [/edit]
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
modified 25-Mar-18 22:09pm.
|
|
|
|
|
Pretty much my assumption. "Let's try it and see what breaks".
cheers
Chris Maunder
|
|
|
|
|
|
raddevus wrote: I at least want to try it a few times. Isn't that the definition of stupid - repeat the same action with the same settings and expect different results!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have found that in the Venn diagram there is no intersection between :
Engineer & Humor
I've marked this comment appropriately as joke (as I should have on the other) to indicate that it is an _attempt_ at humor.
|
|
|
|
|
I grew up learning: "If at first you don't succeed, try, try again."
That philosophy has done well for me.
Now, when I suggest it to my teenage son, I get "The definition of insanity is trying the same thing over and over and expecting a different result."
It's really a way to get out of trying to do a good job.
|
|
|
|
|
I prefer the "Theory of one"
If it works for one case, it must work for them all.
|
|
|
|
|
Mycroft Holmes wrote: sn't that the definition of stupid - repeat the same action with the same settings and expect different results!
It is stupid, until it works. Which will be just when I{m showing nmy wife that it won{t work.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Sounds quite probable to me - I was debugging the call stack for an EF connection yesterday.
I happened to be connecting to a SQL Server database, however as System.Data was being referenced the call stack showed all sorts of database connection types(probably the wrong term but you get my drift?) being tried for the connection, including Oracle.
It's kind of clever that it takes away me having to specify the type of database EF is connecting to, while at the same time being rather horrifying that it tries different connection types until it succeeds.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Could have been worse...
A MysteriousException , or a ConfusingException instead.
"I'm neither for nor against, on the contrary." John Middle
|
|
|
|
|
...or even worse: GeneralException - exception that can be anything from anywhere.. sorry, no stack.
In order to understand stack overflow, you must first understand stack overflow.
|
|
|
|
|
|
OutOfMemoryException is what happens, invalid format is the reason for it.
This is the recurring question of whether one should catch the error and throw a new different error instead, or if you should let the original error propagate upwards.
I prefer the former if I don't have control over the code.
|
|
|
|
|
I would just prefer they sniff the image file to ensure they can handle it instead of blindly trying to load it and then finding they are out of memory (and I get that they check and abort before using up all memory, but the point remains)
cheers
Chris Maunder
|
|
|
|
|
I believe that verifying a compressed image would go through exactly the same steps as parsing it would.
This is probably the most efficient way.
The error message is still stupid though.
|
|
|
|
|
In the case that affected me it was an attempt to load an SVG file which I discovered isn't supported. A simple check of filename or the first few bytes of the file would have found this. There's even a handy list[^] they could refer to.
cheers
Chris Maunder
|
|
|
|
|
I was told by my boss the other day that my biggest weakness is that I always assume people do thing properly.
|
|
|
|
|
cheers
Chris Maunder
|
|
|
|
|
Extensions aren't trustworthy, nothing guarantees the file is in the format it says it's on. The developer himself might have changed the extension to better suit his application, as evidenced by the shitload of formats that are just XML files, compressed or not, with a different extension (like SVG).
As for the first few bytes, many formats have common prefixes (there's 2 or 3 exemples on the list you linked, but there's more), some of them don't even require the prefix to be present and others (like SVG) are encoded as text that can have yet another prefix (BOM).
It's sad, but we can't trust the format markers when dealing with multiple formats.
|
|
|
|
|
Because the actual internal error being thrown is an OutOfMemoryException. That has been my experience, especially when working with LEADTools libraries and images with OCR software.
Edit: I have seen this similar thing happen before, and for some reason the image "may" be corrupted and thus causes a memory issue. Then the developer just returns a crap message saying not a valid image format. But in reality, the software kept reading the bytes until it ran out of memory.
|
|
|
|
|
Because a useful name for the exception was out-of-the-memory of the developer.
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
|
|
|
|