Error msg when closing mush 4.64

Posted by Broud on Thu 04 Nov 2010 08:58 AM — 19 posts, 73,297 views.

Netherlands #0
System: XP-SP3 Mushclient 4.64 with aardplugins (including the new mapper). GMCP enabled.

When closing mush i get an errormessage (Document timer window mushclient.exe application error. Instruction 0x0044ed34 references memory at 0x2d2d2d31).

When i then start the mushclient again, my mushwindow layout is back to initial. Hence it doesn't save my layout (among other things probably i haven't discovered....)
Amended on Thu 04 Nov 2010 03:54 PM by Broud
Australia Forum Administrator #1
I suggest you upgrade to 4.66.

http://www.gammon.com.au/forum/?id=10706

One of the things it fixes is a crash on close with multiple plugins.
Netherlands #2
upgraded to 4.66 today but to no avail. It's not a huge problem just annoying that i have set up all my windows again when launch mush.
Australia Forum Administrator #3
There is only one real reason I can see that might happen now. Could you check to see if any of your plugins does this:


SetSpeedWalkDelay


Or if some are not in Lua then:


SpeedWalkDelay


You could use Crimson Editor or similar, do a "find in files" of your plugins directory to quickly check if either of those words is there.

There is a possible problem that if, during world close, a plugin does try to change the speedwalk delay (something I wouldn't have expected to happen often) then the timer window was deleted earlier during the world close sequence, and that may cause the crash.

If that isn't it I may have to ask for a copy of the world file, plus all plugins you installed, so I can reproduce it and get to the bottom of it.
Netherlands #4
function sort(name, line, wildcards)
tempdelay = GetSpeedWalkDelay()
SetSpeedWalkDelay(125)
amsorting=1
EnableTriggerGroup("sortmain")
SendNoEcho("identify "..wildcards[1])
end

in a plugin named containersort.xml
Australia Forum Administrator #5
What a guess, eh?

Well just to confirm, comment out that line, and try closing MUSHclient*. See if the problem goes away.


function sort(name, line, wildcards)
  tempdelay = GetSpeedWalkDelay()
--  SetSpeedWalkDelay(125)
  amsorting=1
  EnableTriggerGroup("sortmain")
  SendNoEcho("identify "..wildcards[1])
end



(Make sure that is the only place - it seems strange he is getting the current delay time and not putting it back).

[EDIT]

* You will need to reload the plugin for the change to take effect, so either do a "reinstall" from the plugins list, or you will have to restart MUSHclient twice - the first time to get the reloaded plugin, and the second time to see if the problem goes away.
Amended on Mon 08 Nov 2010 04:53 AM by Nick Gammon
Australia Forum Administrator #6
I've released version 4.67 - just try that to see if it fixes the problem.


http://www.gammon.com.au/forum/?id=10719
Netherlands #7
installed 4.67. now my gmcp_handler won't load.

Run-time error
Plugin: GMCP_handler (called from world: Aardwolf)
Immediate execution
...\Program Files\MUSHclient\lua\json\decode\object.lua:70: attempt to call field 'Ca' (a nil value)
stack traceback:
...\Program Files\MUSHclient\lua\json\decode\object.lua:70: in function 'buildCapture'
...\Program Files\MUSHclient\lua\json\decode\object.lua:92: in function 'load_types'
C:\Program Files\MUSHclient\lua\json\decode.lua:84: in function 'buildDecoder'
C:\Program Files\MUSHclient\lua\json\decode.lua:97: in main chunk
[C]: in function 'require'
C:\Program Files\MUSHclient\lua\json.lua:5: in main chunk
[C]: in function 'require'
[string "Plugin"]:1: in main chunk
[WARNING] C:\Program Files\MUSHclient\worlds\plugins\GMCP_handler.xml
Line 79: Error parsing script (Cannot load)
[WARNING] C:\Program Files\MUSHclient\worlds\Aardwolf\Aardwolf.MCL
Line 2081: Error in file "C:\Program Files\MUSHclient\worlds\plugins\GMCP_handler.xml" (Not loaded)
MUSHclient mapper installed, version 2.0
Plugin 'GMCP_handler' not installed. Attempting to install it...
Run-time error
Plugin: GMCP_handler (called from world: Aardwolf)
Immediate execution
...\Program Files\MUSHclient\lua\json\decode\object.lua:70: attempt to call field 'Ca' (a nil value)
stack traceback:
...\Program Files\MUSHclient\lua\json\decode\object.lua:70: in function 'buildCapture'
...\Program Files\MUSHclient\lua\json\decode\object.lua:92: in function 'load_types'
C:\Program Files\MUSHclient\lua\json\decode.lua:84: in function 'buildDecoder'
C:\Program Files\MUSHclient\lua\json\decode.lua:97: in main chunk
[C]: in function 'require'
C:\Program Files\MUSHclient\lua\json.lua:5: in main chunk
[C]: in function 'require'
[string "Plugin"]:1: in main chunk
[WARNING] C:\Program Files\MUSHclient\worlds\plugins\GMCP_handler.xml
Line 79: Error parsing script (Cannot load)
--------------------------------------------------------------------------------
Plugin 'GMCP_handler' not installed. Please download and install it.
It is required for the correct operation of the Aardwolf_GMCP_Mapper plugin.
--------------------------------------------------------------------------------


The good news however is that the errormsg when closing is fixed, as is my window lay out :)
Thanks for all this btw.
Amended on Tue 09 Nov 2010 09:56 AM by Broud
#8
It is because json checks lpeg to be < .9 which .10 is even though it is a new version.

