EionRobb / pidgin-pushbullet

A Pushbullet plugin for Pidgin
GNU General Public License v3.0
42 stars 12 forks source link

Pidgin crashes on correct token #18

Open CanadianEngineer opened 7 years ago

CanadianEngineer commented 7 years ago

When I enter in my gmail email, and my token, Pidgin crashes when it tries to connect.

When I was installing the app, after running make && sudo make install, I was getting the following warnings:

gcc -Wall -I. -g -O2 -fPIC -pipe libpushbullet.c -o libpushbullet.so -pthread -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libpurple -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lpurple -lglib-2.0 -shared libpushbullet.c: In function ‘pb_set_base64_icon_for_buddy’: libpushbullet.c:112:19: warning: variable ‘icon’ set but not used [-Wunused-but-set-variable] PurpleBuddyIcon *icon; ^ libpushbullet.c: In function ‘pb_fetch_url’: libpushbullet.c:200:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat=] g_string_append_printf(headers, "Content-Length: %d\r\n", strlen(postdata)); ^ libpushbullet.c: In function ‘pb_socket_got_data’: libpushbullet.c:324:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘guint64’ [-Wformat=] purple_debug_info("pushbullet", "frame_len: %d\n", frame_len); ^ libpushbullet.c: In function ‘pb_got_phone_thread’: libpushbullet.c:509:8: warning: unused variable ‘len’ [-Wunused-variable] guint len; ^ libpushbullet.c: In function ‘pb_got_everything’: libpushbullet.c:792:16: warning: unused variable ‘type’ [-Wunused-variable] const gchar *type = json_object_get_string_member(error, "type"); ^ libpushbullet.c:923:17: warning: unused variable ‘image_url’ [-Wunused-variable] const gchar *image_url = json_object_get_string_member(contact, "image_url"); ^ libpushbullet.c:941:17: warning: unused variable ‘image_url’ [-Wunused-variable] const gchar *image_url = json_object_get_string_member(contact, "image_url"); ^ libpushbullet.c:955:16: warning: unused variable ‘text’ [-Wunused-variable] JsonObject *text = json_array_get_object_element(texts, i); ^ andrew@lampert:~/Downloads/pidgin-pushbullet-master$ sudo make install mkdir -m 0755 -p /usr/lib/purple-2 install -m 0644 libpushbullet.so /usr/lib/purple-2/libpushbullet.so mkdir -m 0755 -p /usr/share/pixmaps/pidgin/protocols/16 install -m 0644 icons/pushbullet16.png /usr/share/pixmaps/pidgin/protocols/16/pushbullet.png mkdir -m 0755 -p /usr/share/pixmaps/pidgin/protocols/22 install -m 0644 icons/pushbullet22.png /usr/share/pixmaps/pidgin/protocols/22/pushbullet.png mkdir -m 0755 -p /usr/share/pixmaps/pidgin/protocols/48 install -m 0644 icons/pushbullet48.png /usr/share/pixmaps/pidgin/protocols/48/pushbullet.png

EionRobb commented 7 years ago

Can you get a backtrace? https://developer.pidgin.im/wiki/GetABacktrace

CanadianEngineer commented 7 years ago
I can't seem to get the backtracing to work, but now its telling
  me that "The resource could not be found."
TimBarkley commented 7 years ago

Hello,

Thanks for the help.

I am running into the same issue. Below is the back trace that resulted from the link you provided above.

GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1 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 "x86_64-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//usr/bin/pidgin...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/x86_64-linux-gnu/libthread_db.so.1". Couldn't create plugins dir [New Thread 0x7fffdc1f1700 (LWP 2992)] [New Thread 0x7fffdb52a700 (LWP 2994)] [New Thread 0x7fffdad29700 (LWP 2995)] [New Thread 0x7fffda528700 (LWP 2996)] [New Thread 0x7fffd8aa8700 (LWP 2997)] [Thread 0x7fffdad29700 (LWP 2995) exited] [Thread 0x7fffd8aa8700 (LWP 2997) exited]

