TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Highlighting certain expressions crashes tintin++

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
azuriolinist



Joined: 09 Nov 2015
Posts: 9

PostPosted: Mon Nov 09, 2015 10:40 am    Post subject: Highlighting certain expressions crashes tintin++ Reply with quote

I've been trying to set up a highlight for the expression {{'.+'}}, something like this:

Code:
#highlight {{'.+'}} {light lime}


Testing it by running a showme and surrounding a sentence with apostrophes work, but once I enter an unknown tintin command, the whole thing crashes.

Code:
#ell
#ERROR: #UNKNOWN TINTIN-COMMAND 'ell'.
*** Error in `tintin': free(): invalid next size (fast): 0x0000000001ed7ec0 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x72055)[0x7fb2ba6b8055]
/usr/lib/libc.so.6(+0x779a6)[0x7fb2ba6bd9a6]
/usr/lib/libc.so.6(+0x7818e)[0x7fb2ba6be18e]
tintin[0x42457a]
tintin[0x4092df]
tintin[0x43394d]
tintin[0x43372d]
tintin[0x406222]
tintin[0x40b0a3]
tintin[0x40c5b2]
tintin[0x4030c0]
/usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7fb2ba666610]
tintin[0x403199]
======= Memory map: ========
00400000-00460000 r-xp 00000000 08:03 852243                             /usr/bin/tt++
0065f000-00660000 r--p 0005f000 08:03 852243                             /usr/bin/tt++
00660000-00665000 rw-p 00060000 08:03 852243                             /usr/bin/tt++
00665000-006bb000 rw-p 00000000 00:00 0
01e88000-01f0d000 rw-p 00000000 00:00 0                                  [heap]
7fb2b4000000-7fb2b4021000 rw-p 00000000 00:00 0
7fb2b4021000-7fb2b8000000 ---p 00000000 00:00 0
7fb2b94ad000-7fb2b94c3000 r-xp 00000000 08:03 792777                     /usr/lib/libgcc_s.so.1
7fb2b94c3000-7fb2b96c2000 ---p 00016000 08:03 792777                     /usr/lib/libgcc_s.so.1
7fb2b96c2000-7fb2b96c3000 rw-p 00015000 08:03 792777                     /usr/lib/libgcc_s.so.1
7fb2b96c3000-7fb2b96c6000 r-xp 00000000 08:03 797054                     /usr/lib/libdl-2.22.so
7fb2b96c6000-7fb2b98c5000 ---p 00003000 08:03 797054                     /usr/lib/libdl-2.22.so
7fb2b98c5000-7fb2b98c6000 r--p 00002000 08:03 797054                     /usr/lib/libdl-2.22.so
7fb2b98c6000-7fb2b98c7000 rw-p 00003000 08:03 797054                     /usr/lib/libdl-2.22.so
7fb2b98c7000-7fb2b98cf000 r-xp 00000000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7fb2b98cf000-7fb2b9ace000 ---p 00008000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7fb2b9ace000-7fb2b9acf000 r--p 00007000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7fb2b9acf000-7fb2b9ad0000 rw-p 00008000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7fb2b9ad0000-7fb2b9b60000 r-xp 00000000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7fb2b9b60000-7fb2b9d60000 ---p 00090000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7fb2b9d60000-7fb2b9d61000 r--p 00090000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7fb2b9d61000-7fb2b9d62000 rw-p 00091000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7fb2b9d62000-7fb2b9d94000 r-xp 00000000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7fb2b9d94000-7fb2b9f94000 ---p 00032000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7fb2b9f94000-7fb2b9f95000 r--p 00032000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7fb2b9f95000-7fb2b9f96000 rw-p 00033000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7fb2b9f96000-7fb2b9fcc000 r-xp 00000000 08:03 815362                     /usr/lib/libnettle.so.6.1
7fb2b9fcc000-7fb2ba1cb000 ---p 00036000 08:03 815362                     /usr/lib/libnettle.so.6.1
7fb2ba1cb000-7fb2ba1cd000 r--p 00035000 08:03 815362                     /usr/lib/libnettle.so.6.1
7fb2ba1cd000-7fb2ba1ce000 rw-p 00037000 08:03 815362                     /usr/lib/libnettle.so.6.1
7fb2ba1ce000-7fb2ba1e0000 r-xp 00000000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7fb2ba1e0000-7fb2ba3df000 ---p 00012000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7fb2ba3df000-7fb2ba3e0000 r--p 00011000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7fb2ba3e0000-7fb2ba3e1000 rw-p 00012000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7fb2ba3e1000-7fb2ba43b000 r-xp 00000000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7fb2ba43b000-7fb2ba63a000 ---p 0005a000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7fb2ba63a000-7fb2ba644000 r--p 00059000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7fb2ba644000-7fb2ba646000 rw-p 00063000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7fb2ba646000-7fb2ba7e1000 r-xp 00000000 08:03 796993                     /usr/lib/libc-2.22.so
7fb2ba7e1000-7fb2ba9e0000 ---p 0019b000 08:03 796993                     /usr/lib/libc-2.22.so
7fb2ba9e0000-7fb2ba9e4000 r--p 0019a000 08:03 796993                     /usr/lib/libc-2.22.so
7fb2ba9e4000-7fb2ba9e6000 rw-p 0019e000 08:03 796993                     /usr/lib/libc-2.22.so
7fb2ba9e6000-7fb2ba9ea000 rw-p 00000000 00:00 0
7fb2ba9ea000-7fb2ba9ff000 r-xp 00000000 08:03 787481                     /usr/lib/libz.so.1.2.8
7fb2ba9ff000-7fb2babfe000 ---p 00015000 08:03 787481                     /usr/lib/libz.so.1.2.8
7fb2babfe000-7fb2babff000 r--p 00014000 08:03 787481                     /usr/lib/libz.so.1.2.8
7fb2babff000-7fb2bac00000 rw-p 00015000 08:03 787481                     /usr/lib/libz.so.1.2.8
7fb2bac00000-7fb2bac18000 r-xp 00000000 08:03 796970                     /usr/lib/libpthread-2.22.so
7fb2bac18000-7fb2bae17000 ---p 00018000 08:03 796970                     /usr/lib/libpthread-2.22.so
7fb2bae17000-7fb2bae18000 r--p 00017000 08:03 796970                     /usr/lib/libpthread-2.22.so
7fb2bae18000-7fb2bae19000 rw-p 00018000 08:03 796970                     /usr/lib/libpthread-2.22.so
7fb2bae19000-7fb2bae1d000 rw-p 00000000 00:00 0
7fb2bae1d000-7fb2bae1f000 r-xp 00000000 08:03 797059                     /usr/lib/libutil-2.22.so
7fb2bae1f000-7fb2bb01e000 ---p 00002000 08:03 797059                     /usr/lib/libutil-2.22.so
7fb2bb01e000-7fb2bb01f000 r--p 00001000 08:03 797059                     /usr/lib/libutil-2.22.so
7fb2bb01f000-7fb2bb020000 rw-p 00002000 08:03 797059                     /usr/lib/libutil-2.22.so
7fb2bb020000-7fb2bb08f000 r-xp 00000000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7fb2bb08f000-7fb2bb28e000 ---p 0006f000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7fb2bb28e000-7fb2bb28f000 r--p 0006e000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7fb2bb28f000-7fb2bb290000 rw-p 0006f000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7fb2bb290000-7fb2bb3b7000 r-xp 00000000 08:03 784568                     /usr/lib/libgnutls.so.30.4.0
7fb2bb3b7000-7fb2bb5b6000 ---p 00127000 08:03 784568                     /usr/lib/libgnutls.so.30.4.0
7fb2bb5b6000-7fb2bb5c1000 r--p 00126000 08:03 784568                     /usr/lib/libgnutls.so.30.4.0
7fb2bb5c1000-7fb2bb5c4000 rw-p 00131000 08:03 784568                     /usr/lib/libgnutls.so.30.4.0
7fb2bb5c4000-7fb2bb5c5000 rw-p 00000000 00:00 0
7fb2bb5c5000-7fb2bb6c2000 r-xp 00000000 08:03 797055                     /usr/lib/libm-2.22.so
7fb2bb6c2000-7fb2bb8c1000 ---p 000fd000 08:03 797055                     /usr/lib/libm-2.22.so
7fb2bb8c1000-7fb2bb8c2000 r--p 000fc000 08:03 797055                     /usr/lib/libm-2.22.so
7fb2bb8c2000-7fb2bb8c3000 rw-p 000fd000 08:03 797055                     /usr/lib/libm-2.22.so
7fb2bb8c3000-7fb2bb8e5000 r-xp 00000000 08:03 796992                     /usr/lib/ld-2.22.so
7fb2bba54000-7fb2bbaad000 rw-p 00000000 00:00 0
7fb2bbac0000-7fb2bbae4000 rw-p 00000000 00:00 0
7fb2bbae4000-7fb2bbae5000 r--p 00021000 08:03 796992                     /usr/lib/ld-2.22.so
7fb2bbae5000-7fb2bbae6000 rw-p 00022000 08:03 796992                     /usr/lib/ld-2.22.so
7fb2bbae6000-7fb2bbae7000 rw-p 00000000 00:00 0
7ffc504fc000-7ffc5065e000 rw-p 00000000 00:00 0                          [stack]
7ffc50733000-7ffc50735000 r--p 00000000 00:00 0                          [vvar]
7ffc50735000-7ffc50737000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]


I'm not sure if it's this particular line that causes it:
Code:

#ERROR: #UNKNOWN TINTIN-COMMAND 'ell'.


with the apostrophes.... but I'd appreciate help. I make typos more often than not. x(
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Mon Nov 09, 2015 10:58 am    Post subject: Reply with quote

I tried this, but seems working for me:

Code:

#highlight {{'.+'}} {light lime}
#OK. {{'.+'}} NOW HIGHLIGHTS {light lime} @ {5}.
#ell
#ERROR: #UNKNOWN TINTIN-COMMAND 'ell'.


the "ell" in the last error line is colored, and I have no crash...

I tested with ver. 2.01.1 on Cygwin.
Back to top
View user's profile Send private message
azuriolinist



Joined: 09 Nov 2015
Posts: 9

PostPosted: Mon Nov 09, 2015 11:55 am    Post subject: Reply with quote

PowerGod wrote:
I tried this, but seems working for me:

Code:

#highlight {{'.+'}} {light lime}
#OK. {{'.+'}} NOW HIGHLIGHTS {light lime} @ {5}.
#ell
#ERROR: #UNKNOWN TINTIN-COMMAND 'ell'.


the "ell" in the last error line is colored, and I have no crash...

I tested with ver. 2.01.1 on Cygwin.


Huh. Might be some compilation error. Thanks for the quick reply... I'll see about re-installing it.
Back to top
View user's profile Send private message
azuriolinist



Joined: 09 Nov 2015
Posts: 9

PostPosted: Mon Nov 09, 2015 12:28 pm    Post subject: Reply with quote

Tried re-compiling it from the source, and I get about the same error, from a quick glance through.

Code:
#ERROR: #UNKNOWN TINTIN-COMMAND 'ell'.
*** Error in `tt++': free(): invalid next size (fast): 0x0000000001000d30 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x72055)[0x7f0862708055]
/usr/lib/libc.so.6(+0x779a6)[0x7f086270d9a6]
/usr/lib/libc.so.6(+0x7818e)[0x7f086270e18e]
tt++[0x431129]
tt++[0x40ad4b]
tt++[0x445762]
tt++[0x445ed0]
tt++[0x4058b4]
tt++[0x40d890]
tt++[0x40d620]
tt++[0x408376]
/usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7f08626b6610]
tt++[0x402be9]
======= Memory map: ========
00400000-00470000 r-xp 00000000 08:03 852243                             /usr/local/bin/tt++
00670000-00675000 rw-p 00070000 08:03 852243                             /usr/local/bin/tt++
00675000-006cc000 rw-p 00000000 00:00 0
00fca000-01019000 rw-p 00000000 00:00 0                                  [heap]
7f085c000000-7f085c021000 rw-p 00000000 00:00 0
7f085c021000-7f0860000000 ---p 00000000 00:00 0
7f08614fd000-7f0861513000 r-xp 00000000 08:03 792777                     /usr/lib/libgcc_s.so.1
7f0861513000-7f0861712000 ---p 00016000 08:03 792777                     /usr/lib/libgcc_s.so.1
7f0861712000-7f0861713000 rw-p 00015000 08:03 792777                     /usr/lib/libgcc_s.so.1
7f0861713000-7f0861716000 r-xp 00000000 08:03 797054                     /usr/lib/libdl-2.22.so
7f0861716000-7f0861915000 ---p 00003000 08:03 797054                     /usr/lib/libdl-2.22.so
7f0861915000-7f0861916000 r--p 00002000 08:03 797054                     /usr/lib/libdl-2.22.so
7f0861916000-7f0861917000 rw-p 00003000 08:03 797054                     /usr/lib/libdl-2.22.so
7f0861917000-7f086191f000 r-xp 00000000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7f086191f000-7f0861b1e000 ---p 00008000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7f0861b1e000-7f0861b1f000 r--p 00007000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7f0861b1f000-7f0861b20000 rw-p 00008000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7f0861b20000-7f0861bb0000 r-xp 00000000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7f0861bb0000-7f0861db0000 ---p 00090000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7f0861db0000-7f0861db1000 r--p 00090000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7f0861db1000-7f0861db2000 rw-p 00091000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7f0861db2000-7f0861de4000 r-xp 00000000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7f0861de4000-7f0861fe4000 ---p 00032000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7f0861fe4000-7f0861fe5000 r--p 00032000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7f0861fe5000-7f0861fe6000 rw-p 00033000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7f0861fe6000-7f086201c000 r-xp 00000000 08:03 815362                     /usr/lib/libnettle.so.6.1
7f086201c000-7f086221b000 ---p 00036000 08:03 815362                     /usr/lib/libnettle.so.6.1
7f086221b000-7f086221d000 r--p 00035000 08:03 815362                     /usr/lib/libnettle.so.6.1
7f086221d000-7f086221e000 rw-p 00037000 08:03 815362                     /usr/lib/libnettle.so.6.1
7f086221e000-7f0862230000 r-xp 00000000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7f0862230000-7f086242f000 ---p 00012000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7f086242f000-7f0862430000 r--p 00011000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7f0862430000-7f0862431000 rw-p 00012000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7f0862431000-7f086248b000 r-xp 00000000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7f086248b000-7f086268a000 ---p 0005a000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7f086268a000-7f0862694000 r--p 00059000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7f0862694000-7f0862696000 rw-p 00063000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7f0862696000-7f0862831000 r-xp 00000000 08:03 796993                     /usr/lib/libc-2.22.so
7f0862831000-7f0862a30000 ---p 0019b000 08:03 796993                     /usr/lib/libc-2.22.so
7f0862a30000-7f0862a34000 r--p 0019a000 08:03 796993                     /usr/lib/libc-2.22.so
7f0862a34000-7f0862a36000 rw-p 0019e000 08:03 796993                     /usr/lib/libc-2.22.so
7f0862a36000-7f0862a3a000 rw-p 00000000 00:00 0
7f0862a3a000-7f0862a4f000 r-xp 00000000 08:03 787481                     /usr/lib/libz.so.1.2.8
7f0862a4f000-7f0862c4e000 ---p 00015000 08:03 787481                     /usr/lib/libz.so.1.2.8
7f0862c4e000-7f0862c4f000 r--p 00014000 08:03 787481                     /usr/lib/libz.so.1.2.8
7f0862c4f000-7f0862c50000 rw-p 00015000 08:03 787481                     /usr/lib/libz.so.1.2.8
7f0862c50000-7f0862c68000 r-xp 00000000 08:03 796970                     /usr/lib/libpthread-2.22.so
7f0862c68000-7f0862e67000 ---p 00018000 08:03 796970                     /usr/lib/libpthread-2.22.so
7f0862e67000-7f0862e68000 r--p 00017000 08:03 796970                     /usr/lib/libpthread-2.22.so
7f0862e68000-7f0862e69000 rw-p 00018000 08:03 796970                     /usr/lib/libpthread-2.22.so
7f0862e69000-7f0862e6d000 rw-p 00000000 00:00 0
7f0862e6d000-7f0862e82000 r-xp 00000000 08:03 797056                     /usr/lib/libnsl-2.22.so
7f0862e82000-7f0863081000 ---p 00015000 08:03 797056                     /usr/lib/libnsl-2.22.so
7f0863081000-7f0863082000 r--p 00014000 08:03 797056                     /usr/lib/libnsl-2.22.so
7f0863082000-7f0863083000 rw-p 00015000 08:03 797056                     /usr/lib/libnsl-2.22.so
7f0863083000-7f0863085000 rw-p 00000000 00:00 0
7f0863085000-7f0863087000 r-xp 00000000 08:03 797059                     /usr/lib/libutil-2.22.so
7f0863087000-7f0863286000 ---p 00002000 08:03 797059                     /usr/lib/libutil-2.22.so
7f0863286000-7f0863287000 r--p 00001000 08:03 797059                     /usr/lib/libutil-2.22.so
7f0863287000-7f0863288000 rw-p 00002000 08:03 797059                     /usr/lib/libutil-2.22.so
7f0863288000-7f08632f7000 r-xp 00000000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7f08632f7000-7f08634f6000 ---p 0006f000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7f08634f6000-7f08634f7000 r--p 0006e000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7f08634f7000-7f08634f8000 rw-p 0006f000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7f08634f8000-7f086361f000 r-xp 00000000 08:03 784569                     /usr/lib/libgnutls.so.30.4.0
7f086361f000-7f086381e000 ---p 00127000 08:03 784569                     /usr/lib/libgnutls.so.30.4.0
7f086381e000-7f0863829000 r--p 00126000 08:03 784569                     /usr/lib/libgnutls.so.30.4.0
7f0863829000-7f086382c000 rw-p 00131000 08:03 784569                     /usr/lib/libgnutls.so.30.4.0
7f086382c000-7f086382d000 rw-p 00000000 00:00 0
7f086382d000-7f086392a000 r-xp 00000000 08:03 797055                     /usr/lib/libm-2.22.so
7f086392a000-7f0863b29000 ---p 000fd000 08:03 797055                     /usr/lib/libm-2.22.so
7f0863b29000-7f0863b2a000 r--p 000fc000 08:03 797055                     /usr/lib/libm-2.22.so
7f0863b2a000-7f0863b2b000 rw-p 000fd000 08:03 797055                     /usr/lib/libm-2.22.so
7f0863b2b000-7f0863b4d000 r-xp 00000000 08:03 796992                     /usr/lib/ld-2.22.so
7f0863ce3000-7f0863d14000 rw-p 00000000 00:00 0
7f0863d29000-7f0863d4c000 rw-p 00000000 00:00 0
7f0863d4c000-7f0863d4d000 r--p 00021000 08:03 796992                     /usr/lib/ld-2.22.so
7f0863d4d000-7f0863d4e000 rw-p 00022000 08:03 796992                     /usr/lib/ld-2.22.so
7f0863d4e000-7f0863d4f000 rw-p 00000000 00:00 0
7ffc7488a000-7ffc748fe000 rw-p 00000000 00:00 0                          [stack]
7ffc749e3000-7ffc749e5000 r--p 00000000 00:00 0                          [vvar]
7ffc749e5000-7ffc749e7000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
DEBUG_STACK[000] = script_driver(0xfe8a40,3,0x7f0863d2b0cc)
[/code]

