Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#790 FreeMind fails to start in / or $HOME - mode unavail

FreeMind_0.8.0
open
Linux (67)
6
2009-01-20
2008-12-29
Jakub Holý
No

Under Ubuntu, when running FreeMind from either the root directory / or my home folder /home/jholy it fails with "Mode not available: MindMap." However, when running e.g. from some subfolder of my home, for instance /home/jholy/tmp, it runs correctly.

Stack trace:
jholy@cubalibre:~$ /usr/share/freemind/freemind.sh

Looking for user properties:
/home/jholy/.freemind/user.properties

User properties found.
Default (System) Look & Feel: com.sun.java.swing.plaf.gtk.GTKLookAndFeel
[Freemind-Developer-Internal-Warning (do not write a bug report, please)]: Tried to get view without being able to get map module.

(<unknown>:2471): Gtk-WARNING **: Attempting to add a widget with type GtkButton to a GtkComboBoxEntry (need an instance of GtkEntry or of a subclass)

(<unknown>:2471): Gtk-CRITICAL **: gtk_widget_realize: assertion `GTK_WIDGET_ANCHORED (widget) || GTK_IS_INVISIBLE (widget)' failed
Dec 29, 2008 4:51:50 PM freemind.modes.ModesCreator getAllModes
INFO: Modes:[freemind.modes.browsemode.BrowseMode, freemind.modes.filemode.FileMode, freemind.modes.mindmapmode.MindMapMode]
Dec 29, 2008 4:51:50 PM freemind.modes.ModesCreator getMode
INFO: Initializing mode MindMap
Dec 29, 2008 4:51:50 PM freemind.modes.mindmapmode.MindMapController <init>
INFO: createIconActions
Dec 29, 2008 4:51:50 PM freemind.modes.mindmapmode.MindMapController <init>
INFO: createNodeHookActions
Dec 29, 2008 4:51:51 PM freemind.modes.ModesCreator getMode
SEVERE: Mode freemind.modes.mindmapmode.MindMapMode could not be loaded.
java.lang.NullPointerException
at freemind.extensions.ImportWizard.addClassesFromDir(ImportWizard.java:128)
at freemind.extensions.ImportWizard.addClassesFromDir(ImportWizard.java:164)
at freemind.extensions.ImportWizard.addClassesFromDir(ImportWizard.java:164)
at freemind.extensions.ImportWizard.addClassesFromDir(ImportWizard.java:164)
at freemind.extensions.ImportWizard.addClassesFromDir(ImportWizard.java:164)
at freemind.extensions.ImportWizard.buildClassList(ImportWizard.java:76)
at freemind.extensions.HookFactory.actualizePlugins(HookFactory.java:148)
at freemind.extensions.HookFactory.searchFor(HookFactory.java:111)
at freemind.extensions.HookFactory.getPossibleNodeHooks(HookFactory.java:95)
at freemind.modes.mindmapmode.MindMapController.createNodeHookActions(MindMapController.java:238)
at freemind.modes.mindmapmode.MindMapController.<init>(MindMapController.java:149)
at freemind.modes.mindmapmode.MindMapMode.init(MindMapMode.java:43)
at freemind.modes.ModesCreator.getMode(ModesCreator.java:89)
at freemind.controller.Controller.changeToMode(Controller.java:441)
at freemind.main.FreeMind.<init>(FreeMind.java:300)
at freemind.main.FreeMind.main(FreeMind.java:647)
Exception in thread "main" java.lang.NullPointerException
at freemind.main.FreeMind.main(FreeMind.java:652)

This is the command used to run FreeMind (printed after setting export DEBUG=script):
/usr/lib/jvm/java-6-sun/jre/bin/java -Dfreemind.base.dir=/usr/share/freemind -cp :.:/usr/share/freemind/lib/freemind.jar:/usr/share/freemind/lib/ant/lib/jaxb-api.jar:/usr/share/freemind/lib/ant/lib/jaxb-impl.jar:/usr/share/freemind/lib/ant/lib/jaxb-libs.jar:/usr/share/freemind/lib/ant/lib/namespace.jar:/usr/share/freemind/lib/ant/lib/xsdlib.jar:/usr/share/freemind/lib/ant/lib/jax-qname.jar:/usr/share/java/forms.jar:/usr/share/java/commons-lang.jar:/usr/share/java/jaxp-1.2.jar:/usr/share/java/relaxngDatatype.jar:/usr/share/java/commons-codec.jar:/usr/share/freemind freemind.main.FreeMind
----------------------
Environment:
FreeMind: 0.8.1 (installed from standard Ubuntu repository)
OS: Ubuntu Hardy
Java: either GIJ 1.5.0 (gij (GNU libgcj) version 4.2.4) or Sun java 1.6.0_07

Discussion

  • Jakub Holý
    Jakub Holý
    2008-12-29

    This may be related to bug 2025279, which has been fixed in rev.1.1.4.6.2.16 inn 7/2008 of ImportWizard.java. However the exception happens at a different place so it doesn't seem to be a simple duplicate.

     
  • Eric L.
    Eric L.
    2008-12-30

    • milestone: --> FreeMind_0.8.0
     
  • Jakub Holý
    Jakub Holý
    2009-01-19

    I'm not currently able to reproduce the problem because I fixed the code to be able to use it. The problem is caused by a subdirectory of the startup directory that is not accessible by the user running freemind - in this case File.list() does return unhandled null, see lines 127-128 in http://freemind.cvs.sourceforge.net/viewvc/freemind/freemind/freemind/extensions/ImportWizard.java?revision=1.1.4.5&view=markup&pathrev=fm-0-8-1
    According to the JavaDoc, this is a "correct" result: "Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs. " - I suppose that underneath there was an I/O error due to the insufficient access privileges.

    However adding check for null isn't enough because then another problem comes into light: namely FreeMind startup process block because it searches the startup folder and its subfolders for mode .xml files, which takes a long, long time (I've never the patience to wait till the end). I don't know if this is a common problem or is related to the size of my home dir (some 10s GB) and the fact that a part of it is on an encrypted filesystem.

    I've opened a bug with the Ubuntu maintainer of FreeMind to start it in some subdirectory of a home directory (e.g. ./.freemind) to prevent both the problems, see https://bugs.launchpad.net/ubuntu/+source/freemind/+bug/312241

     
  • Eric L.
    Eric L.
    2009-01-20

    Hi Chris,

    I reassign the bug to you because it's a generic one: FreeMind fails to start properly if a sub-directory of the current directory (.) is inaccessible (no read/list access) to the user.
    The error seems to be in ImportWizard.java and should be fixed for 0.9.0, I think, though a workaround is relatively easy.

    Jakub, you said something about a patch, can you attach it to this bug report?

    Thanks, Eric

     
  • Eric L.
    Eric L.
    2009-01-20

    • priority: 5 --> 6
    • assigned_to: ewl --> christianfoltin
     
  • Jakub Holý
    Jakub Holý
    2009-01-21

    Fixed ImportWizard rev. 1.1.4.5 regarding the privileges.

     
    Attachments
  • Jakub Holý
    Jakub Holý
    2009-01-21

    Fix of http://freemind.cvs.sourceforge.net/viewvc/\*checkout*/freemind/freemind/freemind/extensions/ImportWizard.java?revision=1.1.4.5&pathrev=fm-0-8-1 provided.

    However this only fixes the original problem caused by insufficient directory privileges. As I've mentioned the last time, there is another problem, namely that it searches for mode definition XMLs for inacceptably long time. For that I've no fix, only a workaround - running FM from an empty folder w/o subfolders.