Thread 1 "pidgin" received signal SIGSEGV, Segmentation fault. purple_account_get_int (account=0x31, name=name@entry=0x7fffde867b20 "last_message_timestamp", default_value=default_value@entry=0) at /build/pidgin-DIrcTX/pidgin-2.10.12/./libpurple/account.c:2443 2443 /build/pidgin-DIrcTX/pidgin-2.10.12/./libpurple/account.c: No such file or directory. (gdb) bt full 0 purple_account_get_int (account=0x31, name=name@entry=0x7fffde867b20 "last_message_timestamp", default_value=default_value@entry=0) at /build/pidgin-DIrcTX/pidgin-2.10.12/./libpurple/account.c:2443 setting = func = "purple_account_get_int" 1 0x00007fffde866dab in pb_got_everything (pba=0x555555d17d70, node=, user_data=) at libpushbullet.c:820 last_message_timestamp = rootobj = devices = 0x555555c4b340 pushes = 0x555555c652e0 contacts = 0x555555c20ac0 chats = 0x555555c4c340 texts = 0x555555c649a0 i = len = pbgroup = 0x555555cef7b0 2 0x00007fffde865760 in pb_response_callback (url_data=, user_data=0x555555d1d200, url_text=0x555555d23de0 "{\"accounts\":[],\"blocks\":[],\"channels\":[],\"chats\":[],\"clients\":[],\"contacts\":[],\"devices\":[],\"grants\":[],\"pushes\":[],\"profiles\":[],\"subscriptions\":[],\"texts\":[]}", len=, error_message=) at libpushbullet.c:150 root = 0x555555c65f00 conn = 0x555555d1d200 parser = 0x555555dbd1c0 3 0x00007ffff525ba4d in url_fetch_recv_cb (url_data=0x555555d21d10, source=, cond=) at /build/pidgin-DIrcTX/pidgin-2.10.12/./libpurple/util.c:3995 gfud = 0x555555d21d10 len = buf = "HTTP/1.0 200 OK\r\nX-Ratelimit-Limit: 131072\r\nX-Ratelimit-Remaining: 131072\r\nX-Ratelimit-Reset: 1482278341\r\nContent-Type: application/json; charset=utf-8\r\nX-Cloud-Trace-Context: 7ed73663be77b5e97e7ae091"... data_cursor = got_eof = func = "url_fetch_recv_cb" 4 0x00005555555c5e1e in pidgin_io_invoke (source=, condition=, data=0x55555652f4e0) at /build/pidgin-DIrcTX/pidgin-2.10.12/./pidgin/gtkeventloop.c:73 closure = 0x55555652f4e0 purple_cond = PURPLE_INPUT_READ 5 0x00007ffff553805a in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. 6 0x00007ffff5538400 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. 7 0x00007ffff5538722 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 No symbol table info available. 8 0x00007ffff67de6a7 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 No symbol table info available. 9 0x000055555558c378 in main (argc=1, argv=0x7fffffffe1a8) at /build/pidgin-DIrcTX/pidgin-2.10.12/./pidgin/gtkmain.c:884 opt_force_online = 0 opt_help = opt_login = 0 opt_nologin = 0 opt_version = opt_si = opt_config_dir_arg = opt_login_arg = opt_session_arg = search_path = accounts = sig_indx = 1 sigset = {__val = {16390, 0 <repeats 15 times>}} errmsg = '\000' <repeats 728 times>... signal_channel = signal_status = signal_channel_watcher = 1 segfault_message_tmp = error = 0x0 opt = gui_check = debug_enabled = migration_failed = 0 active_accounts = long_options = {{name = 0x555555629291 "config", has_arg = 1, flag = 0x0, val = 99}, {name = 0x555555617659 "debug", has_arg = 0, flag = 0x0, val = 100}, { name = 0x555555625211 "force-online", has_arg = 0, flag = 0x0, val = 102}, {name = 0x5555556191da "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x5555556250bd "login", has_arg = 2, flag = 0x0, val = 108}, { name = 0x55555562521e "multiple", has_arg = 0, flag = 0x0, val = 109}, {name = 0x555555625227 "nologin", has_arg = 0, flag = 0x0, val = 110}, {name = 0x555555629287 "session", has_arg = 1, flag = 0x0, val = 115}, { name = 0x55555561b9dd "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55555562929a "display", has_arg = 1, flag = 0x0, val = 68}, {name = 0x555555625de3 "sync", has_arg = 0, flag = 0x0, val = 83}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}

