Re: [code] [textadept] Textadept 11.0 alpha 2

From: Gabriel Dubatti <gdubatti.att.gmail.com>
Date: Mon, 22 Jun 2020 18:59:00 -0300

Hi Mitchell,

     As I mentioned I have some issues running TA on Kubuntu 20.04 when
changing views with the mouse or selecting text.

     Here is a gdb dump from the nightly version I downloaded yesterday.

-------------

Assertion [start + len <= lengthDoc] failed at scintilla/src/Document.cxx 64

Thread 1 "textadept" received signal SIGABRT, Aborted.
__GI_raise (sig=sig.att.entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50

(gdb) bt
#0  __GI_raise (sig=sig.att.entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff70be859 in __GI_abort () at abort.c:79
#2  0x00000000006fe639 in Scintilla::Platform::Assert(char const*, char
const*, int) (c=0x7e44fc "start + len <= lengthDoc", file=0x7e44d8
"scintilla/src/Document.cxx", line=64)
     at scintilla/gtk/PlatGTK.cxx:2065
#3  0x0000000000614f33 in Scintilla::LexInterface::Colourise(long, long)
(this=0x1609e40, start=0, end=1302) at scintilla/src/Document.cxx:64
#4  0x00000000006d646c in Scintilla::ScintillaBase::WndProc(unsigned
int, unsigned long, long) (this=0x10bf700, iMessage=4003, wParam=0,
lParam=1302) at scintilla/src/ScintillaBase.cxx:1074
#5  0x0000000000701af0 in Scintilla::ScintillaGTK::WndProc(unsigned int,
unsigned long, long) (this=0x10bf700, iMessage=4003, wParam=0,
lParam=1302) at scintilla/gtk/ScintillaGTK.cxx:880
#6  0x0000000000708100 in scintilla_send_message(ScintillaObject*,
unsigned int, uptr_t, sptr_t) (sci=0x1278d80, iMessage=4003, wParam=0,
lParam=1302) at scintilla/gtk/ScintillaGTK.cxx:3018
#7  0x0000000000711552 in call_scintilla (L=0xb44b68, view=0x1278d80,
msg=4003, wtype=3, ltype=3, rtype=0, arg=4) at textadept.c:1178
#8  0x0000000000711703 in call_scintilla_lua (L=0xb44b68) at
textadept.c:1197
#9  0x000000000071fef4 in luaD_precall (L=0xb44b68, func=0x133a9f0,
nresults=0) at lua/src/ldo.c:434
#10 0x00000000007354f8 in luaV_execute (L=0xb44b68) at lua/src/lvm.c:1134
#11 0x00000000007202d4 in luaD_call (L=0xb44b68, func=0x133a980,
nResults=-1) at lua/src/ldo.c:499
#12 0x0000000000720332 in luaD_callnoyield (L=0xb44b68, func=0x133a980,
nResults=-1) at lua/src/ldo.c:509
#13 0x0000000000719d04 in f_call (L=0xb44b68, ud=0x7fffffffad90) at
lua/src/lapi.c:943
#14 0x000000000071f238 in luaD_rawrunprotected (L=0xb44b68, f=0x719ccf
<f_call>, ud=0x7fffffffad90) at lua/src/ldo.c:142
#15 0x0000000000720c60 in luaD_pcall (L=0xb44b68, func=0x719ccf
<f_call>, u=0x7fffffffad90, old_top=832, ef=0) at lua/src/ldo.c:729
#16 0x0000000000719ef1 in lua_pcallk (L=0xb44b68, nargs=0, nresults=-1,
errfunc=0, ctx=0, k=0x739e9e <finishpcall>) at lua/src/lapi.c:969
#17 0x0000000000739f73 in luaB_pcall (L=0xb44b68) at lua/src/lbaselib.c:424
#18 0x000000000071fef4 in luaD_precall (L=0xb44b68, func=0x133a960,
nresults=2) at lua/src/ldo.c:434
#19 0x00000000007354f8 in luaV_execute (L=0xb44b68) at lua/src/lvm.c:1134
#20 0x00000000007202d4 in luaD_call (L=0xb44b68, func=0x133a900,
nResults=1) at lua/src/ldo.c:499
#21 0x0000000000720332 in luaD_callnoyield (L=0xb44b68, func=0x133a900,
nResults=1) at lua/src/ldo.c:509
#22 0x0000000000719d04 in f_call (L=0xb44b68, ud=0x7fffffffb5e0) at
lua/src/lapi.c:943
#23 0x000000000071f238 in luaD_rawrunprotected (L=0xb44b68, f=0x719ccf
<f_call>, ud=0x7fffffffb5e0) at lua/src/ldo.c:142
#24 0x0000000000720c60 in luaD_pcall (L=0xb44b68, func=0x719ccf
<f_call>, u=0x7fffffffb5e0, old_top=704, ef=0) at lua/src/ldo.c:729
#25 0x0000000000719ef1 in lua_pcallk (L=0xb44b68, nargs=1, nresults=1,
errfunc=0, ctx=0, k=0x0) at lua/src/lapi.c:969
#26 0x000000000070de9a in emit (L=0xb44b68, name=0x7f2d94 "buffer_new")
at textadept.c:232
#27 0x000000000071295a in new_buffer (doc=21674528) at textadept.c:1433
#28 0x0000000000711201 in new_buffer_lua (L=0xb44b68) at textadept.c:1098
#29 0x000000000071fef4 in luaD_precall (L=0xb44b68, func=0x133a8e0,
nresults=1) at lua/src/ldo.c:434
#30 0x00000000007354f8 in luaV_execute (L=0xb44b68) at lua/src/lvm.c:1134
#31 0x00000000007202d4 in luaD_call (L=0xb44b68, func=0x133a7a0,
nResults=-1) at lua/src/ldo.c:499
#32 0x0000000000720332 in luaD_callnoyield (L=0xb44b68, func=0x133a7a0,
nResults=-1) at lua/src/ldo.c:509
#33 0x0000000000719d04 in f_call (L=0xb44b68, ud=0x7fffffffbf70) at
lua/src/lapi.c:943
#34 0x000000000071f238 in luaD_rawrunprotected (L=0xb44b68, f=0x719ccf
<f_call>, ud=0x7fffffffbf70) at lua/src/ldo.c:142
#35 0x0000000000720c60 in luaD_pcall (L=0xb44b68, func=0x719ccf
<f_call>, u=0x7fffffffbf70, old_top=352, ef=0) at lua/src/ldo.c:729
#36 0x0000000000719ef1 in lua_pcallk (L=0xb44b68, nargs=3, nresults=-1,
errfunc=0, ctx=0, k=0x739e9e <finishpcall>) at lua/src/lapi.c:969
#37 0x0000000000739f73 in luaB_pcall (L=0xb44b68) at lua/src/lbaselib.c:424
#38 0x000000000071fef4 in luaD_precall (L=0xb44b68, func=0x133a780,
nresults=2) at lua/src/ldo.c:434
#39 0x00000000007354f8 in luaV_execute (L=0xb44b68) at lua/src/lvm.c:1134
#40 0x00000000007202d4 in luaD_call (L=0xb44b68, func=0x133a6f0,
nResults=-1) at lua/src/ldo.c:499
#41 0x0000000000720332 in luaD_callnoyield (L=0xb44b68, func=0x133a6f0,
nResults=-1) at lua/src/ldo.c:509
#42 0x0000000000719d04 in f_call (L=0xb44b68, ud=0x7fffffffc7c0) at
lua/src/lapi.c:943
#43 0x000000000071f238 in luaD_rawrunprotected (L=0xb44b68, f=0x719ccf
<f_call>, ud=0x7fffffffc7c0) at lua/src/ldo.c:142
#44 0x0000000000720c60 in luaD_pcall (L=0xb44b68, func=0x719ccf
<f_call>, u=0x7fffffffc7c0, old_top=176, ef=0) at lua/src/ldo.c:729
#45 0x0000000000719ef1 in lua_pcallk (L=0xb44b68, nargs=1, nresults=-1,
errfunc=0, ctx=0, k=0x739e9e <finishpcall>) at lua/src/lapi.c:969
#46 0x0000000000739f73 in luaB_pcall (L=0xb44b68) at lua/src/lbaselib.c:424
#47 0x000000000071fef4 in luaD_precall (L=0xb44b68, func=0x133a6d0,
nresults=2) at lua/src/ldo.c:434
#48 0x00000000007354f8 in luaV_execute (L=0xb44b68) at lua/src/lvm.c:1134
#49 0x00000000007202d4 in luaD_call (L=0xb44b68, func=0x133a660,
nResults=1) at lua/src/ldo.c:499
#50 0x0000000000720332 in luaD_callnoyield (L=0xb44b68, func=0x133a660,
nResults=1) at lua/src/ldo.c:509
#51 0x0000000000719d04 in f_call (L=0xb44b68, ud=0x7fffffffd010) at
lua/src/lapi.c:943
#52 0x000000000071f238 in luaD_rawrunprotected (L=0xb44b68, f=0x719ccf
<f_call>, ud=0x7fffffffd010) at lua/src/ldo.c:142
#53 0x0000000000720c60 in luaD_pcall (L=0xb44b68, func=0x719ccf
<f_call>, u=0x7fffffffd010, old_top=32, ef=0) at lua/src/ldo.c:729
#54 0x0000000000719ef1 in lua_pcallk (L=0xb44b68, nargs=2, nresults=1,
errfunc=0, ctx=0, k=0x0) at lua/src/lapi.c:969
#55 0x000000000070de9a in emit (L=0xb44b68, name=0x7f2f70 "SCN") at
textadept.c:232
#56 0x00000000007146ca in emit_notification (L=0xb44b68,
n=0x7fffffffd6b0) at textadept.c:1920
#57 0x0000000000714732 in notified (view=0x1278b00, _=0,
n=0x7fffffffd6b0, L=0xb44b68) at textadept.c:1927
#58 0x000000000070dade in scintilla_marshal_VOID__INT_BOXED
(closure=0xc5a130, return_value=0x0, n_param_values=3,
param_values=0x7fffffffd3c0, invocation_hint=0x7fffffffd340,
marshal_data=0x0) at scintilla/gtk/scintilla-marshal.c:117
#59 0x00007ffff7570802 in g_closure_invoke () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#60 0x00007ffff7584814 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#61 0x00007ffff758fb9e in g_signal_emit_valist () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#62 0x00007ffff75900d3 in g_signal_emit () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#63 0x0000000000702869 in
Scintilla::ScintillaGTK::NotifyParent(SCNotification) (this=0xdefdf0,
scn=...) at scintilla/gtk/ScintillaGTK.cxx:1103
#64 0x000000000067895f in
Scintilla::Editor::NotifyDoubleClick(Scintilla::Point, int)
(this=0xdefdf0, pt=..., modifiers=0) at scintilla/src/Editor.cxx:2379
#65 0x00000000006836be in
Scintilla::Editor::ButtonDownWithModifiers(Scintilla::Point, unsigned
int, int) (this=0xdefdf0, pt=..., curTime=39373768, modifiers=0) at
scintilla/src/Editor.cxx:4613
#66 0x00000000006d4b1b in
Scintilla::ScintillaBase::ButtonDownWithModifiers(Scintilla::Point,
unsigned int, int) (this=0xdefdf0, pt=..., curTime=39373768,
modifiers=0) at scintilla/src/ScintillaBase.cxx:543
#67 0x0000000000704d84 in
Scintilla::ScintillaGTK::PressThis(_GdkEventButton*) (this=0xdefdf0,
event=0x12d6070) at scintilla/gtk/ScintillaGTK.cxx:1782
#68 0x0000000000705119 in Scintilla::ScintillaGTK::Press(_GtkWidget*,
_GdkEventButton*) (widget=0x1278b00, event=0x12d6070) at
scintilla/gtk/ScintillaGTK.cxx:1837
#69 0x00007ffff7c8cb9b in  () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#70 0x00007ffff7570802 in g_closure_invoke () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#71 0x00007ffff7583f96 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#72 0x00007ffff758f45d in g_signal_emit_valist () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#73 0x00007ffff75900d3 in g_signal_emit () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#74 0x00007ffff7da822d in  () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#75 0x00007ffff7c8accc in gtk_propagate_event () at
/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#76 0x00007ffff7c8b0c3 in gtk_main_do_event () at
/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#77 0x00007ffff7af36d0 in  () at /lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#78 0x00007ffff7471fbd in g_main_context_dispatch () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#79 0x00007ffff7472240 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#80 0x00007ffff7472533 in g_main_loop_run () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#81 0x00007ffff7c8a092 in gtk_main () at
/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#82 0x0000000000716904 in main (argc=1, argv=0x7fffffffe1d8) at
textadept.c:2541
#83 0x00007ffff70c00b3 in __libc_start_main (main=0x7165b4 <main>,
argc=1, argv=0x7fffffffe1d8, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffe1c8) at
../csu/libc-start.c:308
#84 0x00000000005e7415 in  ()
#85 0x00007fffffffe1c8 in  ()
#86 0x000000000000001c in  ()
#87 0x0000000000000001 in  ()
#88 0x00007fffffffe4a6 in  ()
#89 0x0000000000000000 in  ()

