Bug 22360 – Troubles with File("some.file", "r") and "rb" mode if file bigger then 50 Mb

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2021-10-06T04:19:15Z
Last change time
2024-12-01T16:39:30Z
Assigned to
No Owner
Creator
Andrei
Moved to GitHub: phobos#10480 →

Comments

Comment #0 by tempdas — 2021-10-06T04:19:15Z
Hello, I faced with strange issue on MacOS, when I tried to open file more then 1 Gb: It've got an error: std.exception.ErrnoException@std/stdio.d(545): Cannot open file `DTM.NDS' in mode `rb' (No such file or directory) ---------------- ??:? _D3std9exception__T7bailOutHTCQBcQBb14ErrnoExceptionZQBiFNfAyamMAxaZNn [0x108eb8719] ??:? @safe shared(core.stdc.stdio.__sFILE)* std.exception.enforce!(std.exception.ErrnoException).enforce!(shared(core.stdc.stdio.__sFILE)*).enforce(shared(core.stdc.stdio.__sFILE)*, lazy const(char)[], immutable(char)[], ulong) [0x108f32798] ??:? ref @safe std.stdio.File std.stdio.File.__ctor(immutable(char)[], scope const(char)[]) [0x108f3b034] ??:? _Dmain [0x108eb525c] This troubles are present in many versions of DMD: 2.067-2.098. I've tried to open this file via another languages (C++/Kotlin Native) using the same C runtime (File operations) and everything worked perfect. I was surprised that this simple methods didn't work properly, this means we can't use DMD for serious project cause as I see current status of it is semi-working. The same situation with Socket, it doesn't accept connection (all versions after 2018), e.g. 2.066 working with socket well, but it has the same issue with opening big files...
Comment #1 by tempdas — 2021-10-14T04:30:59Z
If tried to open file which size over 50Mb (on Windows) by using code: auto file = File(); file.open(fileToTransfer, "r"); and I got error: std.exception.ErrnoException@std\stdio.d(674): Cannot open file `myfilename.bin' in mode `r' (No such file or directory) ---------------- 0x00007FF693BF5588 0x00007FF693C2D8D3 0x00007FF693C226F9 0x00007FF693C22641 0x00007FF693BF2FB0 0x00007FF693C2EC73 0x00007FF693C2EAEF 0x00007FF693C2EBDB 0x00007FF693C2EAEF 0x00007FF693C2EA16 0x00007FF693C24FE1 0x00007FF693BF3DD4 0x00007FF693C8CCCC 0x00007FF897537034 in BaseThreadInitThunk 0x00007FF898CC2651 in RtlUserThreadStart
Comment #2 by robert.schadek — 2024-12-01T16:39:30Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10480 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB