PyDev Sync System PYTHONPATH results in Python crashing - eclipse

I'm running PyDev 6.4.1.2 on Eclipse EE Neon (4.6.3) on OS X 10.11.6 (El Capitan)
Whenever I update the PYTHONPATH and syncing is attempted, I get 3 warnings that Python has crashed. The updated PYTHONPATH still works, but I was wondering what the possible cause of this could be.
Thank you.

The reason it crashes is because when doing some_module = __import__("some.module"), dir(some_module), that module is crashing and usually means an error in compilation of such module or some wrong environment variable (so, the module is not being properly initialized).
I'm not sure PyDev prints which module was the culprit... do you have some error in your error log after the crash happens?
http://www.pydev.org/faq.html#HowdoIReportaBUG has instructions on finding the error log.

Related

Error when open eclipse - MAC

I have installed eclipse on my iMac and when I try to open it, it gives me this error:
Failed to find a Main Class in
"/Applications/Eclipse.app/Contents/MacOS//../Eclipse/ plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar".
On my MacBook Pro, everything works fine, but I have done nothing different.
I have checked other posts, but most of them refer to a windows OS. There was an answer which said that it can just open when everything is in an English folder and this is true for me!
Thanking you in advance!
I came across this error after installing Eclipse PDT.
Open your terminal and run the version command: java -version.
If your java version is below 1.8, you will have to update your Java
Runtime Environment to at least 1.8.0 by installing an updated JDK
here.
Then re-run the java version command and your version
should be updated.
You should now be able to install and run
Eclipse.
I have the same issue, but on my MacBookPro. I first installed eclipse Photon, which when starting up prompted me to install Java 6, which I did from https://support.apple.com/kb/DL1572?locale=en_US
Then I also installed the latest JRE (jre-8u171-macosx-x64 as of yesterday). When running eclipse again I started getting this error. Then I tried to run from the command line, and got this error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/equinox/launcher/Main : Unsupported major.minor version 51.0
When googling that, the answers said that the reason for that is that the Oracle installer does not update the symlink in /usr/bin, which seemed to be confirmed by the fact that running java -version returned this:
java -version
java version "1.6.0_65"
The solutions I found for that were not feasible in MacOS starting in version El Capitan, and I am on High Sierra, so I followed the instructions in this post to fix that, and it worked, now I get:
java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
After all of this, however, I get the same "Failed to find a Main Class" error on the dialog as reported initially here, and the same "UnsupportedClassVersionError" on the CLI that I had when the system was still on java 6, so now I am still stuck and out of ideas.
EDIT: FIXED IT!!
I kept thinking that the problem was the java version, it was somehow still using java 6 (which I had installed due to the initial prompt).
So I followed the instructions here to remove what I had installed for the alleged java 6 issue. Then I found this post in the eclipse forums, which stated at the end (comment added by Eric Rizzo on Tue, 14 February 2017 21:56) that this is not an Eclipse message, but rather an OS message, and that one should NOT do that as apple messed things up with that patch. And then it goes to explain that one should install java 8 JDK (NOT just the JRE as I had done). Once I removed Java 6 and installed the full java 8 JDK, it ran fine :)
You can edit the eclipse.ini with your vm configuration in the beginning of the file
-vm
/yourJvmPath/jdk-12.0.1.jdk/bin/java
cat /Applications/Eclipse.app/Contents/Eclipse/eclipse.ini
-vm
/Users/SomeUser/jdk-12.0.1.jdk/bin/java
-startup
../Eclipse/plugins/org.eclipse.equinox.launcher_1.5.400.v20190515-0925.jar
--launcher.library
../Eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.1000.v20190125-2016
PD. It works with ApacheDirectoryStudio for MAC
This one works for me with MAC OS Mojave.
You can download the Java SE Development Kit 8u221 for mac from the below link.
jdk-8u221-macosx-x64.dmg
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

RuntimeError: cuda runtime error (30) : unknown error at /opt/conda/conda-bld/pytorch_1501972792122/work/pytorch-0.1.12/torch/lib/THC/THCGeneral.c:66

I'm getting a runtime error everytime I try to debug pytorch code for the second time. It seems like after restarting the ipython console some of the cuda programs are not canceled properly so that this error occurs while trying to rerun the code.
Has anyone had the same experience / knows how to solve it?
Is there a way to manually flush all cuda activities from my GPU?
I'm using pytorch version 0.1.12_1, ipython 4.2.0 and as IDE spyder 3.2.4.

Error while trying to debug D program

My problem is that when I try to start debuggin in DDT in Eclipse (Kepler) an error shows up:
Error in final launch sequence
Failed to execute MI command:
-gdb-set auto-solib-add on
Error message from debugger back end:
No symbol table is loaded.
Use the "file" command.
No symbol table is loaded.
Use the "file" command.
I've compiled the application with -gc and -g flag but it didn't help.
I'm using original DMD compiler.
Sounds like you are working on Windows, DMD has no GDB support there yet. You can either use windbg from the command line or use the Visual Studio plugin, which converts the debug info after compiling.
The issue that I had is that the compiler (DMD) is not working with GDB under Windows. If somebody wants to use DDT with debugging support, he needs to use GDC compiler.
This actually is mentioned in the "Debugging" page:
http://wiki.dlang.org/Debugging

RoboVM not working on JDK 1.8.0 b112

I'm running Eclipse with RoboVM plugin and I wanted to try IOSDemo sample project described on robovm.org (http://www.robovm.org/docs.html). When creating the project in Eclipse and running it I got following error message.
An internal error occurred during: "Launching IOSDemo".
java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class soot.toolkits.scalar.LocalSplitter
I found out that it's related to JDK version (I'm running JDK 8.0 ea, build 112). When running on JDK 1.7.0_45 and building the project on cmd line it builds and runs OK.
Is it known problem, is there any workaround or fix? Thanks
This is most probably due to a bug [1] in the recent early access builds of Java8. It looks like the bug was resolved a few days ago but as far as I can see the fix didn't make it into the b113 build. Please use the latest Java7 release or an earlier Java8 EA build until a Java8 build is available with this fix included.
[1] https://bugs.openjdk.java.net/browse/JDK-8026394

Unable to determine gdb version in eclipse using PTP and SDM on OSX

I had this working fine until today and I have seemingly tried everything. I get an error when I try to launch a debugger in eclipse with PTP on OSX. The error comes up as:
Error completing debug job launch
Reason: Debugger error: Unable to
determine gdb version
I have tried running the same code in regular debugger, minus all the MPI stuff and that works fine. It also works fine when I simply run the MPI job locally. I have read somewhere that this might be an issue with Process Launcher? Where do I check this in PTP? I am also using latest Indigo eclipse with PTP version 5.0 and I have also built the sdm ddebugger for mac locally.
This also appears in console:
gdb: invalid option -- q
sdm [--debugger=value] [--debugger_path=path]
[--proxy=proxy]
[--ho
st=host_name] [--port=port]
[--master]
[--server=rank]
[--debug[=level]]
Finally, running gdb from terminal gives me:
GNU gdb 6.3.50-20050815 (Apple version
gdb-1515) (Sat Jan 15 08:33:48 UTC
2011)
Any ideas?
Thanks, Alex