--------------

I also got this exception but on my compiled version without debug:

munmap_chunk(): invalid pointer

Thread 1 "textadept" received signal SIGABRT, Aborted.
__GI_raise (sig=sig.att.entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50

(gdb) bt
#0  __GI_raise (sig=sig.att.entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff7009859 in __GI_abort () at abort.c:79
#2  0x00007ffff70743ee in __libc_message (action=action.att.entry=do_abort,
fmt=fmt.att.entry=0x7ffff719e285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#3  0x00007ffff707c47c in malloc_printerr (str=str.att.entry=0x7ffff71a01e0
"munmap_chunk(): invalid pointer") at malloc.c:5347
#4  0x00007ffff707c6cc in munmap_chunk (p=<optimized out>) at malloc.c:2830
#5  0x00007ffff4ad80f3 in  () at
/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so
#6  0x00007ffff4ad8f2d in  () at
/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so
#7  0x00007ffff7c8cb9b in  () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#8  0x00007ffff768f802 in g_closure_invoke () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007ffff76a3814 in  () at /lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff76ae45d in g_signal_emit_valist () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff76af0d3 in g_signal_emit () at
/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff7da822d in  () at /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#13 0x00007ffff7c8accc in gtk_propagate_event () at
/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#14 0x00007ffff7c8b0c3 in gtk_main_do_event () at
/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#15 0x00007ffff7af36d0 in  () at /lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#16 0x00007ffff759dfbd in g_main_context_dispatch () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007ffff759e240 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff759e533 in g_main_loop_run () at
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff7c8a092 in gtk_main () at
/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#20 0x00005555555ba7aa in  ()
#21 0x00007ffff700b0b3 in __libc_start_main (main=0x5555555b97bc,
argc=1, argv=0x7fffffffe7d8, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffe7c8)
     at ../csu/libc-start.c:308
#22 0x00005555555ba81e in  ()

Cheers,

Gabriel

El 20/6/20 a las 22:09, Mitchell escribió:
> Hi Gabriel,
>
> On Fri, 19 Jun 2020, Gabriel Dubatti wrote:
>
>> Hi Mitchell,
>>
>> Thanks for the feedback.
>>
>> Let me know when you have something to test.
>
> I've pushed my changes[1] of `buffer:set_theme()` to
> `view:set_theme()` that seems to avoid/fix the crash. Feel free to
> test in tonight's nightly build.
>
> FYI I've made some separate changes[2] that may require some theme
> changes on your part.
>
> Cheers,
> Mitchell
>
> [1]: https://foicica.com/hg/textadept/rev/57753003b300
> [2]: https://foicica.com/hg/textadept/rev/18de6baba27b

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 22 Jun 2020 - 17:59:00 EDT

This archive was generated by hypermail 2.2.0 : Tue 23 Jun 2020 - 06:48:32 EDT