EionRobb / skype4pidgin

Skype Plugin for Pidgin, libpurple and more
https://github.com/EionRobb/skype4pidgin/tree/master/skypeweb#skypeweb-plugin-for-pidgin
624 stars 88 forks source link

skypeweb_login received signal SIGSEGV, Segmentation fault #600

Open remotehelp opened 6 years ago

remotehelp commented 6 years ago

23.03.2018 with latest/master version skype4pidgin-master pidgin crashed ;( Pidgin version:

Pidgin 2.12.0 (libpurple 2.12.0)

OS:

$ uname -a
Linux falian 4.9.0-6-686-pae #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) i686 GNU/Linux

Debug info:

$ gdb pidgin 2>&1 | tee ~/pidgin-backtrace.log
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pidgin...Reading symbols from /usr/lib/debug/.build-id/ee/7ab5203483ea122a688cb5bd1a1eb5a6ad7bbd.debug...done.
done.
(gdb) handle SIGPIPE nostop noprint
Signal        Stop  Print   Pass to program Description
SIGPIPE       No    No  Yes     Broken pipe
(gdb) run
Starting program: /usr/bin/pidgin 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb2167b40 (LWP 7224)]
[New Thread 0xb1208b40 (LWP 7225)]
[New Thread 0xb08ffb40 (LWP 7226)]

Thread 1 "pidgin" received signal SIGSEGV, Segmentation fault.
skypeweb_login (account=0x1236d90) at libskypeweb.c:334
334     flags |= PURPLE_CONNECTION_FLAG_HTML | PURPLE_CONNECTION_FLAG_NO_BGCOLOR | PURPLE_CONNECTION_FLAG_NO_FONTSIZE;
(gdb) bt full
#0  skypeweb_login (account=0x1236d90) at libskypeweb.c:334
        pc = 0x0
        sa = 0x1da3568
        flags = <error reading variable flags (Cannot access memory at address 0x4)>
#1  0xb69e5054 in purple_account_connect (account=0x1236d90) at ././libpurple/account.c:1319
        prpl = 0x118fdf8
        password = <optimized out>
        username = <optimized out>
        prpl_info = 0x11c7f50
        __func__ = "purple_account_connect"
#2  0xb69e5be2 in purple_accounts_restore_current_statuses () at ././libpurple/account.c:3152
        l = 0x1235800
        account = 0x1236d90
#3  0x00512973 in main (argc=<optimized out>, argv=<optimized out>) at ././pidgin/gtkmain.c:918
        opt_force_online = <optimized out>
        opt_help = <optimized out>
        opt_login = <optimized out>
        opt_nologin = <optimized out>
        opt_version = <optimized out>
        opt_si = <optimized out>
        opt_config_dir_arg = <optimized out>
        opt_login_arg = <optimized out>
        opt_session_arg = <optimized out>
        search_path = <optimized out>
        accounts = <optimized out>
        sig_indx = 1
        sigset = {__val = {91142, 0 <repeats 31 times>}}
        errmsg = '\000' <repeats 2401 times>...
        signal_channel = <optimized out>
        signal_status = <optimized out>
        signal_channel_watcher = <optimized out>
        segfault_message_tmp = <optimized out>
        error = 0x0
        opt = <optimized out>
        gui_check = <optimized out>
        debug_enabled = <optimized out>
        migration_failed = 0
        active_accounts = <optimized out>
        long_options = {{name = 0x5b2049 "config", has_arg = 1, flag = 0x0, val = 99}, {
            name = 0x5a0a9d "debug", has_arg = 0, flag = 0x0, val = 100}, {
            name = 0x5ae186 "force-online", has_arg = 0, flag = 0x0, val = 102}, {
            name = 0x5a2598 "help", has_arg = 0, flag = 0x0, val = 104}, {
            name = 0x5ae032 "login", has_arg = 2, flag = 0x0, val = 108}, {
            name = 0x5ae193 "multiple", has_arg = 0, flag = 0x0, val = 109}, {
            name = 0x5ae19c "nologin", has_arg = 0, flag = 0x0, val = 110}, {
            name = 0x5b203f "session", has_arg = 1, flag = 0x0, val = 115}, {
            name = 0x5a4c79 "version", has_arg = 0, flag = 0x0, val = 118}, {
            name = 0x5b2052 "display", has_arg = 1, flag = 0x0, val = 68}, {
            name = 0x5aec8d "sync", has_arg = 0, flag = 0x0, val = 83}, {name = 0x0, 
            has_arg = 0, flag = 0x0, val = 0}}

Without ~/.purple/plugins/libskypeweb.so plugin pidgin run properly

remotehelp commented 6 years ago

Strange behavior...

I check ~/.purple/accounts.xml file and cut "<account>...</account>" section with "prpl-skypeweb" protocol that like this:

    <account>
        <protocol>prpl-skypeweb</protocol>
        <name>SECRET_LOGIN</name>
        <password>SECRET_PASSWORD</password>
        <alias>SECRET_ALIAS</alias>
        <settings>
            <setting name='use-global-buddyicon' type='bool'>1</setting>
            <setting name='show-typing-as-icon' type='bool'>0</setting>
            <setting name='last_message_timestamp' type='int'>1516874150</setting>
            <setting name='show-typing-as-text' type='bool'>0</setting>
            <setting name='' type='bool'>0</setting>
            <setting name='buddy_icon_timestamp' type='int'>0</setting>
        </settings>
        <settings ui='gtk-gaim'>
            <setting name='auto-login' type='bool'>1</setting>
        </settings>
        <current_error/>
    </account>

and save file ~/.purple/accounts.xml then start pidgin with ~/.purple/plugins/libskypeweb.so plugin - pidgin run properly.

After I close pidgin and paste back <account>...</account> in ~/.purple/accounts.xml and start pidgin with ~/.purple/plugins/libskypeweb.so plugin - pidgin run properly. But my skype contact list disappear from group "My skype alias" and appeared in group as named "Skype" - I had to manualy move back my skype contacts from "Skype" to "My skype alias".

After this operations I again look in to ~/.purple/accounts.xml and now skype "<account>...</account>" section present as:

    <account>
        <protocol>prpl-skypeweb</protocol>
        <name>SECRET_LOGIN</name>
        <password>SECRET_PASSWORD</password>
        <alias>SECRET_ALIAS</alias>
        <statuses>
            <status type='Online' name='В сети' active='true'>
                <attributes/>
            </status>
            <status type='Away' name='Отошёл' active='false'>
                <attributes/>
            </status>
            <status type='Busy' name='Не беспокоить' active='false'>
                <attributes/>
            </status>
            <status type='Hidden' name='Невидимый' active='false'>
                <attributes/>
            </status>
            <status type='Offline' name='Не в сети' active='false'>
                <attributes/>
            </status>
        </statuses>
        <settings>
            <setting name='use-global-buddyicon' type='bool'>1</setting>
            <setting name='show-typing-as-icon' type='bool'>0</setting>
            <setting name='last_message_timestamp' type='int'>1481192134</setting>
            <setting name='show-typing-as-text' type='bool'>0</setting>
            <setting name='' type='bool'>0</setting>
            <setting name='buddy_icon_timestamp' type='int'>0</setting>
            <setting name='refresh-token'/>
        </settings>
        <settings ui='gtk-gaim'>
            <setting name='auto-login' type='bool'>1</setting>
        </settings>
        <current_error/>
    </account>

Now pidgin with ~/.purple/plugins/libskypeweb.so run fine. Strange bug