diff --git a/eclipse-pydev.spec b/eclipse-pydev.spec index df19312..b39932d 100644 --- a/eclipse-pydev.spec +++ b/eclipse-pydev.spec @@ -6,7 +6,7 @@ Epoch: 1 Summary: Eclipse Python development plug-in Name: eclipse-pydev Version: 6.5.0 -Release: 1%{?dist} +Release: 2%{?dist} License: EPL-1.0 URL: http://pydev.org @@ -34,6 +34,12 @@ Patch5: lucene-71.patch # Improvements for pip integration Patch6: better-pip-integration.patch +# Fix an NPE when launching Java projects +Patch7: fix-pythonrunnerconfig-npe.patch + +# Don't attempt update of outline if already disposed +Patch8: prevent_update_outline_when_disposed.patch + Requires: eclipse-platform Requires: python3 Requires: apache-commons-logging @@ -99,6 +105,8 @@ Mylyn Task-Focused UI extensions for Pydev. %patch4 %patch5 -p1 %patch6 +%patch7 +%patch8 %mvn_package "::pom:" __noinstall %mvn_package ":::sources{,-feature}:" __noinstall @@ -249,6 +257,9 @@ sed -i -e '/.*\.py$/s/0644/0755/' .mfiles* %license LICENSE.txt %changelog +* Thu Sep 13 2018 Mat Booth - 1:6.5.0-2 +- Patch for NPE/dispose errors + * Thu Sep 13 2018 Mat Booth - 1:6.5.0-1 - Update to latest upstream release - Amend license tag diff --git a/fix-pythonrunnerconfig-npe.patch b/fix-pythonrunnerconfig-npe.patch new file mode 100644 index 0000000..508e6aa --- /dev/null +++ b/fix-pythonrunnerconfig-npe.patch @@ -0,0 +1,15 @@ +--- plugins/org.python.pydev.debug/src/org/python/pydev/debug/ui/PythonConsoleLineTracker.java.orig 2018-06-25 10:15:44.816065992 +0100 ++++ plugins/org.python.pydev.debug/src/org/python/pydev/debug/ui/PythonConsoleLineTracker.java 2018-06-25 10:17:58.101557206 +0100 +@@ -161,8 +161,10 @@ + mappedResources = launchConfiguration.getMappedResources(); + if (mappedResources != null && mappedResources.length > 0) { + this.project = mappedResources[0].getProject(); +- this.workingDirectory = PythonRunnerConfig.getWorkingDirectory(launchConfiguration, +- PythonNature.getPythonNature(project)); ++ org.python.pydev.core.IPythonNature nature = PythonNature.getPythonNature(project); ++ if (nature != null) { ++ this.workingDirectory = PythonRunnerConfig.getWorkingDirectory(launchConfiguration, nature); ++ } + } + } catch (Exception e) { + Log.log(e); diff --git a/prevent_update_outline_when_disposed.patch b/prevent_update_outline_when_disposed.patch new file mode 100644 index 0000000..dbad50d --- /dev/null +++ b/prevent_update_outline_when_disposed.patch @@ -0,0 +1,27 @@ +--- plugins/org.python.pydev.shared_ui/src/org/python/pydev/shared_ui/outline/BaseModel.java.orig 2018-06-25 11:00:03.153729818 +0100 ++++ plugins/org.python.pydev.shared_ui/src/org/python/pydev/shared_ui/outline/BaseModel.java 2018-06-25 11:03:33.331076645 +0100 +@@ -153,6 +153,10 @@ + * Replaces current root + */ + public void setRoot(IParsedItem newRoot) { ++ if (disposed) { ++ // Don't try to do anything if we are already disposed ++ return; ++ } + // We'll try to do the 'least flicker replace' + // compare the two root structures, and tell outline what to refresh + onModelChanged.call(this); +@@ -185,12 +189,7 @@ + } + + } else { +- if (disposed) { +- Log.logInfo("It seems it's already disposed..."); +- +- } else { +- Log.logInfo("No old model root?"); +- } ++ Log.logInfo("No old model root?"); + } + } catch (Throwable e) { + Log.log(e);