Autocompletion list crashes the application

Issue #688 new
Timóteo created an issue

If the autocompletion list is invoked a second time - say, first typing s on the text editor, erasing and then typing s again - the application will crash and close at once.

I'm using Linux Mint 18 Cinnamon 64-bits. I installed SpeedCrunch from the 64-bit DEB file, but the problem persists with the .tar.bz2 binary. A friend of mine, using the same Mint system, reported no issues.

Execution of the application through the terminal generates the text output in the attached screenshot after reproducing the error.

Edit: Text file is gdb log when reproducing the error on a debug build.

Comments (17)

  1. Felix Krull

    I can't reproduce this on a Linux Mint 18 VM either. @Mutoh Did you use SpeedCrunch on that system before? If so, could you try moving the ~/.config/SpeedCrunch and ~/.local/share/SpeedCrunch directories out of the way and see if that helps?

  2. Timóteo reporter

    @fk Yes, I did use SpeedCrunch on this system before. I had built it from a repository download made on November 16, and the same error was already happening back then. However, I assumed it was simply because I was running an untested version of the application, so I uninstalled it without giving much thought and left it be.

    I tried your recommendation of moving these directories but the error persists.

  3. Pol Welter

    This does indeed sound like a corrupted/incompatible session (i.e. history variables,...). I have a hunch that you can indeed fix this by deleting some file somewhere. I am not on Linux though, so I don't know where else we store files.

    If you can solve it, I would love to see the culprit file. Probably it's us who are to blame after all ;)

  4. Helder Correia repo owner

    @Mutoh Any chance you can run SpeedCrunch through a debugger and send us the backtrace? In case you know nothing about what I just said, run gdb speedcrunch in the terminal, then type r<Enter>, wait for crash, then type bt<Enter>. Of course, you may need to install gdbfirst.

    Sorry if this info is too basic for you, but I don't like to assume the technical knowledge of a user, and this may be useful for someone else that arrives here with no knowledge at all.

  5. Timóteo reporter

    @heldercorreia I'm actually not very used to gdb, which I use only sporadically, so I thank you for your consideration. This is the output content from when I followed your instructions (the gdb commands were provided from a text file):

    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 speedcrunch...(no debugging symbols found)...done.
    (gdb) Starting program: /usr/bin/speedcrunch 
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    [New Thread 0x7ffff3e98700 (LWP 27015)]
    [New Thread 0x7ffff2fc4700 (LWP 27016)]
    QTextCursor::setPosition: Position '1' out of range
    QTextCursor::setPosition: Position '2' out of range
    
    Thread 1 "speedcrunch" received signal SIGSEGV, Segmentation fault.
    0x0000000000834ee1 in ?? ()
    (gdb) #0  0x0000000000834ee1 in ?? ()
    #1  0x00000000007c5ebc in ?? ()
    #2  0x00000000009d2e26 in ?? ()
    #3  0x00000000009d743c in ?? ()
    #4  0x0000000000ea1238 in ?? ()
    #5  0x0000000000ea3aae in ?? ()
    #6  0x00000000010ca6b6 in ?? ()
    #7  0x000000000062f34c in ?? ()
    #8  0x0000000000633afa in ?? ()
    #9  0x000000000109c643 in ?? ()
    #10 0x000000000109f007 in ?? ()
    #11 0x00000000010ec914 in ?? ()
    #12 0x00000000009e943d in ?? ()
    #13 0x000000000109a335 in ?? ()
    #14 0x00000000010a281e in ?? ()
    #15 0x000000000041d81b in ?? ()
    #16 0x00007ffff5abd830 in __libc_start_main (main=0x41d760, argc=1, 
        argv=0x7fffffffe028, init=<optimized out>, fini=<optimized out>, 
        rtld_fini=<optimized out>, stack_end=0x7fffffffe018)
        at ../csu/libc-start.c:291
    #17 0x000000000041fd4d in ?? ()
    #18 0x00007fffffffe018 in ?? ()
    #19 0x000000000000001c in ?? ()
    #20 0x0000000000000001 in ?? ()
    #21 0x00007fffffffe37d in ?? ()
    #22 0x0000000000000000 in ?? ()
    (gdb) quit
    A debugging session is active.
    
        Inferior 1 [process 27011] will be killed.
    
    Quit anyway? (y or n) [answered Y; input not from terminal]
    

    Oh, it might be worth mentioning that the error remains even after SpeedCrunch is uninstalled (be it through apt remove or apt purge) and reinstalled from the .deb (or ran from the tar.gz2 binary).

  6. Helder Correia repo owner

    Of course, this is a release binary, so debug info is stripped out. @fkrul Any chance of providing @Mutoh a debug build?

  7. Helder Correia repo owner

    @Mutoh The log makes me think that the issue lies somewhere in the completion popup logic, since the very last call before crashing is `` QTreeModel::data()```. But the fact that you're the first and only user to ever report this faulty behavior is strange. I'll think about how we could help any further without being able to debug it on our side.

  8. Aaron Myles Landwehr

    This happens to me consistently on Windows 10 with 0.12. If I disable auto-completion - no crash. Any update on this?

  9. belg4mit .

    I encounter this whenever trying to do unit match e.g; 0.5 gallon_US crashes when the pop-up appears after ga, but pasting the text in is fine :-/

    (I';m on Windows 10, and run with XMouse enabled)

  10. Log in to comment