PyCharm has failed to load the environment from '/bin/zsh' - macos

I wrote a program about a month ago, and it worked fine. I haven't touched it since than, until today.
All of a sudden, I get the warning when opening Pycharm: "PyCharm has failed to load the environment from '/bin/zsh'. Integration with tools that rely on environment variables may work incorrectly." I couldn't find a good explanation and solution to this warning, without leaning out of my comfort zone of altering files on my computer.
When running the program I got the error message "Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)". I have read that this error is related to a memory problem or, that a file needs to be closed.
I have cleaned the memory of my mac so far I know how to and all files are closed. The program reads from one file, but this is only one line, which has worked before and I don´t see how this could cause the error. Otherwise, I did write few other scripts in the same project over the last month, but that shouldn't be a cause of a memory issue, right?
Restarting Pycharm and my computer didn´t change anything.
The only other thing I can think of is, that I have updated my mac to Monterey version 12.2.1.
Could that be the cause for this behaviour? Did anyone else have a similar experience after this update?
And is it possible for the error message and Pycharms warning to be related?
I am thankful for any tip, that may help me understand this behaviour.

I was able to fix this issue through the following steps:
Updating PyCharm to the latest version
Within PyCharm going to File -> Invalidate Caches -> Checking all boxes -> Clicking "Invalidate and Restart"
(Previous attempts to Invalidate Caches with only the default boxes checked did not work for me, but checking all the boxes fixed the issue.)

Related

Spurious "cannot load control, license not found" error?

When I try to load a form in the designer, it shows "runtime error 0" and produces a log file which contains:
Line 15: Cannot load control xxxx; license not found.
But the control in question DOES NOT have any licensing restrictions. It has no installer and requires only registration (regsvr32).
Not only that, but for years this had worked without any problems and only just recently this has started. It affects a number of forms which have any controls from a particular OCX.
So it appears that something is fooling VB6 into either thinking a license check has failed, or at least to show a nonsensical error message.
I have tried to trace this using Process Monitor but I couldn't spot any useful clues in the logs. At least, nothing which was obviously problematic.
Any ideas what could cause this? I'm at a loss so far to find a cause.
Thanks
I'm assuming this is a third-party OCX... Many such products came with their own installer which generates the license file; simply copying, and even regsvr32ing the .ocx is not sufficient to use it in the development environment. If you still have the original installation routine, you can try running that to regenerate the license. Failing that, you could look for an appropriately-named .lic file on an existing, working development machine (in \Windows\System32, or the VB6 installation directory, or in the directory into which the .ocx is installed) and manually copy that to the same place on the new development machine.
(Answering my own question, should anyone else run into this again).
As far as I can determine this error was caused by either a subtly corrupt FRX file and/or an FRM/FRX file pair being out of sync.
By going back in source control I could eventually locate a revision where there was no problem. This alone seemed to eliminate anything in the computing environment from being the cause. (ie, bad VB6 installation, disk space, etc. etc.)
I manually re-did certain changes and brought that older code back up to date, and so far the problem has not reappeared.
EDIT the struck-out text was not incorrect but was not specific enough -- I have since learned what seems to be the root cause.
The problem was that we loaded a 32-bit ICO file (icon) into an imagelist in one of the VB6 forms. Now, traditionally 32-bit color icons were not usable in VB6 and you would get an error even trying to do this. However for some reason certain Windows PCs will now allow this - which can be a time bomb.
The problem is: forms saved that way can cause the errors in this question when run on a different PC which does NOT support such icons.
This will occur in the IDE when the form is loaded, OR if a compiled EXE is run on a different computer which respects the original VB6 icon limitations!
I don't know why the totally meaningless "licensing" error message is shown when this happens.
In my case we didn't intentionally introduce this icon, it was a mistake, and so it took a LONG time to debug and eventually figure this out (plus some very valuable advice from people on VBForums).
I've created a different question specifically to try and get at what underlying element of Windows has changed causing this problem.

Extendscript Toolkit debugger fails: Can't start debug session