Edit: So, running tintin++ using sudo fixes it. Odd.

Edit 2: Nope, nevermind. Same problem.
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Mon Nov 09, 2015 2:38 pm    Post subject: Reply with quote

Are you trying using just the commands I used or with an entire script ?

Because if it's a script there could be more commands that can make the issue appear, just try one command at a time by hand.

By personal experience, when tt crashes like that is almost always because of an infinite loop triggered by the script...
Back to top
View user's profile Send private message
azuriolinist



Joined: 09 Nov 2015
Posts: 9

PostPosted: Mon Nov 09, 2015 7:40 pm    Post subject: Reply with quote

PowerGod wrote:
Are you trying using just the commands I used or with an entire script ?

Because if it's a script there could be more commands that can make the issue appear, just try one command at a time by hand.

By personal experience, when tt crashes like that is almost always because of an infinite loop triggered by the script...


Yes, I've tested running TinTin++ with and without my usual scripts. A few times, having the error UNKNOWN TINTIN-COMMAND come up didn't crash the program but once I tried connecting to a session, the whole thing crashed. The below was without any scripts at all.

Code:
#highlight {'%+'} {light lime}
#OK. {'%+'} NOW HIGHLIGHTS {light lime} @ {5}.
#ell
#ERROR: #UNKNOWN TINTIN-COMMAND 'ell'.
#session cf carrionfields.net 4449
#TRYING TO CONNECT 'cf' TO 'carrionfields.net' PORT '4449'.
*** Error in `tt++': free(): invalid next size (fast): 0x0000000000c462a0 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x72055)[0x7fb59dbf1055]
/usr/lib/libc.so.6(+0x779a6)[0x7fb59dbf69a6]
/usr/lib/libc.so.6(+0x7818e)[0x7fb59dbf718e]
tt++[0x43126a]
tt++[0x41230e]
tt++[0x411b91]
tt++[0x445267]
tt++[0x446011]
tt++[0x4058b4]
tt++[0x40d890]
tt++[0x40d620]
tt++[0x408376]
/usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7fb59db9f610]
tt++[0x402be9]
======= Memory map: ========
00400000-00471000 r-xp 00000000 08:03 784568                             /usr/local/bin/tt++
00670000-00675000 rw-p 00070000 08:03 784568                             /usr/local/bin/tt++
00675000-006cc000 rw-p 00000000 00:00 0
00bf9000-00c48000 rw-p 00000000 00:00 0                                  [heap]
7fb598000000-7fb598021000 rw-p 00000000 00:00 0
7fb598021000-7fb59c000000 ---p 00000000 00:00 0
7fb59c9e6000-7fb59c9fc000 r-xp 00000000 08:03 792777                     /usr/lib/libgcc_s.so.1
7fb59c9fc000-7fb59cbfb000 ---p 00016000 08:03 792777                     /usr/lib/libgcc_s.so.1
7fb59cbfb000-7fb59cbfc000 rw-p 00015000 08:03 792777                     /usr/lib/libgcc_s.so.1
7fb59cbfc000-7fb59cbff000 r-xp 00000000 08:03 797054                     /usr/lib/libdl-2.22.so
7fb59cbff000-7fb59cdfe000 ---p 00003000 08:03 797054                     /usr/lib/libdl-2.22.so
7fb59cdfe000-7fb59cdff000 r--p 00002000 08:03 797054                     /usr/lib/libdl-2.22.so
7fb59cdff000-7fb59ce00000 rw-p 00003000 08:03 797054                     /usr/lib/libdl-2.22.so
7fb59ce00000-7fb59ce08000 r-xp 00000000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7fb59ce08000-7fb59d007000 ---p 00008000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7fb59d007000-7fb59d008000 r--p 00007000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7fb59d008000-7fb59d009000 rw-p 00008000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7fb59d009000-7fb59d099000 r-xp 00000000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7fb59d099000-7fb59d299000 ---p 00090000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7fb59d299000-7fb59d29a000 r--p 00090000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7fb59d29a000-7fb59d29b000 rw-p 00091000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7fb59d29b000-7fb59d2cd000 r-xp 00000000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7fb59d2cd000-7fb59d4cd000 ---p 00032000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7fb59d4cd000-7fb59d4ce000 r--p 00032000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7fb59d4ce000-7fb59d4cf000 rw-p 00033000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7fb59d4cf000-7fb59d505000 r-xp 00000000 08:03 815362                     /usr/lib/libnettle.so.6.1
7fb59d505000-7fb59d704000 ---p 00036000 08:03 815362                     /usr/lib/libnettle.so.6.1
7fb59d704000-7fb59d706000 r--p 00035000 08:03 815362                     /usr/lib/libnettle.so.6.1
7fb59d706000-7fb59d707000 rw-p 00037000 08:03 815362                     /usr/lib/libnettle.so.6.1
7fb59d707000-7fb59d719000 r-xp 00000000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7fb59d719000-7fb59d918000 ---p 00012000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7fb59d918000-7fb59d919000 r--p 00011000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7fb59d919000-7fb59d91a000 rw-p 00012000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7fb59d91a000-7fb59d974000 r-xp 00000000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7fb59d974000-7fb59db73000 ---p 0005a000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7fb59db73000-7fb59db7d000 r--p 00059000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7fb59db7d000-7fb59db7f000 rw-p 00063000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7fb59db7f000-7fb59dd1a000 r-xp 00000000 08:03 796993                     /usr/lib/libc-2.22.so
7fb59dd1a000-7fb59df19000 ---p 0019b000 08:03 796993                     /usr/lib/libc-2.22.so
7fb59df19000-7fb59df1d000 r--p 0019a000 08:03 796993                     /usr/lib/libc-2.22.so
7fb59df1d000-7fb59df1f000 rw-p 0019e000 08:03 796993                     /usr/lib/libc-2.22.so
7fb59df1f000-7fb59df23000 rw-p 00000000 00:00 0
7fb59df23000-7fb59df38000 r-xp 00000000 08:03 787481                     /usr/lib/libz.so.1.2.8
7fb59df38000-7fb59e137000 ---p 00015000 08:03 787481                     /usr/lib/libz.so.1.2.8
7fb59e137000-7fb59e138000 r--p 00014000 08:03 787481                     /usr/lib/libz.so.1.2.8
7fb59e138000-7fb59e139000 rw-p 00015000 08:03 787481                     /usr/lib/libz.so.1.2.8
7fb59e139000-7fb59e151000 r-xp 00000000 08:03 796970                     /usr/lib/libpthread-2.22.so
7fb59e151000-7fb59e350000 ---p 00018000 08:03 796970                     /usr/lib/libpthread-2.22.so
7fb59e350000-7fb59e351000 r--p 00017000 08:03 796970                     /usr/lib/libpthread-2.22.so
7fb59e351000-7fb59e352000 rw-p 00018000 08:03 796970                     /usr/lib/libpthread-2.22.so
7fb59e352000-7fb59e356000 rw-p 00000000 00:00 0
7fb59e356000-7fb59e36b000 r-xp 00000000 08:03 797056                     /usr/lib/libnsl-2.22.so
7fb59e36b000-7fb59e56a000 ---p 00015000 08:03 797056                     /usr/lib/libnsl-2.22.so
7fb59e56a000-7fb59e56b000 r--p 00014000 08:03 797056                     /usr/lib/libnsl-2.22.so
7fb59e56b000-7fb59e56c000 rw-p 00015000 08:03 797056                     /usr/lib/libnsl-2.22.so
7fb59e56c000-7fb59e56e000 rw-p 00000000 00:00 0
7fb59e56e000-7fb59e570000 r-xp 00000000 08:03 797059                     /usr/lib/libutil-2.22.so
7fb59e570000-7fb59e76f000 ---p 00002000 08:03 797059                     /usr/lib/libutil-2.22.so
7fb59e76f000-7fb59e770000 r--p 00001000 08:03 797059                     /usr/lib/libutil-2.22.so
7fb59e770000-7fb59e771000 rw-p 00002000 08:03 797059                     /usr/lib/libutil-2.22.so
7fb59e771000-7fb59e7e0000 r-xp 00000000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7fb59e7e0000-7fb59e9df000 ---p 0006f000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7fb59e9df000-7fb59e9e0000 r--p 0006e000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7fb59e9e0000-7fb59e9e1000 rw-p 0006f000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7fb59e9e1000-7fb59eb08000 r-xp 00000000 08:03 784569                     /usr/lib/libgnutls.so.30.4.0
7fb59eb08000-7fb59ed07000 ---p 00127000 08:03 784569                     /usr/lib/libgnutls.so.30.4.0
7fb59ed07000-7fb59ed12000 r--p 00126000 08:03 784569                     /usr/lib/libgnutls.so.30.4.0
7fb59ed12000-7fb59ed15000 rw-p 00131000 08:03 784569                     /usr/lib/libgnutls.so.30.4.0
7fb59ed15000-7fb59ed16000 rw-p 00000000 00:00 0
7fb59ed16000-7fb59ee13000 r-xp 00000000 08:03 797055                     /usr/lib/libm-2.22.so
7fb59ee13000-7fb59f012000 ---p 000fd000 08:03 797055                     /usr/lib/libm-2.22.so
7fb59f012000-7fb59f013000 r--p 000fc000 08:03 797055                     /usr/lib/libm-2.22.so
7fb59f013000-7fb59f014000 rw-p 000fd000 08:03 797055                     /usr/lib/libm-2.22.so
7fb59f014000-7fb59f036000 r-xp 00000000 08:03 796992                     /usr/lib/ld-2.22.so
7fb59f1a4000-7fb59f1fd000 rw-p 00000000 00:00 0
7fb59f212000-7fb59f235000 rw-p 00000000 00:00 0
7fb59f235000-7fb59f236000 r--p 00021000 08:03 796992                     /usr/lib/ld-2.22.so
7fb59f236000-7fb59f237000 rw-p 00022000 08:03 796992                     /usr/lib/ld-2.22.so
7fb59f237000-7fb59f238000 rw-p 00000000 00:00 0
7fff0bae2000-7fff0bb5d000 rw-p 00000000 00:00 0                          [stack]
7fff0bbde000-7fff0bbe0000 r--p 00000000 00:00 0                          [vvar]
7fff0bbe0000-7fff0bbe2000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
DEBUG_STACK[000] = script_driver(0xc17a40,3,0x7fb59f2140cc)
DEBUG_STACK[001] = do_session(0xc17a40,0xc2fa30)
DEBUG_STACK[002] = new_session(0xc17a40,0x7fff0bb4b440,0x7fff0bb53443,0,0)
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Tue Nov 10, 2015 3:22 am    Post subject: Reply with quote

I can't reproduce the crash, it logs to the mud correctly and also highlights it...

Did you used some particular flags while compiling ?

Anyway I can't help here, the "free() invalid next size" seems a well known error over the internet, but can be generated by many factors... I suppose the only way to find your issue is to debug tt++ and modify the offending line before recompiling the whole thing...

...or maybe wait for some other experienced programmer who can understand what is happening there
Back to top
View user's profile Send private message
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Tue Nov 17, 2015 8:26 pm    Post subject: Reply with quote

Compile it with the GCC -g flag (create debug symbols) and -O0 (turn off all optimisations - makes it easier to) run it through gdb, the GNU debugger and that will find the exact line where it crashes - though you may have to learn how to use gdb first. {Well worth it if you are coding in C or something similar...!}
Back to top
View user's profile Send private message
azuriolinist



Joined: 09 Nov 2015
Posts: 9

PostPosted: Wed Nov 18, 2015 3:51 am    Post subject: Reply with quote

Slysven wrote:
Compile it with the GCC -g flag (create debug symbols) and -O0 (turn off all optimisations - makes it easier to) run it through gdb, the GNU debugger and that will find the exact line where it crashes - though you may have to learn how to use gdb first. {Well worth it if you are coding in C or something similar...!}


Thanks for the reply! I compiled it and ran it through the debugger. Came up with the same error and some:

Code:
#highlight {'%+'} {light lime}
#OK. {'%+'} NOW HIGHLIGHTS {light lime} @ {5}.
#showme {'Test'}
'Test'
#showme {'Test'}
'Test'
#showme {'Test'}
'Test'
#session eoe 78.47.44.186 8888
#TRYING TO CONNECT 'eoe' TO '78.47.44.186' PORT '8888'.
*** Error in `/mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++': free(): invalid next size (fast): 0x00000000007192a0 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x72055)[0x7ffff69b8055]
/usr/lib/libc.so.6(+0x779a6)[0x7ffff69bd9a6]
/usr/lib/libc.so.6(+0x7818e)[0x7ffff69be18e]
/mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++[0x431123]
/mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++[0x412308]
/mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++[0x411b8b]
/mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++[0x445120]
/mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++[0x445eca]
/mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++[0x4058b4]
/mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++[0x40d88a]
/mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++[0x40d61a]
/mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++[0x408376]
/usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7ffff6966610]
/mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++[0x402be9]
======= Memory map: ========
00400000-00470000 r-xp 00000000 08:05 7083558                            /mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++
00670000-00675000 rw-p 00070000 08:05 7083558                            /mnt/DATA/Downloads/MUD/tintin-2.01.1/src/tt++
00675000-0071b000 rw-p 00000000 00:00 0                                  [heap]
7ffff0000000-7ffff0021000 rw-p 00000000 00:00 0
7ffff0021000-7ffff4000000 ---p 00000000 00:00 0
7ffff57ad000-7ffff57c3000 r-xp 00000000 08:03 792777                     /usr/lib/libgcc_s.so.1
7ffff57c3000-7ffff59c2000 ---p 00016000 08:03 792777                     /usr/lib/libgcc_s.so.1
7ffff59c2000-7ffff59c3000 rw-p 00015000 08:03 792777                     /usr/lib/libgcc_s.so.1
7ffff59c3000-7ffff59c6000 r-xp 00000000 08:03 797054                     /usr/lib/libdl-2.22.so
7ffff59c6000-7ffff5bc5000 ---p 00003000 08:03 797054                     /usr/lib/libdl-2.22.so
7ffff5bc5000-7ffff5bc6000 r--p 00002000 08:03 797054                     /usr/lib/libdl-2.22.so
7ffff5bc6000-7ffff5bc7000 rw-p 00003000 08:03 797054                     /usr/lib/libdl-2.22.so
7ffff5bc7000-7ffff5bcf000 r-xp 00000000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7ffff5bcf000-7ffff5dce000 ---p 00008000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7ffff5dce000-7ffff5dcf000 r--p 00007000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7ffff5dcf000-7ffff5dd0000 rw-p 00008000 08:03 794623                     /usr/lib/libffi.so.6.0.4
7ffff5dd0000-7ffff5e60000 r-xp 00000000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7ffff5e60000-7ffff6060000 ---p 00090000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7ffff6060000-7ffff6061000 r--p 00090000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7ffff6061000-7ffff6062000 rw-p 00091000 08:03 794665                     /usr/lib/libgmp.so.10.2.0
7ffff6062000-7ffff6094000 r-xp 00000000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7ffff6094000-7ffff6294000 ---p 00032000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7ffff6294000-7ffff6295000 r--p 00032000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7ffff6295000-7ffff6296000 rw-p 00033000 08:03 815364                     /usr/lib/libhogweed.so.4.1
7ffff6296000-7ffff62cc000 r-xp 00000000 08:03 815362                     /usr/lib/libnettle.so.6.1
7ffff62cc000-7ffff64cb000 ---p 00036000 08:03 815362                     /usr/lib/libnettle.so.6.1
7ffff64cb000-7ffff64cd000 r--p 00035000 08:03 815362                     /usr/lib/libnettle.so.6.1
7ffff64cd000-7ffff64ce000 rw-p 00037000 08:03 815362                     /usr/lib/libnettle.so.6.1
7ffff64ce000-7ffff64e0000 r-xp 00000000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7ffff64e0000-7ffff66df000 ---p 00012000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7ffff66df000-7ffff66e0000 r--p 00011000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7ffff66e0000-7ffff66e1000 rw-p 00012000 08:03 838606                     /usr/lib/libtasn1.so.6.5.1
7ffff66e1000-7ffff673b000 r-xp 00000000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7ffff673b000-7ffff693a000 ---p 0005a000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7ffff693a000-7ffff6944000 r--p 00059000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7ffff6944000-7ffff6946000 rw-p 00063000 08:03 838630                     /usr/lib/libp11-kit.so.0.1.0
7ffff6946000-7ffff6ae1000 r-xp 00000000 08:03 796993                     /usr/lib/libc-2.22.so
7ffff6ae1000-7ffff6ce0000 ---p 0019b000 08:03 796993                     /usr/lib/libc-2.22.so
7ffff6ce0000-7ffff6ce4000 r--p 0019a000 08:03 796993                     /usr/lib/libc-2.22.so
7ffff6ce4000-7ffff6ce6000 rw-p 0019e000 08:03 796993                     /usr/lib/libc-2.22.so
7ffff6ce6000-7ffff6cea000 rw-p 00000000 00:00 0
7ffff6cea000-7ffff6cff000 r-xp 00000000 08:03 787481                     /usr/lib/libz.so.1.2.8
7ffff6cff000-7ffff6efe000 ---p 00015000 08:03 787481                     /usr/lib/libz.so.1.2.8
7ffff6efe000-7ffff6eff000 r--p 00014000 08:03 787481                     /usr/lib/libz.so.1.2.8
7ffff6eff000-7ffff6f00000 rw-p 00015000 08:03 787481                     /usr/lib/libz.so.1.2.8
7ffff6f00000-7ffff6f18000 r-xp 00000000 08:03 796970                     /usr/lib/libpthread-2.22.so
7ffff6f18000-7ffff7117000 ---p 00018000 08:03 796970                     /usr/lib/libpthread-2.22.so
7ffff7117000-7ffff7118000 r--p 00017000 08:03 796970                     /usr/lib/libpthread-2.22.so
7ffff7118000-7ffff7119000 rw-p 00018000 08:03 796970                     /usr/lib/libpthread-2.22.so
7ffff7119000-7ffff711d000 rw-p 00000000 00:00 0
7ffff711d000-7ffff7132000 r-xp 00000000 08:03 797056                     /usr/lib/libnsl-2.22.so
7ffff7132000-7ffff7331000 ---p 00015000 08:03 797056                     /usr/lib/libnsl-2.22.so
7ffff7331000-7ffff7332000 r--p 00014000 08:03 797056                     /usr/lib/libnsl-2.22.so
7ffff7332000-7ffff7333000 rw-p 00015000 08:03 797056                     /usr/lib/libnsl-2.22.so
7ffff7333000-7ffff7335000 rw-p 00000000 00:00 0
7ffff7335000-7ffff7337000 r-xp 00000000 08:03 797059                     /usr/lib/libutil-2.22.so
7ffff7337000-7ffff7536000 ---p 00002000 08:03 797059                     /usr/lib/libutil-2.22.so
7ffff7536000-7ffff7537000 r--p 00001000 08:03 797059                     /usr/lib/libutil-2.22.so
7ffff7537000-7ffff7538000 rw-p 00002000 08:03 797059                     /usr/lib/libutil-2.22.so
7ffff7538000-7ffff75a7000 r-xp 00000000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7ffff75a7000-7ffff77a6000 ---p 0006f000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7ffff77a6000-7ffff77a7000 r--p 0006e000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7ffff77a7000-7ffff77a8000 rw-p 0006f000 08:03 793140                     /usr/lib/libpcre.so.1.2.5
7ffff77a8000-7ffff78cf000 r-xp 00000000 08:03 784569                     /usr/lib/libgnutls.so.30.4.0
7ffff78cf000-7ffff7ace000 ---p 00127000 08:03 784569                     /usr/lib/libgnutls.so.30.4.0
7ffff7ace000-7ffff7ad9000 r--p 00126000 08:03 784569                     /usr/lib/libgnutls.so.30.4.0
7ffff7ad9000-7ffff7adc000 rw-p 00131000 08:03 784569                     /usr/lib/libgnutls.so.30.4.0
7ffff7adc000-7ffff7add000 rw-p 00000000 00:00 0
7ffff7add000-7ffff7bda000 r-xp 00000000 08:03 797055                     /usr/lib/libm-2.22.so
7ffff7bda000-7ffff7dd9000 ---p 000fd000 08:03 797055                     /usr/lib/libm-2.22.so
7ffff7dd9000-7ffff7dda000 r--p 000fc000 08:03 797055                     /usr/lib/libm-2.22.so
7ffff7dda000-7ffff7ddb000 rw-p 000fd000 08:03 797055                     /usr/lib/libm-2.22.so
7ffff7ddb000-7ffff7dfd000 r-xp 00000000 08:03 796992                     /usr/lib/ld-2.22.so
7ffff7f67000-7ffff7fc0000 rw-p 00000000 00:00 0
7ffff7fd5000-7ffff7ff8000 rw-p 00000000 00:00 0
7ffff7ff8000-7ffff7ffa000 r--p 00000000 00:00 0                          [vvar]
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0                          [vdso]
7ffff7ffc000-7ffff7ffd000 r--p 00021000 08:03 796992                     /usr/lib/ld-2.22.so
7ffff7ffd000-7ffff7ffe000 rw-p 00022000 08:03 796992                     /usr/lib/ld-2.22.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0
7ffffff85000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Program received signal SIGABRT, Aborted.
0x00007ffff69795f8 in raise () from /usr/lib/libc.so.6
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Thu Nov 19, 2015 3:02 pm    Post subject: Reply with quote

