This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Crash when using a Plugin with xml

0

Hi,

I have written a Plugin for Wireshark wich includes the library mxml. The compile of the plugin is successfull. But when I start wireshark with my plugin wireshark crashes. Do you have any experiences with using an external dll (mxml) in your own plugin? The problem seems to be in 'mxmlloadfile'...

Thanks

asked 10 Jan '12, 05:46

Nic's gravatar image

Nic
14556
accept rate: 0%


One Answer:

0

I'm assuming, as you mention dll, your platform is Windows. If so, are you sure your external dll is linked to the same c runtime library as Wireshark and your plugin?

Try starting Wireshark under a debugger and report the error you see.

answered 10 Jan '12, 05:56

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

Sorry, forgot to mention it, yes the platform is windows. I build only the plugin and not wireshark. The plugin is running while I don't call the mxmlloadfile. When I call other functions from the dll everthing works.... I try to get the debug messages

(10 Jan '12, 06:00) Nic

Do you build the external dll. What is it (mxml)?

(10 Jan '12, 08:17) grahamb ♦

mxml is a free library for xml-parsing

(11 Jan '12, 02:06) Nic

Now I found the problem. It wasn't in the plugin but in the xml-library....

(11 Jan '12, 02:07) Nic

That's not much of an answer, would you like to elaborate?

(11 Jan '12, 02:38) grahamb ♦

Both dlls (mxml and the wireshark dll) included mscvr90.dll (from VisualStudio 2008). The mxml-lib was build with an other version of this dll than the wireshark plugin. So the internal dependencies were wrong. This caused the crash when calling some functions from the mxml lib.

(11 Jan '12, 03:49) Nic

Ok, so my original answer was in the right area, I'll move your "answer" to a comment on that answer.

Can you mark the answer as "accepted".

(11 Jan '12, 03:59) grahamb ♦
showing 5 of 7 show 2 more comments