Closed Mi-La closed 3 years ago
Can you get a backtrace? https://developer.pidgin.im/wiki/GetABacktrace
I think this could be enough?
(Pidgin:15550): Json-CRITICAL **: 11:20:20.706: json_array_get_object_element: assertion 'JSON_NODE_HOLDS_OBJECT (node) || JSON_NODE_HOLDS_NULL (node)' failed
Thread 1 "pidgin" received signal SIGSEGV, Segmentation fault.
0x00007ffff550a580 in g_str_hash () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
(gdb) bt full
#0 0x00007ffff550a580 in g_str_hash () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#1 0x00007ffff55099d4 in g_hash_table_lookup () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fffdec0ca9f in rc_process_room_message (ya=ya@entry=0x555555e08e50, message_obj=message_obj@entry=0x0, roomarg=roomarg@entry=0x5555565d90d0) at librocketchat.c:1256
...
The message was just the string "test."
Looks like it might be the same as issue #10 What version of the rocket.chat plugin are you using?
I believe the latest master from github (built from source). But I don't see the plugin in the plugin list :-(.
Or at least the last one before the switch from HG to Git. Currently I cannot build it:
$ git log
commit 60f44206285c5f42e736b3f313d3db732a520ce2 (HEAD -> master, origin/master, origin/branches/default/tip, origin/HEAD)
Merge: cdd0160 163bad0
Author: Eion Robb <eionrobb@gmail.com>
Date: Tue Apr 16 10:20:44 2019 +0000
Merged in thmo/purple-rocketchat/thmo/use-hg-instead-of-git-for-plugin_version-1555409888423 (pull request #9)
Use 'hg' instead of 'git' for PLUGIN_VERSION.
$ make
abort: there is no Mercurial repository here (.hg not found)
make: Nothing to be done for 'all'.
edit: It seems that the message "Nothing to be done for 'all'" only means that it's already built and it's unrelated to the mercurial error (just trying to get revision id)...
I tried to reinstlall the plugin with latest version from master and I've no crash right now, but I also cannot send messages and cannot add any buddy :-(. But it seems that we have also some problem with the RC server, because also webapp behaves strangely. I'll post an update here once the server is fixed...
Server seems to be working now. However I still have the same crash. One of my colleagues who is on Windows installed the latest plugin from https://docs.rocket.chat/guides/administrator-guides/plug-ins/pidgin and it doesn't crash anymore. However my version - latest master - built from source on Ubuntu 18.04 still crashes :-(. Do you any hints what to try? Is it possible that it will work with newer Pidgin? Ubuntu 18.04 is quite old and it has Pidgin version 2.12.
The plugin version info should show up in Help->Plugin Info (the list is ordered in file system name order so librocketchat should show up, as Rocket.Chat, about halfway down the list)
It sounds like the server is coming back with the new, unexpected data structure that should have been resolved in #10 but might be a newer one on a newer server. Odd that your colleagues aren't getting the same crash that you are if you're all on the same, latest master code.
The next steps are to grab a larger debug log from just before the crash, to see what the last received server message was. You'll need to follow the "GetADebugLog" wiki instructions from the pidgin.im site, or run pidgin from the command line with the --debug flag
Sorry for the crashes. I do try to preemptively handle these things, but for some of the larger data structure changes that rocket.chat throw in without consideration for backwards compatibility, it can break things in a spectacular way ☹️
Oooooh.. It's working now! I'm very sorry for bothering you since it was my fault at the end. Originally I was using a bitbucket mirror from here: https://github.com/mcepl/purple-rocketchat. And now I was accidentally building the new version still from that repo :cold_sweat:.
Thank you very much for the support, but I think we can close the issue since it's really fixed in the latest version.
However I still get the crash when somebody use: "Start a Discussion". I'll try to get the backtrace and post a new issue.
Since we have upgraded the RocketChat server to 3.9.4, our Pidgin with this plugin installed just crash when new message arrives.
Please also note that it sometimes crashed before the server upgrade, but only when somebody replied via "start a discussion" (or maybe "reply in thread", I'm not sure which one caused the problem). But now it crashes on each regular message. If you need more info, please let me know how I can get some logs or whatever useful. Thanks!
In any case, I believe that the plugin should never cause crash of the whole Pidgin, but maybe it's a problem in Pidgin's plugin system. Shouldn't the plugin e.g. catch all exception within itself?