Re: Compiling Protocol-Plugin c++ (MinGW)

Farc <[email protected]>
Newsgroups gmane.comp.gnome.gaim.devel
Message-ID <[email protected]>
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] 
> <mailto:[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] <mailto:[email protected]>
>     https://pidgin.im/cgi-bin/mailman/listinfo/devel
>     <https://pidgin.im/cgi-bin/mailman/listinfo/devel>
>
>

_______________________________________________
Devel mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.