-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Out of memory error when creating a chart #1727
Comments
After close Eclipse will not restart. |
So it's running out of heap while restarting, trying to re-open the editor you had open. Please try increasing the -Xmx... |
After changing to 2GB I do not get the OOME but an IOOBE. stackjava.lang.ArrayIndexOutOfBoundsException: Index 466020624 out of bounds for length 466020624 at org.eclipse.swt.graphics.ImageData.blit(ImageData.java:1921) at org.eclipse.swt.graphics.Image.directToDirect(Image.java:1793) at org.eclipse.swt.graphics.Image.init(Image.java:1897) at org.eclipse.swt.graphics.Image.init(Image.java:2111) at org.eclipse.swt.graphics.Image.(Image.java:497) at org.eclipse.birt.chart.reportitem.ui.DesignerRepresentation.paintChart(DesignerRepresentation.java:358) at org.eclipse.birt.chart.reportitem.ui.DesignerRepresentation.paintClientArea(DesignerRepresentation.java:324) at org.eclipse.draw2d.Figure.paint(Figure.java:1229) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.figures.ReportRootFigure.paintChildren(ReportRootFigure.java:121) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1312) at org.eclipse.draw2d.Figure.paint(Figure.java:1229) at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1275) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1308) at org.eclipse.draw2d.Figure.paint(Figure.java:1229) at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1275) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1308) at org.eclipse.draw2d.Figure.paint(Figure.java:1229) at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1275) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1308) at org.eclipse.draw2d.ScalableFreeformLayeredPane.paintClientArea(ScalableFreeformLayeredPane.java:73) at org.eclipse.draw2d.Figure.paint(Figure.java:1229) at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1275) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1308) at org.eclipse.draw2d.Figure.paint(Figure.java:1229) at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1275) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1303) at org.eclipse.draw2d.Viewport.paintClientArea(Viewport.java:161) at org.eclipse.draw2d.Figure.paint(Figure.java:1229) at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1275) at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1308) at org.eclipse.draw2d.Figure.paint(Figure.java:1229) at org.eclipse.draw2d.DeferredUpdateManager.paint(DeferredUpdateManager.java:168) at org.eclipse.draw2d.LightweightSystem.paint(LightweightSystem.java:202) at org.eclipse.draw2d.LightweightSystem.lambda$0(LightweightSystem.java:110) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4285) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1160) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1184) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1169) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1540) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4769) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5050) at org.eclipse.swt.internal.win32.OS.UpdateWindow(Native Method) at org.eclipse.swt.widgets.Decorations.setVisible(Decorations.java:1293) at org.eclipse.swt.widgets.Shell.setVisible(Shell.java:2097) at org.eclipse.swt.widgets.Shell.open(Shell.java:1306) at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.postProcess(WBWRenderer.java:741) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:676) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1079) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605) at org.eclipse.equinox.launcher.Main.run(Main.java:1481) |
Looking at this stack trace, the birt things it haven't changed for quite a few years, so that leaves draw2d and swt differences and the potential candidates. I would expect this to be reproducible with a debug launch... |
I'd like to be able to reproduce the problem. Would it be possible to provide "idiot-resistant" steps? Or a zip with the project with the project and what should be opened to see the problem? |
Please drop this report birt_76FtdlC3hW.mp4 |
... remove the .txt extension after you dropped it. |
Mmm. It works in the debug launch for me as well. I do have a deep path for my runtime C:\Users\jongw\Downloads\birt-report-designer-all-in-one-4.16.0-202406071258-win32.win32.x86_64\eclipse |
I tried a really long name too but no problems. D:/Users/test36/birt-Downloads-birt-report-designer-all-in-one-4.16.0-202406071258-win32.win32.x86_64/eclipse/birt.exe Maybe you can try not having it in the Downloads folder. Unless I can reproduce the problem somewhere somehow, I'm not sure what to do. BTW, here is the saved result. I wonder if you have problems when you open that? |
BTW, I have this local modified version of BIRT.setup for generating the *.target I've been committing, but I have not commit the setup itself. So you can use this locally to ensure that the target platform is exactly like the one used by the actual product built by Tycho: You of course need to replace the existing one with this copy, and do Help -> Perform Setup Tasks. You only need to run this task: |
Of course I will hold of the release for this, but I am at a complete loss for how to help with a problem that I cannot reproduce... I'll be a car soon until later in the afternoon so that also will limit my helpfulness today. |
Hi together, I have retested the latest milestone "BIRT 4.16.0 Milestone - S202406071258" with the "all in one designer" from my side with Windows 10. I used the default download-link "birt-report-designer-all-in-one-4.16.0-202406071258-win32.win32.x86_64.zip" And changed nothing from my side and used your report @wimjongman I didn't got the "event loop exception". I got only an information. Have you used your local dev-environment (with the latest changes) or our official download link? |
Hi, thanks for testing. I have Windows 11. I downloaded the milestone again. This time I extracted it outside Downloads with a shorter path I opened Ed's report without any issues but as soon as I added a chart it failed again. firefox_PTYuQXt3dE.mp4 |
After increasing the memory I get the java.lang.ArrayIndexOutOfBoundsException: Index 466020624 out of bounds for length 466020624 |
Just for info: In countries which use a decimal comma instead of a decimal point, editing sizes manually in the dialogs is often a matter of luck: Do I have to enter a point or a comma, and if so, is it interpreted as a decimal separator or as a thousands separator? |
@claesrosell When I change the size manually I can open the report without issues. |
@claesrosell Thanks for finding the root cause. Now we need to figure out why it resizes to that format for me and not for the others. I have windows 11, but when I run it from a Launch configuration everything works as expected. I will try the launch config with the new target platform Ed gave me. |
@merks your new setup runs in an error |
The updated catalogs were promoted a few hours ago so I will need to make adjustments to the setup now. Which is hard to do from a speeding car. I’ll be home in about 2 hours. Perhaps try to fiddle with an explicit -nl argument in the launch or in the unpackaged application to test that theory. @ptziegler maybe this rings a bell? |
This version should work with the latest catalogs: |
That's it. @speckyspooky did you not change some things in the dimension calculations? |
But, all that being said, it doesn't actually crash for me... |
This is what I mean with "confusion". |
I agree with the locale-specific concerns. It's a nightmare, but not easily unraveled at this point in the game. 😱 |
BTW, I was trying -nl nl_NL to be more like en_US. |
FYI, I also tried to launch like this to maybe replicate what happens when the locale is determine directly from the environment but still I can't replicate the problem even though I see it using "," values: I don't think I can help further. 😭 |
Maybe Wim can use the debugger and look at the same steps like Ed, but in his environment? |
Any -nl value that I set is fine -nl nl -nl en_US When I don't set -nl is where it bombs |
What is the value of the LC_CTYPE environment variable in your environment? Mine is |
I do not have this property. Suggested workaroundWhat i see today is that it fails in my situation when there is no -nl flag in the ini file. When I put the flag the situation is resolved. I think we can just add the -nl flag to the generated ini and then release. |
The -nl is followed by the locale. I don't think setting it to en_US is a proper solution. What does sysinfo tell you? It just seems to me if you can reproduce it under debug control we should be able to find out where things go wrong. 😢 Is the local that does the formatting really nl_NL and not something else/strange in the case it break? |
We cannot just add an -nl to the product to work around a problem that appears to happen on only your machine. |
Yes, I did not think this through. We do not have an installer that can set it. |
Here are the props in my failing setting no -nlosgi.nl = en_US |
if I do Locale.getLocales() then en_NL is not in that list. |
If I add nl_PP or nl_EN or en_NL explicitly then everything is ok. |
The property combination is really odd!
|
Ok, I found a solution. |
Sometimes NumberFormat is used to handle the decimal point and in other cases there is a dependency on ULocale. A small fix was made to use the default ULocale in the Numberformat calculations instead of the default NumberFormat The whole operation is not fully understood so more issues could arise. See the issue for a discussion.
1. Sometimes NumberFormat is used to handle the decimal point and in other cases there is a dependency on ULocale. A small fix was made to use the default ULocale in the Numberformat calculations instead of the default NumberFormat The whole operation is not fully understood so more issues could arise. 2. To avoid memory cramps, an additional 1GB was added to the maximum memory. See the issue for a discussion.
Sometimes NumberFormat is used to handle the decimal point and in other cases there is a dependency on ULocale. A small fix was made to use the default ULocale in the Numberformat calculations instead of the default NumberFormat The whole operation is not fully understood so more issues could arise. See the issue for a discussion.
1. Sometimes NumberFormat is used to handle the decimal point and in other cases there is a dependency on ULocale. A small fix was made to use the default ULocale in the Numberformat calculations instead of the default NumberFormat The whole operation is not fully understood so more issues could arise. 2. To avoid memory cramps, an additional 1GB was added to the maximum memory. See the issue for a discussion.
Steps to reproduce
!ENTRY org.eclipse.ui 4 0 2024-06-11 11:35:50.977
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.OutOfMemoryError: Java heap space)
at org.eclipse.swt.SWT.error(SWT.java:4922)
at org.eclipse.swt.SWT.error(SWT.java:4837)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4058)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3676)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
at org.eclipse.equinox.launcher.Main.run(Main.java:1481)
Caused by: java.lang.OutOfMemoryError: Java heap space
at org.eclipse.swt.graphics.ImageData.(ImageData.java:451)
at org.eclipse.swt.graphics.ImageData.(ImageData.java:262)
at org.eclipse.swt.graphics.Image.directToDirect(Image.java:1791)
at org.eclipse.swt.graphics.Image.init(Image.java:1897)
at org.eclipse.swt.graphics.Image.init(Image.java:2111)
at org.eclipse.swt.graphics.Image.(Image.java:497)
at org.eclipse.birt.chart.reportitem.ui.DesignerRepresentation.paintChart(DesignerRepresentation.java:358)
at org.eclipse.birt.chart.reportitem.ui.DesignerRepresentation.paintClientArea(DesignerRepresentation.java:324)
at org.eclipse.draw2d.Figure.paint(Figure.java:1229)
at org.eclipse.birt.report.designer.internal.ui.editors.schematic.figures.ReportRootFigure.paintChildren(ReportRootFigure.java:121)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1312)
at org.eclipse.draw2d.Figure.paint(Figure.java:1229)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1275)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1308)
at org.eclipse.draw2d.Figure.paint(Figure.java:1229)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1275)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1308)
at org.eclipse.draw2d.Figure.paint(Figure.java:1229)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1275)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1308)
at org.eclipse.draw2d.ScalableFreeformLayeredPane.paintClientArea(ScalableFreeformLayeredPane.java:73)
at org.eclipse.draw2d.Figure.paint(Figure.java:1229)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1275)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1308)
at org.eclipse.draw2d.Figure.paint(Figure.java:1229)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1275)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1303)
at org.eclipse.draw2d.Viewport.paintClientArea(Viewport.java:161)
at org.eclipse.draw2d.Figure.paint(Figure.java:1229)
at org.eclipse.draw2d.Figure.paintChildren(Figure.java:1275)
at org.eclipse.draw2d.Figure.paintClientArea(Figure.java:1308)
at org.eclipse.draw2d.Figure.paint(Figure.java:1229)
The text was updated successfully, but these errors were encountered: