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

same scripts,V2.00.9 work well, but V2.01b crash

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



Joined: 27 Nov 2013
Posts: 5

PostPosted: Wed Nov 27, 2013 11:37 pm    Post subject: same scripts,V2.00.9 work well, but V2.01b crash Reply with quote

I am new to tt++, I began to use tt++ about a month ago.
last week, I upgrade tt++ from V2.00.9 to V2.01.0b (source files download from http://tintin.sourceforge.net/board/viewtopic.php?t=1942).
I found that the V2.01.0b crashed for my scripts, but V2.00.9 worked well for the same scripts.
crash prompt:
DEBUG_STACK[000] = parse_input(bust,walkto lj 1)
DEBUG_STACK[001] = find_room(0xc30c80,1)
DEBUG_STACK[002] = map_search_compile(0xc30c80,0xcb00d5,0x7fffe7d4c240)

my OS: win7 x64 sp1, cygwin(X64 version)
scripts:
Code:

#alias {walkto} {
    #class {walk} read $ROOT/walk.tin;
   #regex {%1} {{[\x80-\xff]+}} {#variable l_zone {$area_map[%1]}} {#variable l_zone %1};
   #map read $ROOT/$MAP/$l_zone.map;
   #map flag static on;
   #map goto 1;   
   #delay {0.3} {
      walk.to $l_zone %2;
      #unvariable l_zone;
   };
}

Code:

#alias {walk.to} {
   #if {"%1" != "$walk_zone"} {
      #if {"%1" == "yz"} {fly wm;#map goto 武庙};
      #elseif {"%1" == "bjzjc"} {fly bj};
      #elseif {"%1" == "zns"} {fly qzj};
      #elseif {"%1" == "hh"} {#map leave;fly wm;e;n;w;#map goto 1};
      #else {fly %1};
      #variable walk_zone %1;
   };
   #variable walk_room %2;
   #map find $walk_room;
   #ticker {walk} {#path walk} {0.3};
}


debug info
Quote:

walkto lj 3
#DEBUG ALIAS {walkto} {lj 3}
[02] class {walk} read $ROOT/walk.tin
#CLASS {walk} HAS BEEN OPENED.
#CLASS {walk} IS ALREADY CLOSED.
[15] regexp {lj} {{[\x80-\xff]+}}
[06] else
[02] variable l_zone lj
#OK. VARIABLE {l_zone} HAS BEEN SET TO {lj}.
[05] endregex
[02] map read $ROOT/$MAP/$l_zone.map
[02] map flag static on
[02] map goto 1

--------------------------------------------------------------------------------
DEBUG_STACK[000] = parse_input(bust,walkto lj 3)
DEBUG_STACK[001] = find_room(0x6000b6970,1)
DEBUG_STACK[002] = map_search_compile(0x6000b6970,0x60017e155,0x20d260)
[/code]
Back to top
View user's profile Send private message
achates



Joined: 27 Nov 2013
Posts: 5

PostPosted: Thu Nov 28, 2013 2:15 am    Post subject: Reply with quote

I add #showme to print #map debug info, and find :

Quote:

walkto lj 2
#DEBUG ALIAS {walkto} {lj 2}
[02] class {walk} read $ROOT/walk.tin
#CLASS {walk} HAS BEEN OPENED.
#CLASS {walk} IS ALREADY CLOSED.
[15] regexp {lj} {{[\x80-\xff]+}}
[06] else
[02] variable l_zone lj
#OK. VARIABLE {l_zone} HAS BEEN SET TO {lj}.
[05] endregex
[02] showme $ROOT/$MAP/${l_zone}.map
pmxkx_mods/maps/

[02] map read $ROOT/$MAP/${l_zone}.map
[02] map flag static on

#map doesn't get the right filename. but why?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Thu Nov 28, 2013 8:48 am    Post subject: Reply with quote

The debug output doesn't substitute variables so that looks okay.

It might be the search compiler crashing, I'll look into it.
Back to top
View user's profile Send private message Send e-mail
stormdragon2976



Joined: 19 Nov 2010
Posts: 73
Location: /dev/null

PostPosted: Tue Jan 14, 2014 1:25 pm    Post subject: Reply with quote