try to follow this guide to run it step by step until the error comes up

http://www.tutorialspoint.com/gnu_debugger/gdb_debugging_example2.htm

the only way to find where the issue rises is to catch the offending tintin line of code
Back to top
View user's profile Send private message
azuriolinist



Joined: 09 Nov 2015
Posts: 9

PostPosted: Sun Nov 29, 2015 8:00 am    Post subject: Reply with quote

PowerGod wrote:
try to follow this guide to run it step by step until the error comes up

http://www.tutorialspoint.com/gnu_debugger/gdb_debugging_example2.htm

the only way to find where the issue rises is to catch the offending tintin line of code


Hey! Thanks for the reply and I'm sorry for replying pretty late. So I ran the program through the gdb and got the thing to crash again, and typed in where. I'm pretty new to coding, and have no experience whatsoever with c, so please bear with me. Came up with this:

Code:
Program received signal SIGABRT, Aborted.
0x00007ffff69795f8 in raise () from /usr/lib/libc.so.6
(gdb) where
#0  0x00007ffff69795f8 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff697aa7a in abort () from /usr/lib/libc.so.6
#2  0x00007ffff69b805a in __libc_message () from /usr/lib/libc.so.6
#3  0x00007ffff69bd9a6 in malloc_printerr () from /usr/lib/libc.so.6
#4  0x00007ffff69be18e in _int_free () from /usr/lib/libc.so.6
#5  0x0000000000431123 in tintin_printf (ses=0x6eaa40,
    format=0x45d3e8 "#TRYING TO CONNECT '%s' TO '%s' PORT '%s'.") at utils.c:519
