refterm icon indicating copy to clipboard operation
refterm copied to clipboard

Unable to allocate scrollback buffer (Win10)

Open cyberkm opened this issue 3 years ago • 9 comments

image Build from commit e6c42d85b7298ce442e2ba132b363710277fedd7 Windows 10, tried both MSVC and clang executable. Do you need any more info?

cyberkm avatar Jul 07 '21 11:07 cyberkm

Yes, if you could: what version of Windows 10 are you running?

(Separately, note to self: there should be two versions of this dialog, so we know which path failed...)

- Casey

cmuratori avatar Jul 07 '21 22:07 cmuratori

e6c42d8 and ab165e6bc4 both were fine for me on win10 2004 (cl 19.28.29334) and win10 21H1 (cl 19.23.3003831)

linkviii avatar Jul 09 '21 17:07 linkviii

Edition Windows 10 Pro Version 20H2 OS build 19042.1083 Experience Windows Feature Experience Pack 120.2212.3530.0

cyberkm avatar Jul 09 '21 17:07 cyberkm

So I believe that should have still been a compatible version of Windows 10, but, I am not sure. If I modify the source to have more detailed dialog boxes, would it be possible to run this again on the machine and let me know what it says? Because I can do that this weekend...

- Casey

cmuratori avatar Jul 10 '21 04:07 cmuratori

Ok. now there is weird behavior. First time after compilation, when i run the refterm_release_msvc.exe it loads ok. image When i closed it by pressing the [X] button on window captionbar and tried to relaunch it i got image All sequential runs also give same error.

I ran refterm_debug.msvc.exe and it loaded without problem. Closed and tried to restart it, got the error. Same behavior with clang release and debug builds. First run worked, all subsequential runs failed.

cyberkm avatar Jul 10 '21 11:07 cyberkm

Are you compiling with or without MEM_REPLACE_PLACEHOLDER define? If without - maybe you're just unlucky and there is some dll file loaded at 0x40000000 address in your process. Try checking what dll files are loaded at which address when you get this error message box. You can do that with Process Monitor from Sysinternals or ProcessHacker.

mmozeiko avatar Jul 10 '21 16:07 mmozeiko

I made some changes to this and checked them in with 60e3eaf784098ba1f844e5599c359a3b727ddb5e. If you'd like to try again, it should be more aggressive about trying multiple locations for the ring buffer, and also it should pop up message boxes that say exactly which path failed, so you can let us know more specifically if it still does not work.

Thanks, - Casey

cmuratori avatar Jul 10 '21 21:07 cmuratori

Now it shows this message image But opens afterwise

cyberkm avatar Jul 11 '21 18:07 cyberkm

This is very interesting...

So, that means the VirtualAlloc2/MapViewOfFile3 path failed. I guess we can call GetLastError() to see what the specific failure is? I'm not sure there's much else to do here. I suppose one thing we might do is remove the dialog box and just put a notice in the status about it?

- Casey

cmuratori avatar Jul 11 '21 20:07 cmuratori