sunqueen / vlc-2.2.1.32-2013.noasm

vlc-2.2.1 compile with VS2013 update 4 (not support assembly)
GNU General Public License v2.0
1 stars 0 forks source link

Crash problem #1

Open zhanjx1314 opened 9 years ago

zhanjx1314 commented 9 years ago

I compiled the debug version, and then I ran winvlc.exe But it crashed.

breakpoint at Line 89 in plugin.c code: void module_Unload( module_handle_t handle ) { FreeLibrary( handle ); }

handle value :
handle = 0x77670000 {librtp_plugin.dll!_IMAGE_DOS_HEADER ImageBase} handle = 0x0f9b0000 {liblibbluray_plugin.dll!_IMAGE_DOS_HEADER ImageBase}

Call Stack:

eb7745bd()  unknown
[下面的框架可能不正确和/或缺失]   
[外部代码]  

libvlccore.dll!module_Unload(void * handle) Line 89 C libvlccore.dll!AllocatePluginFile(module_bank * bank, const char * abspath, const char * relpath, const _stat64 * st) Line 536 C libvlccore.dll!AllocatePluginDir(module_bank * bank, unsigned int maxdepth, const char * absdir, const char * reldir) Line 488 C libvlccore.dll!AllocatePluginDir(module_bank * bank, unsigned int maxdepth, const char * absdir, const char * reldir) Line 492 C libvlccore.dll!AllocatePluginPath(vlc_object_t * p_this, const char * path, cache_mode_t mode) Line 401 C libvlccore.dll!AllocateAllPlugins(vlc_object_t * p_this) 行 328 C libvlccore.dll!module_LoadPlugins(vlc_object_t * obj) 行 184 C libvlccore.dll!libvlc_InternalInit(libvlc_int_t * p_libvlc, int i_argc, const char * * ppsz_argv) 行 151 C libvlc.dll!libvlc_new(int argc, const char * const * argv) 行 60 C winvlc.exe!WinMain(HINSTANCE * hInstance, HINSTANCE * hPrevInstance, char * lpCmdLine, int nCmdShow) 行 180 C

thanks!

zhanjx1314 commented 9 years ago

it same as "sunqueen/vlc-2.1.4.32.subproject-2013-update2#2 Runtime access violation in FreeLibrary() #2 " i was added ‘ memset(module, '\0', sizeof(module));“ in entry.c
but Still the same. thanks !

sunqueen commented 9 years ago

p {margin-top:0px;margin-bottom:0px;}

Hi.   I'm very sorry. As I was said, I don't have problem like that. So I have no idear, what is problem... 6^^;;;;;   This is my system. Win 7 32 bits. VS2013 update 4. .Net 4.5      --------- 원본 메일 ---------

보낸사람: zhanjx1314 notifications@github.com 받는사람 : "sunqueen/vlc-2.2.1.32-2013.noasm" vlc-2.2.1.32-2013.noasm@noreply.github.com 날짜: 2015년 5월 14일 목요일, 14시 01분 08초 +0900 제목: Re: [vlc-2.2.1.32-2013.noasm] Crash problem (#1)

it same as "sunqueen/vlc-2.1.4.32.subproject-2013-update2#2 Runtime access violation in FreeLibrary() #2 " i was added ‘ memset(module, '\0', sizeof(module));“ in entry.c

but Still the same. thanks ! — Reply to this email directly or view it on GitHub.

p {font-size:10pt ! important;font-family:돋움,'굴림',gulim,tahoma,sans-serif ! important;}

Toxsch commented 9 years ago

Hi, I found something new. 1, The problem only occurs in Windows 8.1; 2, The plugins which have crashed have this code:

extern "C" void *_decode_pointer(void *ptr);
void *_decode_pointer(void *ptr)
{
    return DecodePointer(ptr);
}
extern "C" void *_encode_pointer(void *ptr);
void *_encode_pointer(void *ptr)
{
    return EncodePointer(ptr);
}
mediabuff commented 9 years ago

Hi Do you plan to make this available for VS2015 ? The above problem is still not resolved in VS2013 version.

sunqueen commented 9 years ago

Hi.

I'm very sorry. 6^^;;;;;;; My os is still win7...

sunqueen commented 9 years ago

Hi. I add libkernel32.lib I hope it works for your problem. ^^ Have a nice day!!!

mediabuff commented 9 years ago

to which project ?

mediabuff commented 9 years ago

I downloaded the latest code. Even after DECODE_POINTER and libkernel32.lib the crash occurs on plugins which have _decode_pointer

The crash occurs on module unload when _mingw_onexit calls into _decode_pointer

mediabuff commented 9 years ago

Ok, I remove the effectives of DecodePointer, by returning the original ptr, with the encode/decode, in dllmain.cpp

ifdef DECODE_POINTER

extern "C" void _decode_pointer(void ptr) { //return DecodePointer(ptr); return ptr; }

extern "C" void _encode_pointer(void ptr) { //return EncodePointer(ptr); return ptr; }

endif

But the problem is not above. You still get access violation as there is some "heap corruption" , below as in libbluray.dll

ntdll.dll!_RtlValidateHeap@12()    Unknown
KernelBase.dll!_HeapValidate@12()  Unknown

msvcr120d.dll!CrtIsValidHeapPointer() Unknown msvcr120d.dll!msize_dbg() Unknown msvcr120d.dll!dllonexit() Unknown msvcr120d.dll!dllonexit() Unknown liblibbluray_plugin.dll!_mingw_onexit() Unknown

sunqueen commented 9 years ago

Hi. I still don't find to remove that... I'm very sorry. 6^^;

sunqueen commented 9 years ago

Hi. Please download again. ^^ I'm not test, but I remove decodepointer and encodepointer. I hope, it works. Have a nice day...

mediabuff commented 9 years ago

Thanks for the changes. As I was saying before, this is not where the bug is. There is a heap corruption some where else in the program. This happens when you load these specific modules and unload them.