JK2MV 1.3 possible bug

General discussion and help regarding JK2MV.
Post Reply
KingYodah
Posts: 15
Joined: 05 Mar 2017, 21:06

JK2MV 1.3 possible bug

Post by KingYodah » 05 Mar 2017, 21:17

Hello peoples,
I have a question about JK2MV1.3, recently we on our SoL server encountered weird problems with our adminery, specifically couldn't do amslap and amsleep commands. At least according to Zelah, our higher admin currently. I'm lower admin but amsleep worked for me, interesting enough. However, amslap didn't work for anyone, it said "unknown command". So we returned to 1.2.1 and these commands work now for everyone with access to them.
Can it be something related to some hidden bug in 1.3 version? Or somewhere else? I would exclude something wrong with our permissions since in 1.2.1 all works fine. We use DcMod for our adminery.
Ty for help and see you around :D

)>SoL<(~KingYodah

User avatar
Daggolin
Administrator
Posts: 789
Joined: 23 Feb 2015, 13:05

Re: JK2MV 1.3 possible bug

Post by Daggolin » 05 Mar 2017, 22:29

It's very unlikely that the issue is jk2mv related.

Anyway, can you give us some more information?

Which version of DCMoD are you running? Any custom tweaks? What permissions did you set? What other options did you configure?

Also is the error reproducible (does it happen whenever you install jk2mv 1.3?) or did you try to run jk2mv 1.3 only once cause you assumed it is responsible for your issues and never tried to verify it?

Any information you can provide would help. Exact reproduction steps would be best.

But honestly, I doubt that this issue is jk2mv related, because jk2mv isn't aware of those commands and "unknown command" handling happens entirely in the mod qvm. So it's most unlikely that jk2mv breaks a specific command for only specific people. But if you provide more information we can try looking into it.

User avatar
fau
Staff
Posts: 414
Joined: 16 Aug 2015, 01:01
Location: Warsaw / Poland
Contact:

Re: JK2MV 1.3 possible bug

Post by fau » 05 Mar 2017, 22:58

Can you paste exactly what error message you were getting? "unknown command" and? There should be a number or a text.

KingYodah
Posts: 15
Joined: 05 Mar 2017, 21:06

Re: JK2MV 1.3 possible bug

Post by KingYodah » 12 Mar 2017, 00:25

What number and text? That was all I got (could've answered earlier but I thought I'll get notification of reply into mail..). Now we are back at 1.2.1, the error can't be reproduced.
If the command worked with JK2MV 1.2.1 but not with JK2MV 1.3 then I may get feeling it has something to do with 1.3, I tried to /amslap a bot multiple times and at each time it said "unknown command". When we returned to 1.2.1 and I tried /amslap a bot, it said "unknown command" + that I need to be HC to do that command. That HC reminder didn't show at JK2MV 1.3.
As long as I know, we use Dcmod 1.2. About changes to permissions, I don't know about any but we can have that confirmed.

User avatar
ouned
Administrator
Posts: 581
Joined: 23 Feb 2015, 13:03
Location: Gliese581c

Re: JK2MV 1.3 possible bug

Post by ouned » 12 Mar 2017, 14:51

do you mind sharing your server mod + configs?
i dont see a way how we could debug it otherwise

does just "unknown command" even exist? doesn't it always at least reprint the entered command? like "unknown cmd asdfg"
a quick test showed that it does, even on dcmod

Kameleon
Administrator
Posts: 320
Joined: 07 Jun 2015, 08:36

Re: JK2MV 1.3 possible bug

Post by Kameleon » 12 Mar 2017, 17:24

Hmm, no matter what the cause might be, DcMod does act weird between the different exe's - not just on JK2MV though, which I find important to note.

I did a quick test myself yesterday with the JK2MV 1.3 and 1.2.1 exe's, as well as the old jk2Ded.exe for 1.04, and got different results on each. The version I used was called "DCMoD v. 1.2 Public Pre-Release Platinum", as that was the one I had available on my pc. :) I set the permissions for all three admin levels to maximum permissions for testing purposes, and used /dchelp admin to check permissions, as well as doing a few cmd's, but for all tests they didn't work if they didn't show on dchelp.

Also, the Unknown Cmd's does state the cmd's names, but it also prints: This Command has been disabled, right above the unknown message, in the cases it was relevant.

With lvl3 + full permissions they didn't show/work on 1.3, but they did work on 1.2.1 and jk2Ded.

With lvl2 + full permissions they didn't show/work in 1.3 OR jk2Ded.exe, but they still worked fine invitation 1.2.1 :)

With lvl1 + full permissions no commands showed/worked regardless of the exe, which I found quite interesting.

I have already sent this to Daggolin, as well as the mod and config I used, but I'd suggest SoL does the same, so that we may get better results! :)

User avatar
ouned
Administrator
Posts: 581
Joined: 23 Feb 2015, 13:03
Location: Gliese581c

Re: JK2MV 1.3 possible bug

Post by ouned » 12 Mar 2017, 20:03

that really sounds like a memory bug in dcmod then
lets hope its not because we cant fix it then, i think there is no source available for dcmod

User avatar
Daggolin
Administrator
Posts: 789
Joined: 23 Feb 2015, 13:05

Re: JK2MV 1.3 possible bug

Post by Daggolin » 12 Mar 2017, 20:05

Kameleon wrote:With lvl3 + full permissions they didn't show/work on 1.3, but they did work on 1.2.1 and jk2Ded.
So 1.3 acts DIFFERENT than jk2Ded.
Kameleon wrote:With lvl2 + full permissions they didn't show/work in 1.3 OR jk2Ded.exe, but they still worked fine invitation 1.2.1 :)
So 1.3 acts THE SAME as jk2Ded.
Kameleon wrote:With lvl1 + full permissions no commands showed/worked regardless of the exe, which I found quite interesting.
So all act the same.

Without looking into it myself this sounds really unhealthy. Probably a programming error in dcmod (memory bug), making it rely on undefined behaviour. :/

KingYodah
Posts: 15
Joined: 05 Mar 2017, 21:06

Re: JK2MV 1.3 possible bug

Post by KingYodah » 12 Mar 2017, 20:37

Thought of that it MIGHT be also some bug hidden within Dcmod, but forgot to post it yesterday and I was very tired then. I also remembered to post this:
Amslap command is available only for lvl3 admin. I was logging in as lvl2 admin (assuming I got your terminology right) and tried to /amslap a bot. But instead of telling me I must be lvl3 admin I got a message which you can see in picture below. At the time of the picture we had JK2MV 1.3. The picture is saying that the command was disabled, even though we did no such thing, and like I said above "unknown command <command_name>" (not number)
Image

User avatar
Daggolin
Administrator
Posts: 789
Joined: 23 Feb 2015, 13:05

Re: JK2MV 1.3 possible bug

Post by Daggolin » 12 Mar 2017, 22:13

I just took a quick look at what Kameleon has sent me.

First thing I noticed: DCMoD uses a command called "dccvar" to set the bitvalues for each rank. In the config I received it looked like this:

Code: Select all

dccvar dc_hcrights "ALL +SECRET +PROTECT +CHEATS +FLY"
The command however seems to only work without quotationmarks. Whenever I tried using it with quotes (") it just set the same value the cvar had before. When using the command like the following I got the same results for all ranks:

Code: Select all

dccvar dc_hcrights ALL +SECRET +PROTECT +CHEATS +FLY
But that's not the issue we are discussing here, only the reason for different results with different adminlevels. I have tried the above permissions on the following jk2mv versions from the official dedicated server downloads:
  • jk2mvded-v1.2.1-win32-x64.exe
  • jk2mvded-v1.2.1-win32-x86.exe
  • jk2mvded-v1.2.1-linux-amd64 (using the Windows-Subsystem for Linux)
  • jk2mvded-v1.3-win32-x64.exe
  • jk2mvded-v1.3-win32-x86.exe
  • jk2mvded-v1.3-linux-amd64 (using the Windows-Subsystem for Linux)
The "dccvar" command sets the bitvalue for the specified cvar to the same value on all of those jk2mv versions, as well as jk2Ded.exe.
However the bitvalues in jk2mvded 1.3 seem to be interpreted differently.
When using "dccvar dc_sarights ROB" it assigns the value 33554432 to dc_sarights, which grants level 1 the "ROB" command group (amrob), this works on all dedicated server versions.
When manually assigning the value 33554431 (one lower than ROB) to a level it should grant all command groups with values lower than ROB (1=SILENCE, 2=SLEEP, 4=FREEZE, 8=KICK, 16=GET, 32=PSAY, ...) to that level, but on jk2mv 1.3 it grants ROB to the admin.

Another interesting part is that the "dccvar" command prints all available commands when used like this:

Code: Select all

dccvar dc_sarights
and for 33554431 it shows

Code: Select all

amsilence, amunsilence, amsleep, amwake/amunsleep, amfreeze, amunfreeze, amkick, amget, amgoto/amtakemeto, ampsay, ammotd, amAAlist, amAAstatus, amban, amkickban, amaddip, amlistip, amremoveip, amslap, amsummon, amrelease, am***, am****, amempower, amunempower, amterminator, amunterminator, amren/amrename, amtimescale, amorigin, amtele, ammake, amtoggle, amAAmanage, amAAadd, amAAclear, amAAignore, amAAunignore, amAAenforce, amAAunenforce, ambanname, amunbanname, ambanteam, amunbanteam, ambanforce, amunbanforce, ambantoggle, amunbantoggle, ambankill, amunbankill, amhunted, amunhunted, amstatus, aminfo, amcheckip, amcvar, amrcon, amexplode
, just like expected. But the ingame admin only gets ROB.

So I guess the ingame system uses another function to check permissions than the "dccvar" command, but without the source code it's hard to figure out what it does and why it fails on jk2mvded 1.3. However as it seems that the issue only exists on jk2mv 1.3 (x86, x64, amd64) I think it's worth looking into it.

//Edit: We looked into it and fau found the cause. It's a bug in jk2mv 1.3. Thanks for finding and reporting this one!
//Edit2: Latest development builds should have a fix (as of 1.3-29-g5593e50). If someone wants to try it themselves: https://jk2mv.org/builds/

User avatar
fau
Staff
Posts: 414
Joined: 16 Aug 2015, 01:01
Location: Warsaw / Poland
Contact:

Re: JK2MV 1.3 possible bug

Post by fau » 14 Mar 2017, 20:45

Thanks for reporting Yodah. Daggolin debugged it and wrote a solution, it will be in next (probably 1.3.1) JK2MV release and in development builds linked above. Unfortunately jk2mv 1.3 isn't suitable for dcmod. Most mods and basejk should be fine though.

KingYodah
Posts: 15
Joined: 05 Mar 2017, 21:06

Re: JK2MV 1.3 possible bug

Post by KingYodah » 14 Mar 2017, 22:17

fau wrote:Thanks for reporting Yodah. Daggolin debugged it and wrote a solution, it will be in next (probably 1.3.1) JK2MV release and in development builds linked above. Unfortunately jk2mv 1.3 isn't suitable for dcmod. Most mods and basejk should be fine though.
I'll post about this thread on our forums too, and ty :)

User avatar
Daggolin
Administrator
Posts: 789
Joined: 23 Feb 2015, 13:05

Re: JK2MV 1.3 possible bug

Post by Daggolin » 31 Mar 2017, 20:24

By the way, JK2MV 1.3.1 got released a few days ago with the bug fixed. ;)

https://jk2mv.org/Downloads

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest

Created by Matti from StylesFactory.pl and Warlords of Draenor (modified by jk2.info)
Powered by phpBB® Forum Software © phpBB Limited
GZIP: On
 

 

cron