Not a programming problem per se, but rather a programming environment problem that I have been unable to find a solution to.
The problem relates to Adobe's Extendscript Toolkit (both 3.5 and 4), but so far I haven't been able to solve the problem, so here I am...
The error I get has appeared more or less over night. I didn't experience this problem yesterday, nor this morning. But exactly WHAT has happened is beyond me. I have removed preferences, I have uninstalled, reinstalled, created a new user, restored old preferences from Time Machine and I'm now pretty much lost for options.
Basically, nothing works in ESTK anymore. Just opening ESTK and entering alert('Hello') won't work. Neither will $.writeln(). Everything running from within ESTK seems to give the same error;
Cannot execute script in target engine 'main'
With details:
Cannot execute script in target engine 'main'!
(#1116) Can't start debug session.
Below is a screenshot taken from the new user I created to test, same problem.
The "funny" thing is that all the scripts (InDesign CS5, still hanging on to it for reasons) still work perfectly in the applications' script panels. So there is nothing wrong with the scripts (heck, they haven't changed one bit, and still refuses to run in ESTK).
As mentioned, I've tried installing the ESTK CC (version 4) as well, but the very same problem occurs there. Which leads me to think the problem lies somewhere else, but I do not know where, and why.
So, if anyone can shed any light on this issue, at all, I would be very happy. Debugging is basically the only thing ESTK is good for in my book, but now that even that functionality is gone, I don't know how to efficiently debug the scripts which is kind of hampering the workflow.
For reference, I'm running InDesign CS5 (from the old Creative Suite) on a 2008 Mac Pro with 10.11.6 (El Capitan) installed. Well aware that it's pretty out of date, but that is beside the point here.
In the above mentioned forum, Adobe has published a stable workaround!You just have to correct a setting inside the estk application:
Open the file(Mac): “/Applications/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.app/Contents/SharedSupport/Required/cdic/11BTBackend.jsx”
Search for the value: 604800000 (line reads bt.timeout = 604800000)
Replace that value with 604800 and save
Quit ExtendScript Toolkit and relaunch.
I can confirm that it works.
From the adobe Forum :
"we have found a first workaround: just change your date to any date before 20-nov-2018"
https://forums.adobe.com/message/10761440#10761440
Seems like a date issue :(
I just published a quick update about this on the Adobe Tech Blog.
For the time being, if you dismiss the dialog, you can still run your script via ESTK and step through code as usual.
Alternatively, if you really want to avoid the dialogs, and you don’t mind setting your clock back, you can sidestep the issue by setting your system clock back to November 19, 2018 or before. On most systems, changing the system time can have unintended side effects, so this isn’t recommended unless you’re really certain about it.

Xcode 8.2.1 keeps shutting down on startup

Every time I open the IDE it starts loading then shuts down before I get a chance to change anything. Remember this happening before on previous Versions of Xcode but I haven't had to deal with this in a rally long time. Any ideas?
PS. I think its Xcode 8.2.1 ,really hard to check when it closes down immediately.
Found that deleting Derived Data enabled X-code to start responding again.
Was difficult to find it though as most people were explaining how to find it from within Xcode :P If future me or any other super-devs would like to know the default directory then you can find it under the hidden folder Library on your user directory IE. /Library/Developer/Xcode/DerivedData/

phantomjs exit() doesn't terminate the process

I've been using phantom.js on Windows 7 for quite some time now (I think v1.4.0 was the first version I used) and everything was always fine. But for some reason the process isn't properly terminated any longer when calling phantom.exit() and I absolutely don't know why.
The problem started to occur in v1.7.0, from one day to another. Everything once worked fine in 1.7.0 but then it did no more. Even after upgrading to 1.8.0 and now 1.9.0 it still doesnt work. The console just hangs. I can't type anything, phantomjs.exe is still listed in the list of processes in the taskmanager, even CTRL+C doesn't do anything. The whole thing is just frozen.
The underscore in the console blinks as if it expected more input but I can't type anything. The only chance I have is to close the cmd window using the [X] button which is totally dumb for automated testing.
I use the precompiled binaries I downloaded from http://phantomjs.org/ and as I said: it stopped working from one day to another. I even reinstalled it a few times, even to different folders but the process just doesn't get terminated any longer. Anyone who has an idea what the problem could be?
This is a known issue with the Nvidia drivers when you have two cards.
To resolve this issue you need to select "High-performance NVidia processor" in the NVidia control panel (NVidia Control Panel > Manage 3D Settings > Global Settings).
Read more here: https://github.com/ariya/phantomjs/issues/10845

windows installation hang

How can I find what's hanging all new installations on a Windows box?
While testing an installation script on Windows (XP Pro, if it matters) I've run into a situation wherein any and all attempts to install anything on the system hang waiting on who knows what. When the system is restarted, all queued up attempts at installation then go through their exit paths with pop-ups that report the installation is being aborted due to system shutdown having been requested. Of course, reboots do not cure the problem. The system otherwise runs fine.
So... How can I determine what part of the OS I've wedged? (Something in the registry, I suppose, but I'm a real greenhorn when it comes to Windows.) Most likely, something from a preceding install attempt went awry and is now blocking even though I saw no errors reported. Once I figure this out, I want to put in a check for this sort of thing, possibly at both ends of my install scripts, if that seems reasonable.
Thanks for your input.
UPDATE:
Unfortunately for me, rebuilding from scratch to get to the point the system's in now is about 9 hours. I'd like to unwedge it from where it is now rather than reload (again). Procmon seems great but I haven't got SP2 installed, only SP1! -frown- So, other ideas are welcome.
I assume you've tried logging the install to see where things go wrong?
Try rolling back to before things went wrong using "System Restore", if that doesn't solve it and the MSI log files show nothing useful then I'd take the plunge and reload before wasting any more time on it.
That said, if you're developing installers then taking an image of this PC in it's crappy state could be a worthwhile exercise. Some point in the future when you have more time to debug you can try and figure out what the problem is.
P.S. I'm assuming you're asking this question from the point of view of someone developing an installer and not as a tech-support question... otherwise this question should probably be closed as not-programming-related ;)
Try using Procmon to figure out where the installer is having problems, if you set a filter it will report all file and registry activity for that process.

Resources