#6  0x0000000000412308 in new_session (ses=0x6eaa40, name=0x7ffffffee3b0 "eoe",
    arg=0x7fffffff63c5 "", desc=0, ssl=0) at session.c:242
#7  0x0000000000411b8b in do_session (ses=0x6eaa40,
    arg=0x7fffffff63b4 "78.47.44.186 8888") at session.c:85
#8  0x0000000000445120 in parse_script (root=0x702950, lvl=0, token=0x702670,
    shift=0x702670) at tokenize.c:729
#9  0x0000000000445eca in script_driver (ses=0x6eaa40, list=3,
    str=0x7ffff7fd70cc "#session eoe 78.47.44.186 8888") at tokenize.c:1069
#10 0x00000000004058b4 in process_input () at input.c:76
#11 0x000000000040d88a in poll_input () at update.c:175
#12 0x000000000040d61a in mainloop () at update.c:64
#13 0x0000000000408376 in main (argc=1, argv=0x7fffffffe768) at main.c:307
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Tue Dec 01, 2015 3:28 am    Post subject: Reply with quote

This is telling that the command at line 519 of utils.c is the issue.

"free(buffer);"

Now that's really strange, maybe you have issues with libc...

Anyway, you can try to comment that line like this: "// free(buffer);"
and recompile, to see if it still crashes.

