"Can't set eof" error occurs while getting a snapshot in dotMemory 2018.3
Symptoms:
When taking a snapshot, you get the error message "Can't set eof". dotMemory is unable to complete snapshot saving.
Cause:
Windows OS has a feature called Window Ghosting which allows users to move, minimize or close the app's window when it's not responding. At this time, Windows creates a child process with the same memory mapped file regions which were opened for the original process. Thus, when the Profiler Core closes this memory mapped file, another process still has references to this file. This causes the SetEndOfFile() function to fail with the error code 1224: "The requested operation cannot be performed on a file with a user-mapped section open". More details here.
Solution:
Set environment variable JETBRAINS_PROFILER_CORE_USEGHSTWND to 0 in system settings (Control Panel | System | Advanced system settings | Advanced | Environment variables -> New...).
Note: the workaround works only in dotMemory 2018.3 or later.
Please sign in to leave a comment.
This did not help me. I am using Dot Memory V 2019.3.3 and tried adding a system environment variable JETBRAINS_PROFILER_CORE_USEGHSTWND = 0 and restarted DotMemory. I still faced the same error and was unable to get a memory snapshot.