Page 1 of 1

[_impl_KMemCacheFree] *** Warning: Freeing buffer to foreign

Posted: Sat Jun 25, 2016 10:59 am
by javierdlr
Is it a bug in my snes9xgui code or....

[_impl_KMemCacheFree] *** Warning: Freeing buffer to foreign cache
[_impl_KMemCacheFree] ** Warning: Task snes9xGUI.debug freeing object 0x609B5F98 to wrong cache primary heap emu cache 4928 (not compact, hash 27)
[_impl_KMemCacheFree] *** Warning: Freeing buffer to foreign cache
[_impl_KMemCacheFree] ** Warning: Task snes9xGUI.debug freeing object 0x5D526338 to wrong cache primary heap emu cache 4928 (not compact, hash 29)
[_impl_KMemCacheFree] *** Warning: Freeing buffer to foreign cache
[_impl_KMemCacheFree] ** Warning: Task snes9xGUI.debug freeing object 0x495D91C8 to wrong cache primary heap emu cache 4928 (not compact, hash 14)

Code: Select all

...
Object *newobj = NULL;
...
// Create/set new preview (, dispose old), "reassign" new and refresh window/pagetab
if( (newobj=IIntuition->NewObject(BitMapClass, NULL, //"bitmap.image",
                                  IA_Scalable,TRUE, BITMAP_Screen,screen,
                                  BITMAP_SourceFile,filename, TAG_DONE)) )
{
 ILayout->SetPageGadgetAttrs(GAD(OID_PREVIEW_BTN), OBJ(OID_GENERAL), pw,
                             NULL, BUTTON_RenderImage,newobj, TAG_DONE); // pagetab
 IIntuition->DisposeObject( OBJ(OID_PREVIEW_IMG) );
 OBJ(OID_PREVIEW_IMG) = newobj;
}
else { ... }
ILayout->RefreshPageGadget(GAD(OID_PREVIEW_BTN), OBJ(OID_GENERAL), pw, NULL);
...

TIA

--
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P

Re: [_impl_KMemCacheFree] *** Warning: Freeing buffer to for

Posted: Sun Jul 03, 2016 9:44 pm
by TSK
I asked the kernel guy what such error message from another software means and he said it's usually a buffer overrun/underrun.

Re: [_impl_KMemCacheFree] *** Warning: Freeing buffer to for

Posted: Mon Jul 04, 2016 6:23 pm
by javierdlr
TSK wrote:I asked the kernel guy what such error message from another software means and he said it's usually a buffer overrun/underrun.
ok. thx. But is problem of my c code (solved by raising stack value), or is it some internal "problem" (exec, intuition, classes,...)

Re: [_impl_KMemCacheFree] *** Warning: Freeing buffer to for

Posted: Wed Jul 06, 2016 4:13 pm
by TSK
Mr. Frieden said the kernel doesn't have such problems so the problem must be on an application side. Your code in the first post looks good. Are you sure that code part generates those error messages and it's not some other part of the code causing it ?

Re: [_impl_KMemCacheFree] *** Warning: Freeing buf..(SOLVED)

Posted: Fri Jul 08, 2016 1:07 pm
by javierdlr
TSK wrote:Mr. Frieden said the kernel doesn't have such problems so the problem must be on an application side. Your code in the first post looks good. Are you sure that code part generates those error messages and it's not some other part of the code causing it ?
thx, will try to do some more tests (or maybe a simplifly the gui and see what happens.)

EDIT: find culprit, was allocating/freeing unneeded variables/objects, once removed such allocate()/free() no more warnings. THX