Posts Tagged ‘troubleshoot’

Eclipse Preference Page Extension Wizard troubleshooting

Friday, June 29th, 2007

Today I tried to add a Preference Page to an RCP application that I’m working on with no luck. After executing the Extension -> Add -> Extension Wizards -> Preference Page I end up with 3 new classes. But 2 of then have compilation errors, they refer to an unexisting PreferenceClass. After googling a bit I found this message in a mailing list describing the same exact problem:

Hello,

I ‘ve added preference page in my application using plugin.xml extensions template. Then, in a new package, Eclipse created 3 classes (Template preferences page extending FieldEditorPreferencePage, a preference constants class and a preference initializer class).

The template preferences page uses a PreferenceClass which doesn’t already exists… I suppose this class has to initialize the preference store, in the preference template class constructor, unsing the plugin instance of the product :

“setPreferenceStore(PreferenceClass.getDefault().getPreferenceStore());”

I’ve tried to extend the AbstractUIPlugin (I’ve read in differents articles from eclipse.org) to catch the plugin instance when it is created, but without succes (when to catch this single instance during startup of eclispe core runtime ?). Then I’ve found the existance of the WorkBenchPlugin class which holds this static instance, I used it, discarding PreferenceClass , but Eclispe tells me that the use of this class is discouraged.

Why ? How is it possible to store the plugin instance at startup ?

Thanks a lot for your help, frank

Then I found the solution, if you haven’t defined an Activator for the plugin yet it will not work. After creating an Activator for the plugin and rerunning the wizard all went fine.

New views don’t show up when using Eclipse RCP setSaveAndRestore

Monday, April 23rd, 2007

If you add a new view to an Eclipse RCP and when launch it the new view is not there you probably hit the problem described in this CT Arrington’s Weblog post.

The IWorkbenchConfigurer.setSaveAndRestore(true) called from your WorkbenchAdvisor can be the source of the problem. The Eclipse RCP platform is trying to restore the perspective from the serialized version stored on disk so it fails to load you new changes. You have several solutions [from the CT Arrington's Weblog post].

  1. Delete the target platform workspace data. tipically
...runtime-EclipseApplication\.metadata\.plugins\org.eclipse.ui.workbench\workbench.xml
  1. Set the Clear workspace data before launching in the run configuration. Run -> Run… -> Eclipse Application -> Main -> Workspace Data -> Clear workspace data before launching

cvs [xxxxx]: received broken pipe signal

Thursday, March 29th, 2007

Today I received this error message when issuing a cvs import to the cvs repository

cvs [import failed]: received broken pipe signal

after googling a little bit I found this mail thread that led me to the following entry in the cvs manual about loginfo

Note that the filter program must read all of the log information or CVS may fail with a broken pipe signal.

so I took a look to the CVSROOT/loginfo and the line there was

ALL /usr/local/viewvc-1.0.0/bin/loginfo-handler %{sVv}

so I figured out that loginfo-handler from viewvc should be causing the problem. I went to the viewvc repository and find out the following comment on Revision 1518 of loginfo-handler

* bin/loginfo-handler Add some more debugging, and consume stdin so CVS’s pipe doesn’t back up (which causes an abort()).

I downloaded the latest version of loginfo-handler and tried to use it instead of the old one but I doesn’t work. You must upgrade to latest version of viewvc. So I tried another solution I modified a little bit the 1.0.0 loginfo-handler

*** loginfo-handler     2007-03-29 18:26:18.000000000 +0200
--- loginfo-handler-patched     2007-03-29 18:25:49.000000000 +0200
***************
*** 266,271 ****
--- 266,274 ----
      if len(sys.argv) > 3:
          error('Bad arguments')

+     debug('Discarded from stdin:')
+     debug(map(lambda x: '   ' + x, sys.stdin.readlines())) # consume stdin
+
      repository = cvsdb.CleanRepository(repository)
      directory, files = fun(arg, repository)

and now it seems to work.

UPDATE:: There is another way (easier) to solve this problem without editing loginfo-handler just change the line

ALL /usr/local/viewvc-1.0.0/bin/loginfo-handler %{sVv}

in your /CVSROOT/loginfo file with

ALL (/usr/local/viewvc-1.0.0/bin/loginfo-handler %{sVv};cat) >/dev/null

this also consumes all stdin data upon completion avoiding the received broken pipe signal.

Cygwin problem: Can’t access /cygdrive/c

Monday, September 4th, 2006

I’ve lost my ability to see my c: drive from cygwin. when I do

cd c:

or

cd /cygdrive/c

all goes ok. But if I do

ls

then it complains

ecerulm@rlm-ecb4fe6cda1 /cygdrive/c $ ls ls: reading directory .: No such file or directory

I found something at this forum and also here So it seems that I screwed up permission (maybe it related to some automatic windows update). So after checking my username and group are the right on with

id

I notice that I can perform

cd /cygdrive/c/Documents\ And\ Settings

and see the contents of that directory so I must be some problem with the permission at the root folder c:

So I right-click the c drive and click on Properties. In the security tab added permission to “Read & execute” to Everyone but I didn’t solve the problem so I guess I have to live with this little anoyance.