apippin commented 7 years ago

I'm running into the same issue as well. Here's what my backtrace looks like from gdb:

(Pidgin:30380): Json-CRITICAL **: json_object_get_string_member: assertion 'node != NULL' failed

(Pidgin:30380): Json-CRITICAL **: json_object_get_array_member: assertion 'node != NULL' failed

(Pidgin:30380): Json-CRITICAL **: json_array_get_length: assertion 'array != NULL' failed

(Pidgin:30380): Json-CRITICAL **: json_object_get_string_member: assertion 'node != NULL' failed

(Pidgin:30380): Json-CRITICAL **: json_object_get_array_member: assertion 'node != NULL' failed

(Pidgin:30380): Json-CRITICAL **: json_array_get_length: assertion 'array != NULL' failed

(Pidgin:30380): Json-CRITICAL **: json_object_get_array_member: assertion 'node != NULL' failed

(Pidgin:30380): Json-CRITICAL **: json_array_get_length: assertion 'array != NULL' failed

Program received signal SIGSEGV, Segmentation fault. g_hash_table_lookup (hash_table=0x51, key=0x7fffe8216e20) at ghash.c:1147 1147 ghash.c: No such file or directory. in ghash.c Missing separate debuginfos, use: debuginfo-install pidgin-2.10.12-0.x86_64 (gdb) bt full

0 g_hash_table_lookup (hash_table=0x51, key=0x7fffe8216e20) at ghash.c:1147

    node_hash = <value optimized out>
    __FUNCTION__ = "g_hash_table_lookup"

1 0x00000037ace43fe6 in purple_account_get_int () from /usr/lib64/libpurple.so.0

    srv_txt_query_ui_ops = 0x0

2 0x00007fffe8215e23 in pb_got_everything () from /usr/lib64/purple-2/libpushbullet.so

No symbol table info available.

3 0x00007fffe8214a60 in pb_response_callback () from /usr/lib64/purple-2/libpushbullet.so

No symbol table info available.

4 0x00000037ace9ba01 in url_fetch_recv_cb () from /usr/lib64/libpurple.so.0

No symbol table info available.

5 0x0000000000468fae in pidgin_io_invoke ()

No symbol table info available.

6 0x00007ffff69cd1dc in g_main_dispatch (context=0x90a340) at gmain.c:3201

    dispatch = 0x7ffff6a0ff30 <g_io_unix_dispatch>
    prev_source = <value optimized out>
    was_in_call = 0
    user_data = 0xf5f170
    callback = 0x468f80 <pidgin_io_invoke>
    cb_funcs = 0x7ffff6c8cf80
    cb_data = 0x150a6b0
    need_destroy = <value optimized out>
    source = 0x18275e0
    current = 0xe25cb0
    i = <value optimized out>

7 g_main_context_dispatch (context=0x90a340) at gmain.c:3854

No locals.

8 0x00007ffff69cd528 in g_main_context_iterate (context=0x90a340, block=Unhandled dwarf expression opcode 0xf3

) at gmain.c:3927 max_priority = 2147483647 timeout = 2192 some_ready = 1 nfds = allocated_nfds = fds = 0x151e860

9 0x00007ffff69cd83a in g_main_loop_run (loop=0x1516bc0) at gmain.c:4123

    __FUNCTION__ = "g_main_loop_run"

10 0x00007ffff7a95d17 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0

No symbol table info available.

11 0x0000000000480628 in main ()

No symbol table info available.

I'm running on RHEL6 with Pidgin version 2.10.12 and libpurple 2.10.12.

apippin commented 7 years ago

It turns out I was hitting this issue due to issue #13. After following the steps outlined in that issue by nelmsee on Dec 12, 2016, I was able to get things working.