Garbage collector: Out of memory (when running AWT/SWING code on arm-linux)
Andrew Haley
aph@redhat.com
Tue Sep 9 09:46:00 GMT 2008
ffileppo wrote:
>> ffileppo wrote:
>>>> ffileppo wrote:
>>>>>> Hi guys,
>>>>>>
>>>>>> I'm getting the following error:
>>>>>>
>>>>>> GC Warning: Out of Memory! Returning NIL!
>>>>>>
>>>>>> when I try to run any AWT/SWING code compiled with arm-linux-gcj on my embedded box (PXA270 - 128MB Ram). (Other code just runs fine)
>
>>>> I think I've found it. The unwinder is infinitely looping 'til it runs out
>>>> of memory.
>>>>
>>>> Some library somewhere has probably has invalid unwind information.
>>>>
>>>> Add this line to _Jv_StackTrace::UnwindTraceFn in stacktrace.cc:
>>>>
>>>> *** stacktrace.cc~ Tue Sep 4 19:00:31 2007
>>>> --- stacktrace.cc Fri Jun 6 17:42:25 2008
>>>> ***************
>>>> *** 110,115 ****
>>>> --- 110,117 ----
>>>> // Check if the trace buffer needs to be extended.
>>>> if (pos == state->length)
>>>> {
>>>> + return _URC_END_OF_STACK;
>>>> +
>>>> int newLength = state->length * 2;
>>>> void *newFrames = _Jv_AllocBytes (newLength * sizeof(_Jv_StackFrame));
>>>> memcpy (newFrames, state->frames, state->length * sizeof(_Jv_StackFrame));
>>>>
>>>> This will prevent more than 100 stack frames from being traced.
>>> I confirm it's working now.
>>>
>> OK, right. I'm going to have to fix this one properly: it's a serious bug
>> that prevents anyone from running any GUI applications on gcj/ARM eabi.
>>
>> Andrew.
>>
>
>
> Hi Andrew,
>
> is this fix included in mainline gcj yet?
http://developer.classpath.org/pipermail/classpath-patches/2008-June/006116.html
More information about the Java
mailing list