I develop the tintin-alteraeon code availalbe at https://github.com/stormdragon2976/tintin-alteraeon. before updating to the latest tintin, when I used 2.00.9, everything worked great. After updating to 2.01.0 I'm getting write errors on my history ticker that keeps a copy of the command history saved to a file. Also, there are sh -c errors that were not there before. The same code has no errors and works perfect in 2.00.9. The tintin-alteraeon code is so large it would be really hard to give examples of the problems without pasting lots and lots of lines. But, perhaps this error I got when closing tintin will be helpful:
*** Error in `tt++': free(): invalid next size (fast): 0x09ae5f28 ***
*** Error in `tt++': malloc(): memory corruption (fast): 0x09ae5f48 ***
_________________
Storm
Follow me at https://social.stormdragon.tk
Back to top
View user's profile Send private message Visit poster's website AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Tue Jan 14, 2014 2:14 pm    Post subject: Reply with quote

You performed a clean compile right? You'd do so using rm *.o followed by make.

I need more specific info or I'd just be looking blind.
Back to top
View user's profile Send private message Send e-mail
stormdragon2976



Joined: 19 Nov 2010
Posts: 73
Location: /dev/null

PostPosted: Tue Jan 14, 2014 8:18 pm    Post subject: Reply with quote

Definitely a clean compile. Installing from the aur means the code is compiled cleanly in its own folder before being installed system wide. Also, people using other distros like Debian testing are having the same issues. I have checked the variables that determine the path of the history file, and everything is as it should be. However, it says it can't write to file {}. In 2.00.9 it writes to the file without complaint. I can give code snippets, but this code is several thousand lines altogether and a lot of stuff builds off of other stuff, so I'm not sure how useful the smaller bits would be if you aren't familiar with the whole project.
The ticker that is giving the write error is:
Code:

#TICKER           {historyWriter}  {#if {&{name}} {#history {write} {$gameDataPath.history}}}                                 {5}

I have checked the variables and they all have the correct info.
_________________
Storm
Follow me at https://social.stormdragon.tk
Back to top
View user's profile Send private message Visit poster's website AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Wed Jan 15, 2014 7:51 am    Post subject: Reply with quote

You need to escape the . there in the latest version because of nesting:
Code:

#TICKER           {historyWriter}  {#if {&{name}} {#history {write} {$gameDataPath\.history}}}                                 {5}

That should hopefully fix that.
Back to top
View user's profile Send private message Send e-mail
stormdragon2976



Joined: 19 Nov 2010
Posts: 73
Location: /dev/null

PostPosted: Wed Jan 15, 2014 11:10 am    Post subject: Reply with quote

Awesome, historyWriter is working again. There are still some problems though, hopefully as easy to fix as the last one. Also, I'm still getting an error when I close tintin++. It's different than before, and quite a bit larger:
Code:

#end
write in write_line_mud: Bad file descriptor

#SESSION 'Alter Aeon' IS ALREADY CLOSED.
DEBUG_STACK[000] = script_driver(0x81b2610,-1,0x812a950)
DEBUG_STACK[001] = do_end(0x81b2610,0x8216058)
DEBUG_STACK[002] = cleanup_session(0x81b2610)
DEBUG_STACK[003] = check_all_events(0x81b2610,65,0,4, ...)
DEBUG_STACK[004] = script_driver(0x81b2610,5,0xbfb5227c)
DEBUG_STACK[005] = parse_input(Alter Aeon,stop_background_music)
DEBUG_STACK[006] = write_line_mud(0xbfb4ac3c,0x81b2610)
DEBUG_STACK[007] = write_line_mud(0xbfb4ac3c,0x81b2610)
DEBUG_STACK[008] = write_line_mud(0xbfb4ac3c,0x81b2610)
DEBUG_STACK[009] = write_line_mud(0xbfb4ac3c,0x81b2610)
DEBUG_STACK[010] = write_line_mud(0xbfb4ac3c,0x81b2610)
DEBUG_STACK[011] = write_line_mud(0xbfb4ac3c,0x81b2610)
DEBUG_STACK[012] = write_line_mud(0xbfb4ac3c,0x81b2610)
DEBUG_STACK[013] = write_line_mud(0xbfb4ac3c,0x81b2610)
DEBUG_STACK[014] = write_line_mud(0xbfb4ac3c,0x81b2610)
DEBUG_STACK[015] = write_line_mud(0xbfb4ac3c,0x81b2610)
DEBUG_STACK[016] = write_line_mud(0xbfb4ac3c,0x81b2610)
DEBUG_STACK[017] = cleanup_session(0x81b2610)
 #SESSION 'Alter Aeon' DIED.
