Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location

by Anonymous Monk
on Dec 03, 2012 at 09:54 UTC ( #1006834=note: print w/ replies, xml ) Need Help??


in reply to Re: if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location
in thread if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location

You don't say :/ that isn't exactly new to me :)

dependencywalker won't try to load two dlls at once, so I can't trigger this error using that tool

Usually, I'll get a drwtsn32 popup, which'll tell me which dll the memory access violation happened upon (not just the perl/xs dll)

I have WinDbg , but there is nothing extra there if I attach (F6) to   perl.exe -e " require Digest::SHA1; scalar <>; require XML::LibXML; " and Go (F5) or "Go Handled Exception" from Debug menu

ModLoad: 00ca0000 00f84000 ....auto\XML\LibXML\LibXML.dll (8e8.aec): Access violation - code c0000005 (first chance) First chance exceptions are reported before any exception handling. This exception may be expected and handled. eax=0022ed8c ebx=00ca1420 ecx=00009599 edx=00000001 esi=0022ed14 edi=0 +0000001 eip=00ca1427 esp=0022ece8 ebp=0022ed20 iopl=0 nv up ei pl nz a +c pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=0 +0010216

I recognize c0000005 but I don't see a faulting module and fault addressss

I get this on two different perl versions (v5.14.1 , v5.16.1 ) , with two different gcc

gcc version 4.6.3 (gcc-4.6.3 release with patches [build 20121012 by p +erlmingw.sf.net]) gcc version 4.7.0 (GCC) (mingw.org)

Any other ideas I can try?


Comment on Re^2: if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location
Select or Download Code
Re^3: if Digest::SHA1 loaded Can't load LibXML/LibXML.dll Invalid access to memory location
by bulk88 (Priest) on Dec 03, 2012 at 15:55 UTC
    Dependency walker can "profile" a process, menubar->profile->start profiling, it will log every DLL static and dynamic linked during the whole run life of the process.

    Since I assume you are using Mingw, you need to compile the XS module without "-s" so it has debugging info then use the gdb infrastructure so you have symbols and can see the original C code and original var names. I can't give any specifics to WinDbg since its UI is much more difficult than VS Debugger. You probably have to goto disassembly window in WinDbg, see the current instruction address, or use register EIP in the dump above. Then figure out which mapped into address space DLL that EIP falls into. You can use http://virtualmemorymapview.codeplex.com/releases/view/28113 or MS's VMMap to see where the DLLs are in that processes memory.

      Dependency walker can "profile" a process, menubar->profile->start profiling, it will log every DLL static and dynamic linked during the whole run life of the process.

      I don't see any "profile" option

        Well, I managed to "see" it, but it is persistently greyed out, how do you turn it on?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006834]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (14)
As of 2014-10-21 19:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (106 votes), past polls