Click here to Skip to main content
14,332,426 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: Oh yes - it backs up! Pin
RickZeeland18-Aug-19 4:12
mveRickZeeland18-Aug-19 4:12 
GeneralRe: Oh yes - it backs up! Pin
dandy7218-Aug-19 4:43
memberdandy7218-Aug-19 4:43 
GeneralRe: Oh yes - it backs up! Pin
RickZeeland18-Aug-19 4:58
mveRickZeeland18-Aug-19 4:58 
GeneralRe: Oh yes - it backs up! Pin
honey the codewitch18-Aug-19 5:00
memberhoney the codewitch18-Aug-19 5:00 
GeneralRe: Oh yes - it backs up! Pin
Mark_Wallace18-Aug-19 9:01
memberMark_Wallace18-Aug-19 9:01 
GeneralRe: Oh yes - it backs up! Pin
dandy7218-Aug-19 10:49
memberdandy7218-Aug-19 10:49 
GeneralRe: Oh yes - it backs up! Pin
  Forogar  19-Aug-19 3:35
professional  Forogar  19-Aug-19 3:35 
GeneralHow bad can you mess up string parsing? Pin
Sander Rossel18-Aug-19 0:20
professionalSander Rossel18-Aug-19 0:20 
Really pretty hard, or so it seems.
So I'm still working on this early 90's standard, which is pretty impossible to read.
It's basically like this:
You have a code being a certain data field, like 123456 for weight and 654321 for quality.
This goes in a header with two leading zeroes and the fields length (two digits) and precision (one digit).
So a part of a header could be: "0012345605200654321020".
Then comes the value lines, which is just the values, like "00322A ".
The complete (simplified) document would look like:
H0012345605200654321020
V00322A 
So taking the header and values we get the C# values of 3.22m for weight and "A" for quality.
I've got documentation with all fields, their lengths, possible values, and which fields are mandatory and optional or conditional.

So now I've got this entire document which is completely according to the specs, which must be read by some third party application.
And it fails with an ACCESS VIOLATION EXCEPTION!? Unsure | :~
No "failed to parse value 'x' for field 'y'" or "missing mandatory field 'z'", just an access violation.

So I've got some example files that I know that work, so I decide to look at one and dissect the header and fields one by one (I've written a little program for that) and see if I can spot a difference.
I can spot two differences, the sample file has a lot of optional fields with invalid values and it's missing 20 characters in the value line.
We decided to add those optional fields to our own document, including the invalid values (but with correct length) and it works WTF | :WTF:
Why on earth is an invalid document read without issues and does a valid document fail with an access violation? Dead | X|
You can bet your ass that's not the only thing wrong with this application Unsure | :~

Anyway, I'm now waiting on a reply from someone who's on a vacation for the next two weeks or so.
Good times Smile | :)

GeneralRe: How bad can you mess up string parsing? Pin
OriginalGriff18-Aug-19 0:38
protectorOriginalGriff18-Aug-19 0:38 
GeneralRe: How bad can you mess up string parsing? Pin
honey the codewitch18-Aug-19 1:41
memberhoney the codewitch18-Aug-19 1:41 
GeneralRe: How bad can you mess up string parsing? Pin
Sander Rossel18-Aug-19 2:07
professionalSander Rossel18-Aug-19 2:07 
GeneralRe: How bad can you mess up string parsing? Pin
honey the codewitch18-Aug-19 2:43
memberhoney the codewitch18-Aug-19 2:43 
GeneralRe: How bad can you mess up string parsing? Pin
Sander Rossel18-Aug-19 3:09
professionalSander Rossel18-Aug-19 3:09 
GeneralRe: How bad can you mess up string parsing? Pin
honey the codewitch18-Aug-19 3:14
memberhoney the codewitch18-Aug-19 3:14 
GeneralRe: How bad can you mess up string parsing? Pin
Sander Rossel18-Aug-19 5:00
professionalSander Rossel18-Aug-19 5:00 
GeneralRe: How bad can you mess up string parsing? Pin
englebart19-Aug-19 2:18
memberenglebart19-Aug-19 2:18 
GeneralRe: How bad can you mess up string parsing? Pin
honey the codewitch18-Aug-19 1:40
memberhoney the codewitch18-Aug-19 1:40 
GeneralRe: How bad can you mess up string parsing? Pin
Sander Rossel18-Aug-19 2:04
professionalSander Rossel18-Aug-19 2:04 
GeneralRe: How bad can you mess up string parsing? Pin
honey the codewitch18-Aug-19 2:35
memberhoney the codewitch18-Aug-19 2:35 
GeneralRe: How bad can you mess up string parsing? Pin
honey the codewitch18-Aug-19 2:39
memberhoney the codewitch18-Aug-19 2:39 
GeneralRe: How bad can you mess up string parsing? Pin
Sander Rossel18-Aug-19 3:02
professionalSander Rossel18-Aug-19 3:02 
GeneralRe: How bad can you mess up string parsing? Pin
honey the codewitch18-Aug-19 3:05
memberhoney the codewitch18-Aug-19 3:05 
GeneralRe: How bad can you mess up string parsing? Pin
Sander Rossel18-Aug-19 3:10
professionalSander Rossel18-Aug-19 3:10 
GeneralRe: How bad can you mess up string parsing? Pin
honey the codewitch18-Aug-19 3:12
memberhoney the codewitch18-Aug-19 3:12 
GeneralRe: How bad can you mess up string parsing? Pin
Sander Rossel18-Aug-19 4:56
professionalSander Rossel18-Aug-19 4:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.