BUT WARNING, this is just a test, because I don't know exactly what are the drawbacks of removing that command
Back to top
View user's profile Send private message
azuriolinist



Joined: 09 Nov 2015
Posts: 9

PostPosted: Tue Dec 01, 2015 7:24 am    Post subject: Reply with quote

So I commented out that particular line on the utils.c file, recompiled it, and ran it through the debugger. It crashed as I ran through the same steps, setting the highlight trigger and typing in a command that doesn't exist...

Code:
Program received signal SIGABRT, Aborted.
0x00007ffff69785f8 in raise () from /usr/lib/libc.so.6
(gdb) where
#0  0x00007ffff69785f8 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff6979a7a in abort () from /usr/lib/libc.so.6
#2  0x00007ffff69b705a in __libc_message () from /usr/lib/libc.so.6
#3  0x00007ffff69bc9a6 in malloc_printerr () from /usr/lib/libc.so.6
#4  0x00007ffff69beaf9 in _int_malloc () from /usr/lib/libc.so.6
#5  0x00007ffff69c03d4 in malloc () from /usr/lib/libc.so.6
#6  0x00000000004412e7 in str_alloc (len=70) at memory.c:56
#7  0x00000000004413af in str_dup (
    original=0x702a60 "\033[0m#ERROR: #UNKNOWN TINTIN-COMMAND \033[38;5;070m\033[32m'highlee'\033[0m.\033[0m") at memory.c:89
