Re: Compiling Protocol-Plugin c++ (MinGW)
Eion Robb <[email protected]>
| Newsgroups | gmane.comp.gnome.gaim.devel |
|---|---|
| Message-ID | <CAFt0mkp=FsVfgv9++Ku+RtGqbfjYUi48SrgEmei9+SFeXYeOOA@mail.gmail.com> |
SIGINT isn't really a useful thing to backtrace on, the Pidgin.rpt in %appdata%\.purple might be more helpful I'm also surprised to see the lack of plugin_load and plugin_unload functions. Maybe once you have your actual source online we can give comment to what's going on. :) You can also look at some other c++ based prpls to see if there's anything there that might help: http://altrepo.eu/git/purple-line/blob/master/libpurple/pluginmain.cpp https://github.com/EionRobb/skype4pidgin/blob/master/libskypekit/libskypekit.h#L189 https://github.com/EionRobb/pidgin-opensteamworks/blob/master/libsteamworks.h#L28 (although the LINE one is probably better to base things on as they actually know C++ and i was just muddling my way through with skypekit/opensteamworks :D ) On 21 October 2016 at 09:25, Farc <[email protected]> wrote: > Hey, > I didn't uploaded the source of my plugin yet. I have to clean up the code > first (some password-stuff and so on), I might be able to do it tomorrow. > But I can show you the reduced cpp I've written which causes excactly the > same issue. You can find it here: http://pastebin.com/WbNy1nMr > When I compile it with gcc in c-mode it works fine, but with g++ it causes > the described issue. > > Here is the backtrace after the first 2 "warnings": > (22:18:07) wpurple: wpurple_cleanup > (22:18:08) winpidgin: winpidgin_cleanup > warning: Invalid parameter passed to C runtime function. > > warning: Invalid parameter passed to C runtime function. > > [New Thread 2620.0xf78] > > Program received signal SIGINT, Interrupt. > [Switching to Thread 2620.0xf78] > 0x74fa7577 in KERNEL32!CtrlRoutine () from C:\Windows\syswow64\kernel32. > dll > (gdb) bt full > #0 0x74fa7577 in KERNEL32!CtrlRoutine () > from C:\Windows\syswow64\kernel32.dll > No symbol table info available. > #1 0x5f9fd79a in ?? () > No symbol table info available. > #2 0x00000000 in ?? () > No symbol table info available. > (gdb) > > After the next 2 "warnings" it ends with code 03. > > Best regards, > Farc > > > > Am 20.10.2016 um 21:57 schrieb Eion Robb: > > Hi there, > > I've seen something similar happen with the LINE plugin, which is also > written in C++. It looked like the C++ engine was freeing the memory when > the plugin_unload() function was called and the main LINE object destructor > was called. > > Is your code online somewhere that I can have a play with and attach a few > debuggers to? Do you also have some backtraces of where it's crashing? > It'd be great to see if its dying in the same place. > > Cheers, > Eion > > On 21 October 2016 at 07:21, Farc <[email protected]> wrote: > >> Hello, >> >> I'm currently developing a protocol-plugin for plugin with c++. But I'm >> struggling with MinGW under Windows 7 (There are no problems on Debian 8 >> and g++). Compiling works fine and it runs without crashes, but it crashes >> pidgin when it's exiting. >> >> These are the last lines of output from GDB: >> >> (01:49:33) wpurple: wpurple_cleanup >> (01:49:33) winpidgin: winpidgin_cleanup >> warning: Invalid parameter passed to C runtime function. >> >> warning: Invalid parameter passed to C runtime function. >> >> warning: Invalid parameter passed to C runtime function. >> >> warning: Invalid parameter passed to C runtime function. >> >> Without GDB Windows 7(64bit) presents an error message. >> >> I thought it might have something to do with my code. So I reduced my >> plugin to really simple block of code which is just needed by pidgin to be >> recognized as a protocol plugin. And the same happens when exiting. But if >> I compile it in c-mode (I've tried alot of stuff...) pidgin exits normal >> without crashing. >> >> Hopefully someone can help me. Thx >> >> _______________________________________________ >> Devel mailing list >> [email protected] >> https://pidgin.im/cgi-bin/mailman/listinfo/devel > > > > _______________________________________________ Devel mailing list [email protected] https://pidgin.im/cgi-bin/mailman/listinfo/devel