A
Allen Mitchell
Platform: Windowx XP
I have an application using FXRuby (1.0.24). In this application I have a
left/right split with client records on the left and detail records on the
right. On a selection change in the left window, I use a thread to populate
the right window with the details.
I am getting a memory access violation while stressing the application with
the use of the up and down arrow keys in the left window. This causes
multiple threads to queue on a mutex to populate the right window. Without
fail, this results in a memory access violation. I rebuilt ruby ( VC6 ),
added map and COD files and debugged it thru Dr. Watson.
This analysis always points me to the same line of code in rb_newobj
(gc.c )...
VALUE
rb_newobj()
{
VALUE obj;
if (!freelist) rb_gc();
obj = (VALUE)freelist;
freelist = freelist->as.free.next; <----------------------------------
MEMZERO((void*)obj, RVALUE, 1);
return obj;
}
I am starting to suspect that there is an error in GC that only manifests
itself in a threaded application under load.
To confirm this, I disabled GC at the start of the app and tried to cause it
to fail. I could not make it fail... however an application that grew to
300+ MB isn't much use.
I'm going to settle into the C code, but I was just wondering if anyone else
has had an occurance of the same sort of thing.
I have also seen something like this in 1.6.8, but it was very infrequent in
comparison to 1.8.0.
Matz, I can forward logs and map files if they would be of any assistance.
Thanks...
I have an application using FXRuby (1.0.24). In this application I have a
left/right split with client records on the left and detail records on the
right. On a selection change in the left window, I use a thread to populate
the right window with the details.
I am getting a memory access violation while stressing the application with
the use of the up and down arrow keys in the left window. This causes
multiple threads to queue on a mutex to populate the right window. Without
fail, this results in a memory access violation. I rebuilt ruby ( VC6 ),
added map and COD files and debugged it thru Dr. Watson.
This analysis always points me to the same line of code in rb_newobj
(gc.c )...
VALUE
rb_newobj()
{
VALUE obj;
if (!freelist) rb_gc();
obj = (VALUE)freelist;
freelist = freelist->as.free.next; <----------------------------------
MEMZERO((void*)obj, RVALUE, 1);
return obj;
}
I am starting to suspect that there is an error in GC that only manifests
itself in a threaded application under load.
To confirm this, I disabled GC at the start of the app and tried to cause it
to fail. I could not make it fail... however an application that grew to
300+ MB isn't much use.
I'm going to settle into the C code, but I was just wondering if anyone else
has had an occurance of the same sort of thing.
I have also seen something like this in 1.6.8, but it was very infrequent in
comparison to 1.8.0.
Matz, I can forward logs and map files if they would be of any assistance.
Thanks...