#8  0x000000000044149a in str_dup_printf (fmt=0x465529 "\033[0m%s\033[0m")
    at memory.c:107
#9  0x00000000004313c4 in tintin_puts2 (ses=0x6eaa40,
    string=0x702b10 "#ERROR: #UNKNOWN TINTIN-COMMAND \033[38;5;070m\033[32m'highlee'\033[0m.") at utils.c:604
#10 0x0000000000431527 in tintin_puts (ses=0x6eaa40,
    string=0x702b10 "#ERROR: #UNKNOWN TINTIN-COMMAND \033[38;5;070m\033[32m'highlee'\033[0m.") at utils.c:647
#11 0x0000000000431114 in tintin_printf (ses=0x6eaa40,
    format=0x45c2c0 "#ERROR: #UNKNOWN TINTIN-COMMAND '%s'.") at utils.c:517
#12 0x000000000040ad45 in parse_tintin_command (ses=0x6eaa40,
    input=0x6e1527 "") at parse.c:255
#13 0x000000000044574d in parse_script (root=0x7029d0, lvl=0, token=0x702720,
---Type <return> to continue, or q <return> to quit---
    shift=0x702720) at tokenize.c:919
#14 0x0000000000445ebb in script_driver (ses=0x6eaa40, list=3,
    str=0x7ffff7fd70cc "#highlee") at tokenize.c:1069
