[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Caugh in a loop?

Caugh in a loop?

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Sat 13 Aug 2005 04:27 AM (UTC)

Amended on Sat 13 Aug 2005 04:32 AM (UTC) by Zeno

Message
Well the MUD freezes (has happened twice), and I attach gdb to see this:
#0  0x00400402 in ?? ()
#1  0x00210826 in gettimeofday () from /lib/libc.so.6
#2  0x080e600f in start_timer (stime=0xbfa3eb04) at interp.c:1039
#3  0x080e5474 in interpret (ch=0x8f46150, argument=0xbfa3fb42 "") at interp.c:584
#4  0x0810a606 in mprog_do_command (cmnd=0xbfa40814 "  east", mob=0x8f46150, actor=0x8f477d0, obj=0x0, vo=0x0,
    rndm=0x8f477d0, ignore=0 '\0', ignore_ors=0 '\0') at mud_prog.c:2464
#5  0x0810a0dd in mprog_driver (
    com_list=0x8ece4c0 "if istransformed($n)\n\r  say ALIEN!!!\n\r  scream\n\r  west\n\r  east\n\r  south\n\r  north\n\rendif\n\r", mob=0x8f46150, actor=0x8f477d0, obj=0x0, vo=0x0, single_step=0 '\0') at mud_prog.c:2162
#6  0x0810ae14 in mprog_percent_check (mob=0x8f46150, actor=0x8f477d0, obj=0x0, vo=0x0, type=7) at mud_prog.c:2676
#7  0x0810b3d2 in mprog_greet_trigger (ch=0x8f477d0) at mud_prog.c:2929
#8  0x080615be in move_char (ch=0x8f477d0, pexit=0x8edd070, fall=0, running=0 '\0') at act_move.c:1351
#9  0x080617ef in do_east (ch=0x8f477d0, argument=0xbfa43575 "") at act_move.c:1389
#10 0x080e5486 in interpret (ch=0x8f477d0, argument=0xbfa43575 "") at interp.c:585
#11 0x080b8cd2 in game_loop () at comm.c:972
#12 0x080b8073 in main (argc=2, argv=0xbfa44ad4) at comm.c:340


[EDIT] Here's a better gdb:
#0  0x0810ac41 in mprog_wordlist_check (arg=0xbfa3fb42 "ALIEN!!! SOMEONE HELP ME!!!", mob=0x8f42b38, actor=0x8f44da0,
    obj=0x0, vo=0x0, type=1) at mud_prog.c:2626
#1  0x0810b546 in mprog_speech_trigger (txt=0xbfa3fb42 "ALIEN!!! SOMEONE HELP ME!!!", actor=0x8f44da0) at mud_prog.c:2983
#2  0x0804ba35 in do_say (ch=0x8f44da0, argument=0xbfa3fb42 "ALIEN!!! SOMEONE HELP ME!!!") at act_comm.c:1043
#3  0x080e5486 in interpret (ch=0x8f44da0, argument=0xbfa3fb42 "ALIEN!!! SOMEONE HELP ME!!!") at interp.c:585
#4  0x0810a606 in mprog_do_command (cmnd=0xbfa407f2 "  say ALIEN!!! SOMEONE HELP ME!!!", mob=0x8f44da0, actor=0x8f477d0,
    obj=0x0, vo=0x0, rndm=0x8f477d0, ignore=0 '\0', ignore_ors=0 '\0') at mud_prog.c:2464
#5  0x0810a0dd in mprog_driver (
    com_list=0x8ece770 "if istransformed($n)\n\r  say ALIEN!!! SOMEONE HELP ME!!!\n\r  scream\n\r  west\n\r  east\n\r  south\n\r  north\n\rendif\n\r", mob=0x8f44da0, actor=0x8f477d0, obj=0x0, vo=0x0, single_step=0 '\0') at mud_prog.c:2162
#6  0x0810ae14 in mprog_percent_check (mob=0x8f44da0, actor=0x8f477d0, obj=0x0, vo=0x0, type=7) at mud_prog.c:2676
#7  0x0810b3d2 in mprog_greet_trigger (ch=0x8f477d0) at mud_prog.c:2929
#8  0x080615be in move_char (ch=0x8f477d0, pexit=0x8edd070, fall=0, running=0 '\0') at act_move.c:1351
#9  0x080617ef in do_east (ch=0x8f477d0, argument=0xbfa43575 "") at act_move.c:1389
#10 0x080e5486 in interpret (ch=0x8f477d0, argument=0xbfa43575 "") at interp.c:585
#11 0x080b8cd2 in game_loop () at comm.c:972
#12 0x080b8073 in main (argc=2, argv=0xbfa44ad4) at comm.c:340


(gdb) f 0
#0  0x0810ac41 in mprog_wordlist_check (arg=0xbfa3fb42 "ALIEN!!! SOMEONE HELP ME!!!", mob=0x8f42b38, actor=0x8f44da0,
    obj=0x0, vo=0x0, type=1) at mud_prog.c:2626
2626            for ( i = 0; i < strlen( dupl ); i++ )


Both loops had the same gdb. I have no clue at all. Plus why is frame 0 "??"... The latest thing I added was qbits/abits.

Is it possible to cause a loop by a prog?

Here's the prog:
>greet_prog 100
if istransformed($n)
  say ALIEN!!! SOMEONE HELP ME!!!
  scream
  west
  east
  south
  north
endif


istransformed checks for a char flag.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Greven   Canada  (835 posts)  [Biography] bio
Date Reply #1 on Sat 13 Aug 2005 05:28 AM (UTC)

Amended on Sat 13 Aug 2005 05:29 AM (UTC) by Greven

Message
what is the value of dupl? Is it some rediculously high number? Only thing that pops out from this.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #2 on Sat 13 Aug 2005 06:27 AM (UTC)
Message
If I'm not mistaken, a frame of ?? means you're in library code somewhere where gdb doesn't have access to the symbols. This is corroborated by the fact that you got to "??" from the gettimeofday library function.

Another thing to check about dupl is that it might be a bad pointer and so point to a very long sequence of bytes before reaching a null. This would lead to the ridiculously high number Greven mentioned.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


10,986 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]