Giter Site home page Giter Site logo

Comments (5)

boothj5 avatar boothj5 commented on June 12, 2024

What is the output of the locale command in your terminal?

There is a known issue with non utf8 encodings profanity-im/profanity#672

I did try with a non utf8 encoding, and couldn't get the segfault, either the character doesn't appear (ubuntu) or a question mark is displayed (osx).

If possible a backtrace might help: http://www.profanity.im/issues.html#backtrace

from profanity-plugins.

ReneVolution avatar ReneVolution commented on June 12, 2024

locale output:

[] ➜ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

This is the backtrace:

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000008

VM Regions Near 0x8:
-->
__TEXT 0000000103064000-00000001030fe000 [ 616K] r-x/rwx SM=COW /usr/local/bin/profanity

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 profanity 0x00000001030d93fb python_pre_chat_message_display_hook + 267 (python_plugins.c:244)
1 profanity 0x00000001030d632f plugins_pre_chat_message_display + 95 (plugins.c:215)
2 profanity 0x00000001030a2778 chatwin_incoming_msg + 120 (chatwin.c:238)
3 profanity 0x0000000103083b78 _sv_ev_incoming_otr + 168 (server_events.c:410)
4 profanity 0x00000001030839e8 sv_ev_incoming_message + 216 (server_events.c:450)
5 profanity 0x0000000103077bdd _chat_handler + 541 (message.c:794)
6 libstrophe.0.dylib 0x00000001034be2ff handler_fire_stanza + 511 (handler.c:101)
7 libstrophe.0.dylib 0x00000001034bc4e7 _handle_stream_stanza + 87 (conn.c:971)
8 libstrophe.0.dylib 0x00000001034c753b _end_element + 75 (parser_expat.c:159)
9 libexpat.1.dylib 0x0000000103725012 doContent + 3698
10 libexpat.1.dylib 0x0000000103723029 contentProcessor + 53
11 libexpat.1.dylib 0x00000001037200b8 XML_ParseBuffer + 178
12 libstrophe.0.dylib 0x00000001034bded5 xmpp_run_once + 1413 (event.c:296)
13 profanity 0x000000010307225e jabber_process_events + 78 (connection.c:293)
14 profanity 0x0000000103069dfc prof_run + 268 (profanity.c:131)
15 profanity 0x00000001030e251f main + 607 (main.c:144)
16 libdyld.dylib 0x00007fff9620a5ad start + 1

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff89d34ff6 kevent_qos + 10
1 libdispatch.dylib 0x00007fff8d98c099 _dispatch_mgr_invoke + 216
2 libdispatch.dylib 0x00007fff8d98bd01 _dispatch_mgr_thread + 52

Strangely it sometimes displays the emoticon before segfaulting.
Let me know if you need more info.

from profanity-plugins.

boothj5 avatar boothj5 commented on June 12, 2024

Thanks for the info, it helped a lot.

The emoticons themselves seemed to work ok, but if there were any other unicode characters in the received message, I'd see the segfault.

I believe its fixed now by a change I've made to the plugin 5faccde

Let me know if it works for you.

from profanity-plugins.

ReneVolution avatar ReneVolution commented on June 12, 2024

Thanks for the fast reply ... the only thing i'd add is to encode the input_str as well.
This seems to work perfectly fine for me.

from profanity-plugins.

ReneVolution avatar ReneVolution commented on June 12, 2024

Forget what i said about encoding the input_str ... that would actually segfault whenever there is a utf-8 char in the original message.

from profanity-plugins.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.