change lua/json/decode/object.lua to look like this


Line 67:

	-- BEGIN LPEG < 0.9 SUPPORT
--	if DecimalLpegVersion < 0.9 then
--		objectItems = buildItemSequence(objectItem / applyObjectKey, ignored)
--		objectItems = lpeg.Ca(lpeg.Cc(false) / initObject * objectItems)
--	-- END LPEG < 0.9 SUPPORT
--	else
		objectItems = buildItemSequence(lpeg.Cg(objectItem), ignored)
		objectItems = lpeg.Cf(lpeg.Ct(0) * objectItems, rawset)
--	end


Line 24

--if DecimalLpegVersion < 0.9 then
--	function initObject()
--		return {}
--	end
--	function applyObjectKey(tab, key, val)
--		tab[key] = val
--		return tab
--	end
--end
-- END LPEG < 0.9 SUPPORT


Bast
Amended on Tue 09 Nov 2010 02:14 PM by Bast
USA #9
Bast said:
It is because json checks lpeg to be < .9 which .10 is even though it is a new version.

Must be the (quote) "naive" version-handling I heard about on the mailing list. The author created a new version recently that fixes that, perhaps Nick can update the version MUSHclient ships with:

http://lua-users.org/lists/lua-l/2010-11/msg00047.html
Australia Forum Administrator #10
Well it's not *that* naive - 0.10 is indeed less than 0.9.

A bit silly to use numeric version numbers and then go from 0.9 to 0.1, eh? But that wasn't the fault of the LuaJSON author.

I've updated LuaJSON to version 1.2.1 in version 4.68 of MUSHclient, and tested with my trivial JSON encode/decode script. Seems to work OK.
Australia Forum Administrator #11
Broud said:

The good news however is that the errormsg when closing is fixed, as is my window lay out :)


Glad to hear that. Hope you got the LuaJSON problem sorted too.
USA #12
Nick Gammon said:
Well it's not *that* naive - 0.10 is indeed less than 0.9.

A bit silly to use numeric version numbers and then go from 0.9 to 0.1, eh? But that wasn't the fault of the LuaJSON author.

It's a fairly common versioning tactic, in fact. http://semver.org/
Australia Forum Administrator #13
I've released version 4.68 of MUSHclient which simply has an updated LuaJSON module. This was tested with GMCP on Aardwolf and seems to work OK.
Australia Forum Administrator #14
Twisol said:

It's a fairly common versioning tactic, in fact. http://semver.org/


From that:


A normal version number MUST take the form X.Y.Z where X, Y, and Z are integers.


Well 0.10 is not in that format, eh?
USA #15
It's a variant, most likely. (Major).(Minor). It's just missing the (Patch) version, which is either added when needed (and assumed to be zero) or conflated into the minor version.

No, it's not precisely what semver.org describes, but you get my point. It's not intended to be a decimal number, but a period-separated list of decreasing-in-magnitude versions.
Amended on Tue 09 Nov 2010 07:36 PM by Twisol
Australia Forum Administrator #16
Twisol said:

It's a variant, most likely. (Major).(Minor). It's just missing the (Patch) version, ...


An invalid variant, considering the wording "[it] MUST take the form X.Y.Z".

It doesn't say "it must look something along the lines of X.Y.Z".
Australia Forum Administrator #17
Roberto actually defined the version like this:


#define VERSION		"0.10"


And the lpeg.version function:


static int version_l (lua_State *L) {
  lua_pushstring(L, VERSION);
  return 1;
}


So it's a string, not a number. However:


print ("0.10" > "0.9") --> false


Don't get me wrong, I understand what you are saying about the version strings. However without the third digit (eg. 0.9.0) you are entitled to do a straight comparison.

And therefore 0.10 is a lower version than 0.9, comparing strings or numbers.
Netherlands #18
Nick Gammon said:


Glad to hear that. Hope you got the LuaJSON problem sorted too.


I've run the 4.68 installationand everything is perfect. Thanks alot.