Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Bug reports ➜ MC crash

MC crash

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


Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Fri 05 Sep 2003 11:40 PM (UTC)

Amended on Fri 05 Sep 2003 11:41 PM (UTC) by Poromenos

Message

<aliases>
  <alias
   match="^sw[ ]+(\d)$"
   enabled="y"
   regexp="y"
   send_to="12"
   ignore_case="y"
   keep_evaluating="y"
   sequence="100"
  >
  <send>Dim wrlWorld
Dim varWorlds

varWorlds = GetWorldIdList
If (%1 - 1) &gt; UBound(varWorlds) Or (%1 - 1) &lt; LBound(varWorlds) Then
    Note &quot;This world number does not exist!&quot;
Else
    Set wrlWorld = GetWorldById(varWorlds(%1 - 1))
    World.PushCommand
    World.Disconnect
    wrlWorld.Connect
    wrlWorld.Activate
End If
</send>
  </alias>
</aliases>

This SOMETIMES crashes MC. The world number is valid, by the way.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 06 Sep 2003 07:17 AM (UTC)
Message
There is a known bug that new worlds (ones that are not yet saved) are not yet allocated an ID, and thus the GetWorldIdList will return blank for such worlds.

This means the getworldbyid will fail. I would add this test:


if wrlWorld is nothing then
   world.note "World has not been saved"
else
  ' blah blah
end if 


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #2 on Sat 06 Sep 2003 09:32 AM (UTC)
Message
No, there aren't new worlds there... I have 2 open worlds that have been saved, I switch between them about 4-5 times, and then, all of a sudden, it crashes...

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Sat 06 Sep 2003 10:24 AM (UTC)
Message
I would still put the test in.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #4 on Sat 06 Sep 2003 11:25 AM (UTC)
Message
I will put the test in, but why does it return null when it's not supposed to?

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #5 on Sun 07 Sep 2003 12:35 AM (UTC)
Message
I cannot explain that, but the spec for GetWorldByID says "In Vbscript use the test "is nothing" to see if the reference is to a valid world.".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #6 on Sun 07 Sep 2003 12:47 AM (UTC)
Message
Added it, still crashes...

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #7 on Sun 07 Sep 2003 11:41 PM (UTC)
Message
Don't know. It shouldn't, but ...

If you can give me steps to reliably reproduce it I will try to work out why.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #8 on Mon 08 Sep 2003 12:30 AM (UTC)
Message
Yes, add the alias and try it between two worlds lots of times :P That's what mine does... Crashes once in about 50 times...

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #9 on Tue 09 Sep 2003 10:34 PM (UTC)
Message
I tried it hundreds of times without a crash. Perhaps you have some script that runs on world activate or something like that, that is causing the crash.

You could try a couple of empty worlds, with that alias and nothing at all else, and see if it still happens. If not, I suggest you check elsewhere.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


22,038 views.

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

Go to topic:           Search the forum


[Go to top] top

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