bardsoftware / ganttproject

Official GanttProject repository.
http://ganttproject.biz
GNU General Public License v3.0
890 stars 310 forks source link

OutOfMemory error when importing MPP file #880

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, today I tried to import an mpp file and I got the following error:

java.class.path: eclipsito.jar;.
java.home: C:\Program Files (x86)\Java\jre7
java.ext.dirs: C:\Program Files 
(x86)\Java\jre7\lib\ext;C:\windows\Sun\Java\lib\ext
java.io.tmpdir: C:\Users\peter.danailov\AppData\Local\Temp\
java.runtime.version: 1.7.0_51-b13
java.vendor: Oracle Corporation
java.vm.name: Java HotSpot(TM) Client VM
java.vm.vendor: Oracle Corporation
java.vm.version: 24.51-b03
os.arch: x86
os.name: Windows 7
os.version: 6.1
sun.java.command: org.bardsoftware.eclipsito.Boot 
ganttproject-eclipsito-config.xml -log
user.country: US
user.dir: C:\Program Files (x86)\GanttProject-2.6
user.home: C:\Users\peter.danailov
user.language: en
user.timezone: Europe/Minsk

Creating main frame...
1. loading look'n'feels
no editor for column=0 class=interface javax.swing.Icon
no editor for column=1 class=interface javax.swing.Icon
no editor for column=2 class=interface javax.swing.Icon
no editor for column=0 class=interface javax.swing.tree.TreeNode
2. loading options
3. creating menus...
4. creating views...
5. calculating size and packing...
6. changing language ...
7. changing look'n'feel ...
8. finalizing...
Main frame created
Splash closed
Feb 18, 2014 12:32:58 PM net.sourceforge.ganttproject.GPLogger logToLogger
WARNING: Java heap space
java.lang.OutOfMemoryError: Java heap space
    at net.sf.mpxj.mpp.MPPUtility.cloneSubArray(MPPUtility.java:1024)
    at net.sf.mpxj.mpp.FixedData.<init>(FixedData.java:163)
    at net.sf.mpxj.mpp.FixedData.<init>(FixedData.java:78)
    at net.sf.mpxj.mpp.FixedData.<init>(FixedData.java:61)
    at net.sf.mpxj.mpp.MPP14Reader.processTaskData(MPP14Reader.java:1303)
    at net.sf.mpxj.mpp.MPP14Reader.process(MPP14Reader.java:166)
    at net.sf.mpxj.mpp.MPPReader.read(MPPReader.java:98)
    at net.sf.mpxj.reader.AbstractProjectReader.read(AbstractProjectReader.java:66)
    at biz.ganttproject.impex.msproject2.ProjectFileImporter.run(ProjectFileImporter.java:174)
    at biz.ganttproject.impex.msproject2.ImporterFromMsProjectFile.run(ImporterFromMsProjectFile.java:63)
    at net.sourceforge.ganttproject.importer.ImportFileWizardImpl.onOkPressed(ImportFileWizardImpl.java:66)
    at net.sourceforge.ganttproject.gui.projectwizard.WizardImpl$3.actionPerformed(WizardImpl.java:86)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)

Is this something with the version of the Java that I have. Should I update?

Original issue reported on code.google.com by pdanai...@gmail.com on 18 Feb 2014 at 9:37

GoogleCodeExporter commented 9 years ago
Please try workaround described in issue #875. It is likely that fonts are 
eating too much memory.

Original comment by dbarashev on 18 Feb 2014 at 11:25

GoogleCodeExporter commented 9 years ago
I just erased the tag <dir name="C:/windows/fonts" absolute="true" /> 
from plugin.xml but the error still stays the same.

Original comment by pdanai...@gmail.com on 19 Feb 2014 at 3:39

GoogleCodeExporter commented 9 years ago
How big is your mpp file? You may try increasing the amount of memory available 
to Java Runtime. Unfortunately you can't do it for ganttproject.exe (which is 
associated with GanttProject shortcuts in Windows menus) but you can do it for 
ganttproject.bat which comes with ZIP distro (and with Windows distro too, 
AFAIR). Try replacing -Xmx512m with -Xmx1024m in ganttproject.bat and start 
that bat file

Original comment by dbaras...@ganttproject.biz on 19 Feb 2014 at 3:46

GoogleCodeExporter commented 9 years ago
It seems to be very small, but nothing is happening...No luck yet. Still the 
same error. I'm sending the file...

Original comment by pdanai...@gmail.com on 19 Feb 2014 at 4:13

Attachments:

GoogleCodeExporter commented 9 years ago
So, it seems to be a known bug in MPXJ library (which we use for reading MS 
Project files): http://sourceforge.net/p/mpxj/bugs/202/ 
They write that it was fixed a few months ago. Chances are that it will be 
fixed once we update MPXJ in GanttProject

Original comment by dbarashev on 19 Feb 2014 at 5:07

GoogleCodeExporter commented 9 years ago

Original comment by dbarashev on 19 Feb 2014 at 5:07

GoogleCodeExporter commented 9 years ago
So, I tried to replace mpxj.jar in GP with one from MPXJ 4.4.0 and this file 
exported fine. I don't think that we'll update MPXJ in GP 2.6.X branch, as it 
is kinda risky change. We'll do it in GP 2.7. You can download MPXJ from here: 
http://sourceforge.net/projects/mpxj/files/latest/download?source=files and 
extract mpxj.jar into plugins/biz.ganttproject.impex.msproject2/lib/ folder in 
your local GanttProject installation.

Original comment by dbarashev on 19 Feb 2014 at 11:39