#15 0x00000000004058b4 in process_input () at input.c:76
#16 0x000000000040d88a in poll_input () at update.c:175
#17 0x000000000040d61a in mainloop () at update.c:64
#18 0x0000000000408376 in main (argc=1, argv=0x7fffffffe898) at main.c:307
(gdb)
[/code]
Back to top
View user's profile Send private message
PowerGod



Joined: 04 Aug 2014
Posts: 339

PostPosted: Tue Dec 01, 2015 1:40 pm    Post subject: Reply with quote

Now it is clear that the issue arises while allocating space for the arrays... free() and malloc() are related

So seems like the pointers are pointing to the wrong area of memory.

What type of environment are you working on ? (OS, CPU, etc...)
Back to top
View user's profile Send private message
azuriolinist



Joined: 09 Nov 2015
Posts: 9

PostPosted: Wed Dec 02, 2015 12:07 am    Post subject: Reply with quote

I'm on Archbang. Running lscpu gives this:

Code:
$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 37
Model name:            Intel(R) Core(TM) i3 CPU       M 350  @ 2.27GHz
Stepping:              2
CPU MHz:               933.000
CPU max MHz:           2266.0000
CPU min MHz:           933.0000
BogoMIPS:              4659.91
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              3072K
NUMA node0 CPU(s):     0-3
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm arat dtherm tpr_shadow vnmi flexpriority ept vpid
Back to top
View user's profile Send private message
Slysven



