Server freeze on plugin loading
#1
Hey all, i've recently become more interested in MCServer and decided to mess around with Lua and make a basic plugin. I've followed the plugin tutorial and looked at the Core plugin on github but i'm not necessarily sure what the issue causing the server to freeze on startup would be. I have the debug plugin enabled but it doesn't seem to log anything as the server freezes right when loading my plugin. (I have named the file plugin.lua) Code is below if anyone could give me a hand, thanks.

function Initialize(Plugin)
	plugin:setName("Basics")
	plugin:setVersion(1)
	
	PluginManager = cRoot:Get():GetPluginManager()
	
	LOG("Loading " .. Plugin:GetName() .. "Version: " .. Plugin:GetVersion())
	
	cPluginManager.BindCommand('/heal', 'Basics.heal', HealPlayer, ' Heal player to full health.')
	return true 
end

function HealPlayer(Split, Player)
local Healed = false
	if (Split[2] == nil) then
		SendMessage(Player, cChatColor.Red .. 'You have been healed.')
		Player:Feed(20)
		Player:Heal(20)
		Healed = true
		return true
	end
end
	
  if not(Healed) then
	SendMessageFailure(Player, Split[2] .. 'was not found.')
	return false
end
		
		
EDIT: I'm not sure why the code tags added the extra /'s.. but the code is also on pastebin here: http://pastebin.com/R1sGhyrM

EDIT 2: It seems that the ZeroBrane debugger isn't functioning correctly, will report back if i figure out a solution
Reply
Thanks given by:
#2
I guess this issue could be considered closed for now, the issue seems to be with the zerobrane debugging.
Reply
Thanks given by:
#3
Reply
Thanks given by:
#4
Reply
Thanks given by:
#5
Okay, is there anything special about the network setup on the machine you're testing this on? Perhaps something in the name resolution, failing to resolve localhost, or just taking long? I'm expecting this to be the cause. I'm inviting Paul, the author of ZBS, over to this thread, he might have further ideas about this. We want to make this work, after all.
Reply
Thanks given by:
#6
Reply
Thanks given by:
#7
xoft,

I have tested running the debugger on two different networks (School & Home) and neither seem to make a different though i'm not sure that would change anything) Running mcserver.exe also runs fine when not using the debugger so i couldn't imagine it's network related.

Image of server debugger starting: http://puu.sh/7Wgcl/59d5225587.png - Freezes when loading plugin "Basic" (Currently the plugin i am working on)
Imagine of running mcserver independently: http://puu.sh/7WgtX/3868b645f7.png (Using the same files as the debugger, finishes setup)

Paul,
I'm currently running Win8 and will test out using an earlier version and report back.
Thanks

Edit: I went through versions of MobDebug and have narrowed down the issue between version .52 and .53 (Won't launch on .53). Hopefully that helps.
Reply
Thanks given by:
#8
(04-05-2014, 10:20 AM)gv1222 Wrote: I'm currently running Win8 and will test out using an earlier version and report back.

Edit: I went through versions of MobDebug and have narrowed down the issue between version .52 and .53 (Won't launch on .53). Hopefully that helps.

That's very interesting and not quite what I expected. I don't have win8 handy, but will try to get access to it, although I'm not sure how I can reproduce the same configuration as it's a company laptop, so I probably won't be able to install MC server there Wink.

Is there any chance you can bisect the issue to a particular commit between .52 and .53? The only thing that could be relevant is "Replaced socket.select with non-blocking .receive as it is faster.", but I'm not sure what it would cause the issue you see.

Also, it would be helpful to turn verbose debugging on in ZBS (you can add "debugging.verbose = true" to the user.lua config file) as it would report all debugging commands to the output window, which may help to figure out where it blocks. So far that's the only instance where it's been reported, so I'd be interested to find what may be causing this. Thank you for your help!
Reply
Thanks given by:
#9

Alright.. earlier today i had access to my second computer and tested out ZeroBrane on and it seemed to be fine with the latest version of MobDebug so i would assume that the issue is somehow related to the computer individually, unsure what the exact issue is yet, if I do manage to figure it out i'll make sure to post back.

Update: After posting this i noticed something strange, on the computer that the debugger is not functioning correctly, the zerobrane window with flash as if it is asking for admin rights, etc. Unsure why this is happening as both computers have the "same" setup.
Reply
Thanks given by:
#10
Couldn't it be that the flashing ZBS is actually in a breakpoint and waiting for you to continue execution? It would happen if you changed the debugger.runonstart value (or didn't change, I've forgotten which way Wink
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)