[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] windom and gcc4



 
I have seen too that Zview crash before quit, this is true now I try to remember I never find why, it is possible that it is when unload ldg, personnaly as I not unload ldg with this function for my application I never see it. I can try to find this bug in some days.
I know where the bug is I just don't know why it happens, it seems like incorrect allocation in the first place, ldg_unload:

if( ldg) {
        if( ldg->close) (*ldg->close)();
        Mfree( ((BASPAG *)ldg->baspag)->p_env);
        Mfree( ldg->baspag);
        ldg->baspag = NULL;
        }

crash occurs on the last line, ldg->baspage = NULL (!), if I comment this out, everything is OK. It seems that Mfree() frees more than it should (i.e. freeing also the memory where 'ldg' points to)

--
MiKRO / Mystic Bytes
http://mikro.atari.org