Bug 564534 - NullPointerException when opening .sh file
Summary: NullPointerException when opening .sh file
Status: RESOLVED FIXED
Alias: None
Product: MPC
Classification: Technology
Component: Install (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.8.4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 565161 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-06-22 08:04 EDT by Jens Reimann CLA
Modified: 2020-07-16 11:16 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Reimann CLA 2020-06-22 08:04:52 EDT
Starting 2020-06 I get a NPE when opening a shell script in Eclipse. It still opens the system editor, but a dialog pops up and the following exception is logged:

~~~
java.lang.NullPointerException
	at org.eclipse.epp.internal.mpc.ui.discovery.DiscoverFileSupportJob.orderNodesByTagSubExtensionCount(DiscoverFileSupportJob.java:126)
	at org.eclipse.epp.internal.mpc.ui.discovery.DiscoverFileSupportJob.run(DiscoverFileSupportJob.java:87)
	at org.eclipse.epp.internal.mpc.ui.discovery.DiscoverFileSupportJob.run(DiscoverFileSupportJob.java:70)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
~~~
Comment 1 Romain Bioteau CLA 2020-07-05 04:52:31 EDT
Same error when trying o open a .spec file.
Comment 2 Carsten Reckord CLA 2020-07-05 07:38:11 EDT
Thanks for the report. Does this happen for any file with those extensions? Could you give me a concrete file name?

It looks like we get search results from the server that have no tags at all, let alone the ones indicating .sh/.spec editor capabilities.

In any case, I can see where the NPE happens and will have a fix in one of the upcoming builds.
Comment 3 Carsten Reckord CLA 2020-07-05 08:12:07 EDT
As a workaround until a fix is available, you can set an editor association explicitly to suppress the Marketplace lookup for the affected file type:

- Right-click on a file with the affected extension in the Project/Package Explorer
- Choose "Open with... / Other..."
- Select an editor to use
- Check the "Use it for all *.ext files" or "Use this editor for all Name.ext files"
Comment 4 Rolf Theunissen CLA 2020-07-13 03:20:27 EDT
*** Bug 565161 has been marked as a duplicate of this bug. ***
Comment 5 Carsten Reckord CLA 2020-07-16 11:16:53 EDT
FYI: MPC 1.8.4 with the fix has been released. You should be able to get the update via the Marketplace Client UI's update banner.