Community
Participate
Working Groups
java.lang.OutOfMemoryError: Java heap space at java.base/java.util.Arrays.copyOf(Arrays.java:3745) at java.base/java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:172) at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:538) at java.base/java.lang.StringBuilder.append(StringBuilder.java:174) at org.eclipse.urischeme.internal.registration.ProcessExecutor.execute(ProcessExecutor.java:44) at org.eclipse.urischeme.internal.registration.RegistrationMacOsX.getLsRegisterOutput(RegistrationMacOsX.java:84) at org.eclipse.urischeme.internal.registration.RegistrationMacOsX.getSchemesInformation(RegistrationMacOsX.java:69) at org.eclipse.urischeme.AutoRegisterSchemeHandlersJob.run(AutoRegisterSchemeHandlersJob.java:87) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) i start eclipse with Xmx512G
512 Gigabytes? Really?
MB sry
builder.length() (int) 11329077
(In reply to Christian Dietrich from comment #3) > builder.length() > (int) 11329077 Cool. What's inside?
there are gazillion entries like -------------------------------------------------------------------------------- type id: com.apple.bundle (0x2276c) bundle: CoreTypes (0xc71c) uti: com.apple.bundle localizedDescription: "ar" = "مجموعة", "ca" = "paquet", "cs" = "balík", "da" = "softwarepakke", "de" = "Bundle", "el" = "δέσμη", "en" = "bundle", "en_AU" = "bundle", "en_GB" = "bundle", "es" = "paquete", "es_419" = "paquete", "fi" = "nippu", "fr" = "paquet", "fr_CA" = "paquet", "he" = "חבילה", "hi" = "बंडल", "hr" = "svežanj", "hu" = "csomag", "id" = "bundel", "it" = "bundle", "ja" = "バンドル", "ko" = "번들", "LSDefaultLocalizedValue" = "bundle", "ms" = "pakej", "nl" = "bundel", "no" = "pakke", "pl" = "pakiet", "pt" = "pacote", "pt_PT" = "bundle", "ro" = "pachet", "ru" = "пакет", "sk" = "balík", "sv" = "paket", "th" = "ชุดรวม", "tr" = "paket", "uk" = "пакет", "vi" = "bó", "zh_CN" = "捆绑包", "zh_HK" = "套裝", "zh_TW" = "套件" flags: active apple-internal exported core trusted is-wildcard (0000000000000275) conforms to: public.directory
I believe you can't expect Eclipse IDE to do anything useful if started with 512 MB max heap. If you do not plan to work with the IDE, but it is just some build task that shouldn't care about AutoRegisterSchemeHandlersJob, I would recommend to run it with custom product preference org.eclipse.urischeme/skipAutoRegistration=true. No idea however hot to get the preference into your (probably maven) task.
(In reply to Andrey Loskutov from comment #6) > I believe you can't expect Eclipse IDE to do anything useful if started with > 512 MB max heap. Possibly. However, calling that lsregister, assembling its stdout into a single string and then parsing that is a poor implementation. It should be possible to parse the InputStream line-by-line and extract the needed information. And the parsing itself in RegistrationMacOsX looks rather poor and memory-intensive, too. Moreover, reading from that lsregister process is implemented in a very simplistic way. Maybe that acceptable since this thing runs in a job, but note that if that lsregister command for whatever reason hangs, then so does this job.
until now i never had problems with Xmx512M with simple hello world projects workspaces