Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attaching Final Skims Fails for Large Files #308

Open
bricegnichols opened this issue Oct 7, 2021 · 1 comment
Open

Attaching Final Skims Fails for Large Files #308

bricegnichols opened this issue Oct 7, 2021 · 1 comment

Comments

@bricegnichols
Copy link

When running DaySim in estimation mode to attach final skims to daysim outputs, some files crash in Reader.cs. This particularly happens when large files like full simulation daysim data like trips are loaded. The point of failure is here, where the length of the file being imported is converted to an integer: https://github.com/RSGInc/DaySim/blob/master/DaySim.Framework/Persistence/Reader.cs#L41

For large files this causes an overflow of the integer, resulting in a negative value which fails to create a proper index. We've found that the following correction of line 41 will avoid this issue by converting the value to an integer only after dividing the file length by the file's size value:

_count = (int)(file.Length / _size);

@mabcal
Copy link
Contributor

mabcal commented Oct 8, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants