Mysterious blank space randomly appears in Powershell console buffer - powershell

I am plagued by a very strange phenomenon. I tend to write fairly esoteric Powershell modules for stuff I do at work. Often, after running one of these, and the module has ended I will move onto some other tasks, and when I happen to bring up my Powershell console window again, several blank lines (or just blank "space") will have appeared in the buffer. It never appears right away, which is the most confounding part.
Afterwards, the blinking cursor exists at the end of this blank space, and the blank space cannot be "backspaced" (so it's not something inadvertently entering spaces or newlines). It's just there, as part of the buffer. I usually just clear the screen with cls to keep it from annoying me.
I used to just chalk this up to the buggy Windows Powershell 5.1 buffering. However now that I've begun using Powershell 7 (and Windows Terminal), I see that the issue still exists.
Here is a screenshot of a v7 Windows Terminal tab an hour or so after my module finished running:
Sometimes it seems the longer I wait the more blank space has appeared. Here is a screenshot of the same console tab about 20 hours later:
I'm sorry I don't have a better way of explaining this. I realize that without any code or pattern to analyze, that this is a very poor question, by SO standards, but I am just as confused as you are. The only pattern I've noticed is that this only seems to happen after I run my various custom modules. However this accounts for the majority of my Powershell usage, so it might be a red herring.
Usually my modules simply do some processing (talking to computers, AD, etc) and just output some information via Write-Host, and occasionally output a [PSCustomObject], which I always capture in a variable. Even if I was accidentally outputting some blank lines or something to the pipeline, I can't see how that would manifest as blank buffer space that grows over time. I thought maybe I was incorrectly killing async jobs or something and that was somehow causing this, but this happens even in purely synchronous code.
To be clear, in the screenshots above there is no code actually running. That module was the only thing I had run in this particular console tab/session, and it doesn't run any background processes. So I can't understand why the buffer is changing all on its own. In both screenshots, the tab/window is the same size as it was when the module first completed, so it's not just a bunch of spaces in the buffer that are being dynamically resized. And as noted, when the module fist completed there were NO rogue characters in the buffer at all.
One other thing about my usage is that it's all done on a remote VM, accessed through RDP, which I use daily. The only other thing I can think of is that maybe something about the console window being minimized/maximized/resized, the resolution changing, or the login session being connected/reconnected has something to do with it.
Does this sound familiar to anyone? Any ideas for what could be causing this or what I can try to understand the behavior better are much appreciated.

I've confirmed that this actually happens as a direct result of simply "restoring" and "maximizing" the Powershell console window and/or Windows Terminal window. When the issue is "present", doing this will often add another "set" of blank space to the buffer before the cursor. Minimizing seems to have no effect, only going from maximized to "restored" and back to maximized.
I've also confirmed that this has nothing to do with my custom modules. I can replicate the issue by simply opening a fresh, maximized console window/tab, running get-process and then "restoring" and maximizing. It doesn't happen every time though.
It also has nothing to do with my custom profile script, as it happens even on a freshly-imaged computer with no profile.
At this point I'm going back to blaming it on buffer/rendering/window manager implementation bugs in powershell and moving on with my life.

Related

Octave 4.2 Command Window is Adding Blank Lines

First, I am new to Octave, but fairly familiar with Matlab. After using Octave for a short time I've noticed that the cursor in the command window will regularly add a new, empty line. Sometime this can be in the middle of typing a command. If I let the window sit with no input, the cursor will eventually advance all the way down the page and keep going.
I have never seen anything like this, and I do not know where to even begin to fix it.
Thanks!
Command Window Screenshot
My alternative answer is that that a bug report should be filed so that this issue gets fixed. I have the exact same problem. Every 30 seconds, when system time hits an even minute and 30 seconds past the minute, the command window cursor skips to the next line. One can still type to the command line and hit enter in the end. The command line now split at random points to several lines will be successfully computed. The problem is that you can not edit the line back past the inserted line break and the whole thing looks really messy. I tried to un-install and re-install but that did not help in my case. I use octave-4.2.1-w64-installer.exe
Boring solution (and hopefully permanent): I uninstalled and reinstalled the same version of Octave and this bug seems to have gone away. Not very convenient, but worked for me.
This might be a problem caused by a 3rd party application. I've seen this issue on a computer with Druva inSync. Disabling the Druva inSync service (not the client) stops this. inSync injects itself in applications using the Windows file dialog. Apparently this code contains a bug and accidentally writes a line feed (LF) to a file handle belonging to the application. The problem might also go away with a different Octave version. In particular the 4.2.x and 4.4.x seem to behave differently.

Flash not running debugger any more. Possible socket issue in Windows-10?

Bounty Update
I am leaving the question essentially the same, but I just want to point out at the beginning here that I'm most interested in help trying to get the socket between flash (Adobe Animate) and the native debugger working again, as I believe that is the issue I'm having. Or is it a socket between flash and Windows?
Original Question
I've apparently turned something off? Even when I write really bad code (like trying to call a function that isn't there or divide an integer into a fraction), the flash player boots, shows a background color and stops there. No messages in the output window or compiler errors window. If I fix my code, it all runs fine, but for about 30 minutes (ever since I started trying to work with bitmaps for a sprite sheet) I get no runtime errors no matter what kind of mistake I type in my code. Anyone know how to turn it back on?
I've checked my actionscript settings and I have both warning mode and strict mode checked on.
Could it be a socket issue? I admit I have little to no experience working with sockets and only a surface understanding of what that even means. I've added the socket tag. If someone can see that this is clearly nothing to do with sockets, by all means, I'll remove the tag.
UPDATE: 6/22/16
I just reinstalled Adobe Animate CC 2015.2 and no change. I'll try compiling it in flash builder when I get a chance to help pigeon hole the problem. (Edit 6/24: flash builder worked! But my trial version expired the next day so is no longer a viable option).
And I just tried something in the command prompt in Windows 10 as an administrator:
netsh winsock reset catalog
netsh int ip reset reset.log hit
which I found another user on flashdevelop.org used to fix a similar issue, but no change.
And I just tried debugging in Flash Builder. It worked fine (debugger caught bugs) but my trial version expired the next day.
update 6/24
I've tried launching debugger for AIR from within the Adobe Animate CC IDE and it works fine if there are no bugs; it fails to do anything visible (no Iphone emulator, no swf window) if I put a typo or error in the code.
I also just deleted winsock and winsock2, rebooted Windows, then reinstalled winsock and winsock2. No change.
update 6/25
Just tried a system restore in Windows to set all my files and settings and drivers etc. to the way it was a week and a half ago... Also completely uninstalled all Adobe products and reinstalled. No change. I can only imagine that wiping my hard drive and reinstalling Windows would do the trick, but come on, it hasn't come to that has it?
As VC.One suggested, I checked the compile error window (cannot believe I didn't check before! Maybe when I checked before there were no compile errors... Only runtime errors?) and the errors are showing up there. Does this mean that it's catching compile errors but just not runtime errors?
When you force/test a runtime error... make sure you check
Compiler Errors (ALT+F2) and also Output (F2). By Output I mean the window that shows traces (and runtime issues). One of those two should have some feedback for you.
A possible solution is to save a new Workspace. So with those windows for Compiler Errors and Output both open (or tabbed, I tab them next to my Timeline) go to Window (in top options like File/Edit/Debug etc) and choose Workspace, then into that you choose New Workspace. Give it a name in the pop-up and okay everything.
Flash should always load that current workspace (next time, go to Workspace option again, check that your specified workspace [by name] has a tick next to it...).
Possible pitfalls:
1 - Use the debug player
2 - Make sure there isn't somewhere a try/catch enclosing the portion of code that triggers the event that may lead to an error
3 - Socket issue: may be exported in debug mode but swf cannot connect to debugger (it waits in a blank state for 60 seconds I guess)
4 - Does it compile ok? If there are compilation errors you may get an SWF anyway but then it will not start
...

Refresh/Restart Explorer via Remoting

I have some code that unpins and pins items from the task bar and start menu, which I run using Remoting, as a means of cleaning up lab machines between sessions. It works great, other than I need to log off and back on to see the changes. This is somewhat similar to another bit of code I have, which changes the icon of a shortcut in order to "badge" it as an updated file. That code also requires a refresh, but there I am able to use a technique I found here...This does a refresh of Explorer and the desktop shortcut shows up correctly. However, the same code does not do a refresh of the task bar it seems. I also found this, which also seems to not impact the Taskbar.
Also, this is related to the Remoting, because when I run the same code "locally" no refresh is needed. So, curious if anyone knows a way to directly refresh the task bar (and Start Menu) via Remoting? Or am I going to need to brute force it and just log the user off?
Well, this is interesting, and proof that sometimes we look for complex solutions to simple problems. All the examples I found are pretty complex, but what works fine is simply this...
Stop-Process -processName: Explorer
No need even to restart, as Explorer restarts automatically and near instantly.

How do I get the full compile log in Activator?

I have a large (> 25k) app that I've been developing in Scala/Akka/Play for a couple of years now. I'm in the process of upgrading it to the current version of the world (everything was a major version or two behind), which means getting it running in Activator. I'm gradually wrestling my way through that, but I'm somewhat stymied by the fact that Activator's "compile" window is very short -- only a few screens long -- so most of my 50-some-odd remaining compile errors are scrolling off the top. I'd really like to be able to read the entire thing, since I assume that most of these are knock-on errors, and only a few are really significant.
Where does the actual compile log go? How can I get to the whole thing?
It sounds like you're trying to use the UI mode when you were happy with the command line mode in Play 2.2; the command line mode is still there, see http://typesafe.com/blog/typesafe-activator---an-update-and-roadmap-preview for some background. Just run "activator" instead of "activator ui". The UI mode is not something that's "production hardened" yet, it is primarily intended for tutorials (though we are working to change that).
That said the compile log should not be truncated in the UI and we appreciate bug reports at https://github.com/typesafehub/activator/issues including one about this truncation.

AutoHotKey Doesn't Respond

When I enter a hotkey [any hotkey], AutoHotKey doesn't respond. However, it will respond if I edit, save, and reload it. After which, it will respond three or four times then I must go through the same process of editing, saving, and reloading it again.
I have uninstalled and reinstalled the program 10 or more times.
Before it began to not respond, it would leave a space after each string. [I'm not sure if that is related to my problem or not.]
I am using Windows 7 and IE 10. I reinstalled IE 8 and IE 9 to see if either would correct the problem. The problem remained.
Thanks for whatever help you may provide.
Me too
I have encountered this same type of problem. AutoHotKey loads my script and responds for a while, then after X number of times the script simply stops responding.
Resolution
To resolve these types of problems I found that opening the debug screen (double click the AutoHotKey icon in the task bar) generally shows that my script is busy running, and doing something. From there it's a simple matter to identify why it's still running.
Since the script is currently busy satisfying a previous request, then a new request can not be initiated.
In my case the problem is some runaway loop that is processing more data than I had expected or it's stuck in some infinite loop.
If you leave the script running while it's stuck, you might also want to open the task manager to see if it's consuming any CPU time or if it's gradually eating more and more memory.