*** Error in `tt++': free(): invalid next size (fast): 0x08214eb0 ***
======= Backtrace: =========
/usr/lib/libc.so.6(+0x6d9a1)[0xb75829a1]
/usr/lib/libc.so.6(+0x73b5a)[0xb7588b5a]
/usr/lib/libc.so.6(+0x7479c)[0xb758979c]
tt++[0x806bcaf]
tt++[0x8056226]
tt++[0x804e440]
tt++[0x804ea18]
tt++[0x807bda9]
tt++[0x807b830]
tt++[0x804ce5e]
tt++[0x80523a4]
tt++[0x8053bb7]
tt++[0x8049cb8]
/usr/lib/libc.so.6(__libc_start_main+0xf3)[0xb752e993]
tt++[0x8049d96]
======= Memory map: ========
08048000-080a5000 r-xp 00000000 08:03 681730     /usr/bin/tt++
080a5000-080a6000 r--p 0005c000 08:03 681730     /usr/bin/tt++
080a6000-080a9000 rw-p 0005d000 08:03 681730     /usr/bin/tt++
080a9000-080e5000 rw-p 00000000 00:00 0
0811b000-0823a000 rw-p 00000000 00:00 0          [heap]
b74c7000-b74e2000 r-xp 00000000 08:03 661644     /usr/lib/libgcc_s.so.1
b74e2000-b74e3000 rw-p 0001a000 08:03 661644     /usr/lib/libgcc_s.so.1
b74e3000-b74f6000 r-xp 00000000 08:03 658654     /usr/lib/libresolv-2.18.so
b74f6000-b74f7000 ---p 00013000 08:03 658654     /usr/lib/libresolv-2.18.so
b74f7000-b74f8000 r--p 00013000 08:03 658654     /usr/lib/libresolv-2.18.so
b74f8000-b74f9000 rw-p 00014000 08:03 658654     /usr/lib/libresolv-2.18.so
b74f9000-b74fb000 rw-p 00000000 00:00 0
b7513000-b7515000 rw-p 00000000 00:00 0
b7515000-b76be000 r-xp 00000000 08:03 658641     /usr/lib/libc-2.18.so
b76be000-b76c0000 r--p 001a9000 08:03 658641     /usr/lib/libc-2.18.so
b76c0000-b76c1000 rw-p 001ab000 08:03 658641     /usr/lib/libc-2.18.so
b76c1000-b76c4000 rw-p 00000000 00:00 0
b76c4000-b76d9000 r-xp 00000000 08:03 661690     /usr/lib/libz.so.1.2.8
b76d9000-b76da000 r--p 00014000 08:03 661690     /usr/lib/libz.so.1.2.8
b76da000-b76db000 rw-p 00015000 08:03 661690     /usr/lib/libz.so.1.2.8
b76db000-b76f3000 r-xp 00000000 08:03 658608     /usr/lib/libpthread-2.18.so
b76f3000-b76f4000 r--p 00017000 08:03 658608     /usr/lib/libpthread-2.18.so
b76f4000-b76f5000 rw-p 00018000 08:03 658608     /usr/lib/libpthread-2.18.so
b76f5000-b76f7000 rw-p 00000000 00:00 0
b76f7000-b76f9000 r-xp 00000000 08:03 658650     /usr/lib/libutil-2.18.so
b76f9000-b76fa000 r--p 00001000 08:03 658650     /usr/lib/libutil-2.18.so
b76fa000-b76fb000 rw-p 00002000 08:03 658650     /usr/lib/libutil-2.18.so
b76fb000-b7764000 r-xp 00000000 08:03 666194     /usr/lib/libpcre.so.1.2.2
b7764000-b7765000 r--p 00068000 08:03 666194     /usr/lib/libpcre.so.1.2.2
b7765000-b7766000 rw-p 00069000 08:03 666194     /usr/lib/libpcre.so.1.2.2
b7767000-b7769000 rw-p 00000000 00:00 0
b7769000-b776e000 r-xp 00000000 08:03 658606     /usr/lib/libnss_dns-2.18.so
b776e000-b776f000 r--p 00004000 08:03 658606     /usr/lib/libnss_dns-2.18.so
b776f000-b7770000 rw-p 00005000 08:03 658606     /usr/lib/libnss_dns-2.18.so
b7770000-b777b000 r-xp 00000000 08:03 658601     /usr/lib/libnss_files-2.18.so
b777b000-b777c000 r--p 0000a000 08:03 658601     /usr/lib/libnss_files-2.18.so
b777c000-b777d000 rw-p 0000b000 08:03 658601     /usr/lib/libnss_files-2.18.so
b777d000-b777f000 rw-p 00000000 00:00 0
b777f000-b7780000 r-xp 00000000 00:00 0          [vdso]
b7780000-b77a0000 r-xp 00000000 08:03 658625     /usr/lib/ld-2.18.so
b77a0000-b77a1000 r--p 0001f000 08:03 658625     /usr/lib/ld-2.18.so
b77a1000-b77a2000 rw-p 00020000 08:03 658625     /usr/lib/ld-2.18.so
bfa51000-bfb5b000 rw-p 00000000 00:00 0          [stack]
DEBUG_STACK[000] = script_driver(0x81b2610,-1,0x812a950)
DEBUG_STACK[001] = do_end(0x81b2610,0x8216058)
DEBUG_STACK[002] = cleanup_session(0x81b2610)

Also, my background music code is no longer working. But I think it may be related to escaping more .s. I'm going to try and fix it, but will pprobably be writing again to ask for help lol.
_________________
Storm
Follow me at https://social.stormdragon.tk
Back to top
View user's profile Send private message Visit poster's website AIM Address
stormdragon2976



Joined: 19 Nov 2010
Posts: 73
Location: /dev/null

PostPosted: Wed Jan 15, 2014 1:57 pm    Post subject: Reply with quote

I'm pretty sure the remaining problem is with my background music. If it were up to me I'd just pull out that code and be done with it, but I have people using it that says background music adds something to the game.
Here's the code related to background music. This works error free in 00.9.
#ACTION {^kxwt_area -1}
{
#variable {areaNumber} {-1};
#variable {areaName} {default};
#if {$oldAreaNumber != $areaNumber}
{
play new_area;
#variable {oldAreaNumber} {-1};
bgm_new_area
}
}
{8}

#ACTION {^kxwt_area %d %2}
{
#variable {areaNumber} {%1};
#variable {areaName} {%2};
#if {$oldAreaNumber != $areaNumber}
{
play new_area;
#variable {oldAreaNumber} {%1};
bgm_new_area
}
}
{9}

#alias {^bgm_new_area$}
{
bgm_get_info;
#if {"$bgmusic" == "true"}
{
#if {"$backgroundMusicTrack" != "$oldBackgroundMusicTrack"}
{
stop_background_music;
bgmPlay
}
}
}
{9}

#alias {^bgm_get_info$}
{
#script {backgroundMusicTrack} {echo "$areaName" | tr -d "[:punct:]" | tr "[:upper:]" "[:lower:]" | sed -e 's/ /_/g' -e 's/_$//'};
#variable {backgroundMusicTrackName} {$backgroundMusicTrack[1]};
#script {backgroundMusicTrack} {if [ -f "sounds/bgm/$backgroundMusicTrackName\.ogg" ]; then echo "$backgroundMusicTrackName"; elif [ -f "sounds/bgm/default_$terrainNumber\.ogg" ]; then echo "default_$terrainNumber"; else echo "default"; fi};
#variable {backgroundMusicTrack} {$backgroundMusicTrack[1]}
}
{9}

#ALIAS {^bgmPlay$}
{
#system {play -qV0 "sounds/bgm/$backgroundMusicTrack.ogg" repeat 100000 gain $volume &> /dev/null& echo "$!" > .backgroundMusicPID};
#script {musicPID} {cat .backgroundMusicPID};
#variable {musicPID} {${musicPID[1]}};
#variable {bgmusic} {true};
#variable {oldBackgroundMusicTrack} {$backgroundMusicTrack}
}
{9}

#ALIAS {^stop_background_music$}
{
#if {"$bgmusic" == "true"}
{
#script {if [[ "$musicPID" =~ [0-9].* ]] ; then kill $musicPID;echo "#unticker {backgroundMusic}";fi};
#system {if [ -f ".backgroundMusicPID" ] ; then rm ".backgroundMusicPID" &> /dev/null;fi};
#unvariable {bgmusic};
#variable {oldBackgroundMusicTrack} {}
}
}
{9}

#ALIAS {bgmusic}
{
#if {"$bgmusic" != "true"}
{
bgmPlay;
#showme {Background music is now on.}
};
#else
{
#showme {Background music is already playing. To disable it, type nobgmusic.}
}
}
{9}

#ALIAS {nobgmusic}
{
stop_background_music;
#showme {Background music is now off.}
}
{9}
#variable {backgroundMusicTrackName} {}
#variable {oldBackgroundMusicTrack} {}

Hopefully, that will fix everything. Maybe even clear the errors when I close the program.
_________________
Storm
Follow me at https://social.stormdragon.tk
Back to top
View user's profile Send private message Visit poster's website AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Wed Jan 15, 2014 7:46 pm    Post subject: Reply with quote

Looks like you forgot to escape one .ogg in the bgmPlay alias.

I hope that's it.

Looks like you have a SESSION DISCONNECTED event? That appears to be the problem, mind posting the code?
Back to top
View user's profile Send private message Send e-mail
stormdragon2976



Joined: 19 Nov 2010
Posts: 73
Location: /dev/null

PostPosted: Wed Jan 15, 2014 9:23 pm    Post subject: Reply with quote

That got gackground music sort of working again. It doesn't seem to want to change tracks when the area changes. I think I can fix that though, will try anyway. Here is the code for session end as well as program end:
Code:

#EVENT {SESSION DISCONNECTED}
{
   #unvariable {connected};
   stop_background_music
}

#EVENT {PROGRAM TERMINATION}
{
   #system {if [ -f ".backgroundMusicPID" ] ; then kill $(cat ".backgroundMusicPID");rm ".backgroundMusicPID" &> /dev/null;fi}
}

_________________
Storm
Follow me at https://social.stormdragon.tk
Back to top
View user's profile Send private message Visit poster's website AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Wed Jan 15, 2014 10:33 pm    Post subject: Reply with quote

It looks like something is send to the mud, after the session ends, which causes the error. Might be something as silly as an enter or a space.

Do you get that backtrace every time?
Back to top
View user's profile Send private message Send e-mail
stormdragon2976



Joined: 19 Nov 2010
Posts: 73
Location: /dev/null

PostPosted: Wed Jan 15, 2014 11:26 pm    Post subject: Reply with quote

Yes, unless I just load the main aa.tin file then #end without logging in. But any time I leave the game I get that error.
_________________
Storm
Follow me at https://social.stormdragon.tk
Back to top
View user's profile Send private message Visit poster's website AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Thu Jan 16, 2014 8:35 pm    Post subject: Reply with quote

I'm pretty busy at the moment, but I'll look into it when I have time.
Back to top
View user's profile Send private message Send e-mail
stormdragon2976



Joined: 19 Nov 2010
Posts: 73
Location: /dev/null

PostPosted: Thu Jan 16, 2014 9:57 pm    Post subject: Reply with quote

Ok, and thanks for all the help. There's no rush, because other than the crash on close, and backgound music not working as expected, everything else is flawless. I was wondering though, shouldn't the nesting . sign respect braces? E.g.
Code:

$myPath.txt

is a variable myPath.txt, but:
Code:

${myPath}.txt

is a variable called myPath with .txt tacked on to the end of it. This would make it much easier to fix my background music issues. Currently the \ seems to show up in the path name making my if statement fail to find files that exist.
_________________
Storm
Follow me at https://social.stormdragon.tk
Back to top
View user's profile Send private message Visit poster's website AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Sun May 11, 2014 8:21 pm    Post subject: Re: same scripts,V2.00.9 work well, but V2.01b cr Reply with quote

achates wrote:
I am new to tt++, I began to use tt++ about a month ago.
last week, I upgrade tt++ from V2.00.9 to V2.01.0b (source files download from http://tintin.sourceforge.net/board/viewtopic.php?t=1942).
I found that the V2.01.0b crashed for my scripts, but V2.00.9 worked well for the same scripts.


I'll probably need your map file to fix this issue as it's difficult to recreate.
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