GoogleCodeExporter commented 9 years ago
It works now. Thank you for the fast and reliable support. Best regards, Petar

Original comment by pdanai...@gmail.com on 20 Feb 2014 at 8:44

GoogleCodeExporter commented 9 years ago
Issue 948 has been merged into this issue.

Original comment by dbaras...@ganttproject.biz on 30 Jul 2014 at 1:57

GoogleCodeExporter commented 9 years ago
Issue 948 has been merged into this issue.

Original comment by dbaras...@ganttproject.biz on 30 Jul 2014 at 3:41

GoogleCodeExporter commented 9 years ago
This issue should be fixed in the published beta of GP 2.7

Original comment by dbarashev on 2 Sep 2014 at 8:37

GoogleCodeExporter commented 9 years ago
Issue 994 has been merged into this issue.

Original comment by dbaras...@ganttproject.biz on 6 Oct 2014 at 8:29

GoogleCodeExporter commented 9 years ago

Original comment by dbaras...@ganttproject.biz on 11 Nov 2014 at 10:36

GoogleCodeExporter commented 9 years ago
Hello,

I am also trying to import an .mmp file.
Initially I was getting the error described above, so I applied the fix 
suggested in post #7.
However now I get the following error:

java.class.path: eclipsito.jar;.
java.home: C:\Program Files\Java\jre7
java.ext.dirs: C:\Program Files\Java\jre7\lib\ext;C:\Windows\Sun\Java\lib\ext
java.io.tmpdir: C:\Users\PAULAC~1\AppData\Local\Temp\
java.runtime.version: 1.7.0_45-b18
java.vendor: Oracle Corporation
java.vm.name: Java HotSpot(TM) 64-Bit Server VM
java.vm.vendor: Oracle Corporation
java.vm.version: 24.45-b08
os.arch: amd64
os.name: Windows 7
os.version: 6.1
sun.java.command: org.bardsoftware.eclipsito.Boot 
ganttproject-eclipsito-config.xml -log
user.country: CA
user.dir: C:\Program Files (x86)\GanttProject-2.6
user.home: C:\Users\xxx
user.language: en
user.timezone: America/New_York

Creating main frame...
1. loading look'n'feels
no editor for column=0 class=interface javax.swing.Icon
no editor for column=1 class=interface javax.swing.Icon
no editor for column=2 class=interface javax.swing.Icon
no editor for column=0 class=interface javax.swing.tree.TreeNode
2. loading options
3. creating menus...
4. creating views...
5. calculating size and packing...
6. changing language ...
7. changing look'n'feel ...
8. finalizing...
Main frame created
Splash closed
Jan 13, 2015 4:52:04 PM net.sourceforge.ganttproject.GPLogger logToLogger
WARNING: 
net.sf.mpxj.mpp.ExtendedDocumentSummaryInformation.getPropertyStringValue(I)Ljav
a/lang/String;
java.lang.NoSuchMethodError: 
net.sf.mpxj.mpp.ExtendedDocumentSummaryInformation.getPropertyStringValue(I)Ljav
a/lang/String;
    at net.sf.mpxj.mpp.ExtendedDocumentSummaryInformation.getContentType(ExtendedDocumentSummaryInformation.java:53)
    at net.sf.mpxj.mpp.ProjectHeaderReader.process(ProjectHeaderReader.java:119)
    at net.sf.mpxj.mpp.MPP14Reader.processProjectHeader(MPP14Reader.java:245)
    at net.sf.mpxj.mpp.MPP14Reader.process(MPP14Reader.java:94)
    at net.sf.mpxj.mpp.MPPReader.read(MPPReader.java:132)
    at net.sf.mpxj.mpp.MPPReader.read(MPPReader.java:78)
    at net.sf.mpxj.reader.AbstractProjectReader.read(AbstractProjectReader.java:87)
    at biz.ganttproject.impex.msproject2.ProjectFileImporter.run(ProjectFileImporter.java:174)
    at biz.ganttproject.impex.msproject2.ImporterFromMsProjectFile.run(ImporterFromMsProjectFile.java:63)
    at net.sourceforge.ganttproject.importer.ImportFileWizardImpl.onOkPressed(ImportFileWizardImpl.java:66)
    at net.sourceforge.ganttproject.gui.projectwizard.WizardImpl$3.actionPerformed(WizardImpl.java:86)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.WaitDispatchSupport$2.run(Unknown Source)
    at java.awt.WaitDispatchSupport$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(Unknown Source)
    at java.awt.Dialog.show(Unknown Source)
    at java.awt.Component.show(Unknown Source)
    at java.awt.Component.setVisible(Unknown Source)
    at java.awt.Window.setVisible(Unknown Source)
    at java.awt.Dialog.setVisible(Unknown Source)
    at net.sourceforge.ganttproject.DialogBuilder$DialogImpl.show(DialogBuilder.java:144)
    at net.sourceforge.ganttproject.gui.projectwizard.WizardImpl.show(WizardImpl.java:139)
    at net.sourceforge.ganttproject.action.project.ProjectImportAction.actionPerformed(ProjectImportAction.java:47)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

Any ideas?

Thank you.

Original comment by paul.ach...@gmail.com on 13 Jan 2015 at 8:56

GoogleCodeExporter commented 9 years ago
Please try using GP 2.7 where this issue is fixed.

Original comment by dbaras...@ganttproject.biz on 13 Jan 2015 at 9:29

GoogleCodeExporter commented 9 years ago
Closing all tickets with status "FeelFreeToTest". Feel free to reopen if the 
issue is still reproducible.

Original comment by dbaras...@ganttproject.biz on 18 Mar 2015 at 3:39