Joined: 10 Apr 2011
Posts: 365
Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK

PostPosted: Sat Dec 05, 2015 4:42 am    Post subject: Reply with quote

I think there is a problem with the calls in tintin_printf(...) and tintin_printf2(...) in utils.c they both use calls to vasprintf(&buffer, format, args) which is like vsprintf(...) but it allocates memory to hold the created string and sets the pointer buffer to point to it. This should then be freed when it is finished with. The trouble is that for some reason, if the memory allocation fails the value stored in buffer is undefined {in the GNU version - vasprintf is a GNU extension to POSIX requirements, it is also available in BSD variants and in that case buffer is set to NULL on failure to allocate memory}. The recommended use of vasprint is to test the return value which is the number of bytes allocated and it will be -1 on failure to allocate memory or if some other error occurs.

With the current code, should such a problem occur or not the pointer is passed blindly to tintin_puts(...) or tintin_puts2(...) respectively and even if the tintin executable survives that with a duff, undefined buffer value it is then used with free(buffer).

I'd suggest trying by changing:
Code:
void tintin_printf2(struct session *ses, char *format, ...)
{
   char *buffer;
   va_list args;

   va_start(args, format);
   vasprintf(&buffer, format, args);
   va_end(args);

   tintin_puts2(ses, buffer);

   free(buffer);
}

void tintin_printf(struct session *ses, char *format, ...)
{
   char *buffer;
   va_list args;

   va_start(args, format);
   vasprintf(&buffer, format, args);
   va_end(args);

   tintin_puts(ses, buffer);

   free(buffer);
}
to:
Code:
void tintin_printf2(struct session *ses, char *format, ...)
{
   char *buffer;
   va_list args;

   va_start(args, format);
   int bytes = vasprintf(&buffer, format, args);
   va_end(args);

   if( bytes > 0 )
   {
      tintin_puts2(ses, buffer);
      free(buffer);
   }
/* Could put something in here to debug warn about allocation failure
 *   else
 *   {
 *   
 *   }
 */
}

void tintin_printf(struct session *ses, char *format, ...)
{
   char *buffer;
   va_list args;

   va_start(args, format);
   int bytes = vasprintf(&buffer, format, args);
   va_end(args);

   if( bytes > 0 )
   {
      tintin_puts2(ses, buffer);
      free(buffer);
   }
/* Could put something in here to debug warn about allocation failure
 *   else
 *   {
 *   
 *   }
 */
}

Of course it would also be a good idea to track down why the allocation is failing, perhaps one or more of the arguments being passed to vasprint() are wrong in some circumstances...
Back to top
View user's profile Send private message
azuriolinist



Joined: 09 Nov 2015
Posts: 9

PostPosted: Sun Dec 06, 2015 9:10 am    Post subject: Reply with quote

That worked, thanks! For some reason, it seems to crash whenever it prints highlighted text surrounded with apostrophes when the output isn't coming from a connected session.
Code:

#showme {'Test'}
'Test'
#session cf carrionfields.net 4449
#TRYING TO CONNECT 'cf' TO 'carrionfields.net' PORT '4449'.

More often than not, when connecting to a session. Making the change above highlights the proper things without crashing now. Things like "#TRYING TO CONNECT 'some-sever'..." aren't highlighted, so maybe there's something there? Not sure.

Again, thanks!
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Wed Aug 24, 2016 9:22 pm    Post subject: Reply with quote

I think it's a buffer overflow as highlight assumes there's enough free space in the buffer to add highlights. Will look into it.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group