BRC Crashes on file with invalid date

Post any Bulk Rename Command support requirements here. Open to all registered users.

BRC Crashes on file with invalid date

Postby therube » Wed Feb 28, 2024 9:20 pm

BRC Crashes on file with invalid date

If BRC attempts to read a directory or file that contains an "invalid" date, BRC crashes.


This must be similar to, BRU 64-bit has stopped working in WinX during extract EXIF where an "invalid" EXIF date caused a crash.


Create a file & set its' date to 12/31/1969.
To Windows (Explorer), a date of 12/31/1969 is "invalid" (even though it is a perfectly valid date).
Windows Explorer will display the file, but the date field will be blank.


So the other day (2-16-29), I had been messing around with this magical date of 12/31/1969.
And like said above, I created a file with that date.
And I left it there, in a temp directory of mine, C:/TMP/.
No big deal, wasn't hurting anything.

More recently, I'd been running a BRC command that I do every so often.
And it crashed, which was very unusual.
Tried again, crashed.
Unusual, but didn't give it much thought.

So today, needing to use my BRC command on a more regular basis, found it was still crashing.
And it became more of an issue & I'm like huh?
Typically use BRC32, so pulled out BRC64 instead, still crashed.
Started shortening my command line (what it was doing), still crashed. Shorten more, still crash. And more. And at some point all I'm left with is a DIR: & a PATTERN:, & I took the PATTERN: out - & still crashed. Didn't make any sense.

Changed to a different directory, pointed to a different DIR:, & that worked!
Weird?

So then I thought, maybe the number of items in /TMP/, but it was only 686, so not very many.
And then I moved everything out of the directory, & things worked.
And then I moved everything back into the directory, & I crashed again.

Then it was like, it has to be one of the file in there that is causing the crash.
And I was thinking that it was one of the more recent files causing the issue, because nothing had changed in years (with my BRC command line).
So I start moving files back in, in groups, & test, & each time it works.

And when I get to the very final group of files that I'm about to move in, I see this file dated, 12/31/1969, & I'm like, oh, I can't believe it. So I call that file ground - without this 1 file, & BRC worked.

I then copied that 1 file in, & it failed.

I sure wish I had remembered that I created that file dated 12/31/1969 when I first ran into the crashing issue ;-).

Code: Select all
C:\BRC32.exe  /DIR:"C:\TMP\"  /PATTERN:xxx_out.txt  /REMOVENAME  /FIXEDNAME:%date:~8,2%%date:~0,2%%date:~3,2%.%time:~0,2%%time:~3,2%.%time:~6,2%  /NODUP /EXECUTE
therube
 
Posts: 1317
Joined: Mon Jan 18, 2016 6:23 pm

Return to BRC Support