Page 4 of 10

Re: [Mod] HUD bars [1.7.0] [hudbars]

Posted: Sat Feb 11, 2017 23:32
by Fixer
Out`Of`Control of Liberty Land reports crashes related to hudbars (he also used hunger, hudarmor, hudclock):

Code: Select all

2017-02-11 06:01:18: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback on_player_hpchange(): /home/mt/bin/../mods/hudbars/init.lua:323: attempt to index field '?' (a nil value)
2017-02-11 06:01:18: ERROR[Main]: stack traceback:
2017-02-11 06:01:18: ERROR[Main]: 	/home/mt/bin/../mods/hudbars/init.lua:323: in function 'change_hudbar'
2017-02-11 06:01:18: ERROR[Main]: 	/home/mt/bin/../mods/hudbars/init.lua:497: in function 'func'
2017-02-11 06:01:18: ERROR[Main]: 	/home/mt/bin/../builtin/game/register.lua:514: in function </home/mt/bin/../builtin/game/register.lua:499>
You can contact him on IRC.

Re: [Mod] HUD bars [1.7.0] [hudbars]

Posted: Sun Feb 12, 2017 00:15
by Wuzzy
(he also used hunger, hudarmor, hudclock)
[hunger] is NOT compatible with [hudbars]. I don't know the other 2 mods, but they probably aren't made for [hudbars] as well. Out`Of`Control should get the dependencies right.

For [hudbars], there are [hbhunger] and [hbarmor]. Read the 1st post to learn more.

Re: [Mod] HUD bars [1.7.0] [hudbars]

Posted: Sun Feb 12, 2017 09:54
by Out`Of`Control
I do use hbhunger and hbarmor mods with hudbars

Re: [Mod] HUD bars [1.7.0] [hudbars]

Posted: Sun Feb 12, 2017 10:11
by Wuzzy
Okay, please give me a list of all mods you're using. If you know, also name the mods for which you know they depend on hudbars. If not, just say what the HUD bars in the interface are called (“Health”, “Breath”, etc.), if it worked previously.
Also say the version number of each of the important mods; you should find these in the readme files. I would try to update all the important mods to the latest official (!) release.

Can you also please test and try to reproduce this crash with vanilla Minetest Game, plus the all the HUD Bars-related mods you used, but NOTHING else (except dependencies)? If YES, then this will make fixing this bug a lot easier for me. It is also imporant you disable the [hud] and [hunger] mods, should they be active for some reason.

In my test, this setup works:
  • Minetest 0.4.15
  • Minetest Game 0.4.15
  • hudbars 1.7.0
  • hbhunger 0.5.2
  • hbarmor 0.2.0
  • 3d_armor 0.4.7
  • No other mods

Re: [Mod] HUD bars [1.7.0] [hudbars]

Posted: Fri Feb 24, 2017 23:12
by ExeterDad
Hey Wuzzy,

I'm getting crashes that seem to be the same as Out Of Controls. The tail end of the debug.txt is nearly identical to his. I've been watching closely and really can't find a common denominator other than there is a:

Code: Select all

ERROR[Server]: 3d_armor: Detached armor inventory is nil [on_hpchange]
Then immediately the players leave the server and then the crash. I can't see any pvp, or mob action beforehand that would cause the on_hpchange callback. So I'm pretty stymied. I can't duplicate this. And I doubt I can keep players playing for many hours on Vanilla to cause it to happen.
Right now the server seems to run stable for about a half day before it crashes. I'm certain the crashes started happening when I installed 3d_armor. The server would run until I restarted myself with hudbars and hbhunger installed. In fact I even went nearly three days without restarting the server before 3d_armor was installed.
Here's a bit of the log before the crash. I'm removing IP addresses since this forum is public. I have many more logs ending in about the same way.

Code: Select all

2017-02-24 11:41:54: ACTION[Server]: UltimateNoob places node default:sandstone at (-498,6,336)
2017-02-24 11:41:54: ACTION[Server]: UltimateNoob places node default:sandstone at (-497,6,336)
2017-02-24 11:41:59: ACTION[Server]: saavedra29 moves default:sapling to locked chest at (-201,3,297)
2017-02-24 11:42:34: ACTION[Server]: UltimateNoob leaves game. List of players: Xander saavedra29 
2017-02-24 11:42:39: ACTION[Server]: Server: User olaska123 at xx.xx.xx.x supplied wrong password (auth mechanism: SRP).
2017-02-24 11:42:45: ACTION[Server]: saavedra29 moves protector:protect to locked chest at (-201,3,297)
2017-02-24 11:43:16: ACTION[Server]: Server: User HALINA at xx.xx.xx.x supplied wrong password (auth mechanism: SRP).
2017-02-24 11:47:15: ACTION[Server]: saavedra29 tried to dig default:cobble at protected position (-192,-185,302)
2017-02-24 11:51:13: ACTION[Server]: saavedra29 tried to dig coloredwood:fence_white at protected position (-20,18,136)
2017-02-24 11:51:15: ACTION[Server]: saavedra29 tried to dig coloredwood:fence_white at protected position (-20,18,136)
2017-02-24 11:51:56: ACTION[Server]: Server: User jlandis2020 at xx.xx.xx.x supplied wrong password (auth mechanism: SRP).
2017-02-24 11:51:59: ACTION[Server]: Server: User apringle2020 at xx.xx.xx.x supplied wrong password (auth mechanism: SRP).
2017-02-24 11:51:59: ACTION[Server]: Moving Dey to static spawnpoint at (0,19,0)
2017-02-24 11:51:59: ACTION[Server]: Giving initial stuff to player Dey
2017-02-24 11:51:59: ACTION[Server]: Dey [xx.xx.xx.xx] joins game. 
2017-02-24 11:51:59: ACTION[Server]: Dey joins game. List of players: Xander saavedra29 Dey
2017-02-24 11:52:00: ACTION[Server]: Dey leaves game. List of players: Xander saavedra29 
2017-02-24 11:52:01: ERROR[Server]: 3d_armor: Player position is nil [set_player_armor]
2017-02-24 11:52:01: ACTION[Server]: Player  - chat2 no hud yet error
2017-02-24 11:52:07: ACTION[Server]: Server: User apringle2020 at xx.xx.xx.x supplied wrong password (auth mechanism: SRP).
2017-02-24 11:52:12: ACTION[Server]: jlandis2020 [xx.xx.xx.x5] joins game. 
2017-02-24 11:52:12: ACTION[Server]: jlandis2020 joins game. List of players: Xander saavedra29 jlandis2020
2017-02-24 11:52:12: ACTION[Server]: jloew2020 [xx.xx.xx.x] joins game. 
2017-02-24 11:52:12: ACTION[Server]: jloew2020 joins game. List of players: Xander saavedra29 jlandis2020 jloew2020
2017-02-24 11:52:14: ACTION[Server]: Server: User apringle2020 at xx.xx.xx.x supplied wrong password (auth mechanism: SRP).
2017-02-24 11:52:23: ACTION[Server]: Server: User apringle2020 at xx.xx.xx.x supplied wrong password (auth mechanism: SRP).
2017-02-24 11:52:32: ACTION[Server]: Server: User apringle2020 at xx.xx.xx.x supplied wrong password (auth mechanism: SRP).
2017-02-24 11:52:36: ACTION[Server]: jlandis2020 tried to dig xpanes:bar_flat at protected position (-9,16,-38)
2017-02-24 11:52:41: ACTION[Server]: jloew2020 tried to dig default:pine_tree at protected position (-17,17,-47)
2017-02-24 11:52:47: ERROR[Server]: 3d_armor: Detached armor inventory is nil [on_hpchange]
2017-02-24 11:52:47: ACTION[Server]: Xander leaves game. List of players: 
2017-02-24 11:52:47: ACTION[Server]: saavedra29 leaves game. List of players: 
2017-02-24 11:52:47: ACTION[Server]: jlandis2020 leaves game. List of players: 
2017-02-24 11:52:47: ACTION[Server]: jloew2020 leaves game. List of players: 
2017-02-24 11:52:48: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback on_player_hpchange(): .../leeh/.minetest/worlds/server/worldmods/hudbars/init.lua:323: attempt to index a nil value
2017-02-24 11:52:48: ERROR[Main]: stack traceback:
2017-02-24 11:52:48: ERROR[Main]: 	.../leeh/.minetest/worlds/server/worldmods/hudbars/init.lua:323: in function 'change_hudbar'
2017-02-24 11:52:48: ERROR[Main]: 	.../leeh/.minetest/worlds/server/worldmods/hudbars/init.lua:497: in function 'func'
2017-02-24 11:52:48: ERROR[Main]: 	/usr/share/minetest/builtin/game/register.lua:514: in function </usr/share/minetest/builtin/game/register.lua:499>
Hoping you or Stu might have a idea what's going on soon. I would hate to do without these mods.

Edit: Server is 0.4.15-dev. various builds from the last few weeks.
I should add that I am not currently using any kind of armor hud bar.

Version 1.7.1

Posted: Sat Feb 25, 2017 01:16
by Wuzzy
Version 1.7.1 released!

Changelog:
- Fix possible crash when the player health changed before the HUD Bars mod properly registered the player.

Background:
This bug was tricky to figure out, but after a bit of research and mod trickery I was able to reliably reproduce the bug and fix it.
This crash could happen if a mod changes the player health VERY early after joining. The bug was that HUD Bars then attempted to change the HUD bar of a player which didn't have a HUD bar yet, therefore: Crash! :D
This probably happened pretty rarely which explains why this crash didn't occour often to ExeterDad and Out`Of`Control.

Good for you that you insisted on fixing this bug. I almost forgot it, probably also because of the lack of further cooperation of Out`Of`Control and I still wasn't sure if the bug was real.

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Sat Feb 25, 2017 03:05
by ExeterDad
Whoo Hoo!!! That was fast work Wuzzy! If it wasn't for the fact our server is hopping right now, I'd take the new fix for a test drive right away.
I will certainly give feedback on this soon. BTW... this is a good opportunity to commend you on a great mod.

Edit: Okay 1.7.1 is up and running on the server. *fingers crossed

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Sat Feb 25, 2017 09:58
by bell07
I was able to reproduce the issue during smart_inventory development integration of 3d_armor too often :-(. If the game crashes on die the world was not starteble because of this bug. The game was crashing if the singleplayer joins. So I did some hacky if statements to work around this issue.
Great job and thanks for proper fix!

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Sat Mar 04, 2017 07:16
by ExeterDad
Just doing that feedback followup on your latest fix. It worked. Zero issues or crashes in a week with a live server. Naturally we've had a hangup or so for things I can totally blame myself for though.
Thanks for your efforts and a fast solution :)

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Mon Mar 06, 2017 03:41
by Out`Of`Control
Thanks for fix Wuzzy

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Tue Mar 07, 2017 19:49
by Out`Of`Control
Running recent version 1.7.1. logs get full

Code: Select all

ACTION[Server]: XXXX damaged by 3 hp at (220.488,23.831,863.8)
ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “armor”, player name: “XXXX”. new_value (-43) is smaller than 0!
when player remove, then place same armor back error is gone.

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Tue Mar 07, 2017 20:37
by Wuzzy
Do you use hbarmor and which version?

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Tue Mar 07, 2017 22:14
by Out`Of`Control
Yes, for now it happen only to one player. Player rejoin game, again logs get flooded

Code: Select all

ERROR[Server]: [hudbars] Bad call to hb.change_hudbar, identifier: “armor”, player name: “XXXX”. new_value (-43) is smaller than 0!

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Tue Mar 07, 2017 23:51
by Out`Of`Control
Wuzzy wrote:Do you use hbarmor and which version?
Latest version. If player rejoins error disappear.

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Wed Mar 08, 2017 00:08
by Wuzzy
Try hbarmor version 0.3.0: viewtopic.php?f=9&t=11337

Please report back in the hbarmor thread.

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Wed Mar 08, 2017 16:38
by Out`Of`Control
Looks as its gone, will keep an eye open.
In case it appear again will report on that thread

Thanks

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Wed Apr 26, 2017 03:40
by admicos
I translated the mod to Turkish, can you add it?

Code: Select all

# locale/tr.txt

Health = Can
Breath = Nefes
%s: %d/%d = %s: %d/%d

Re: [Mod] HUD bars [1.7.1] [hudbars]

Posted: Mon May 29, 2017 06:36
by AntumDeluge
Not sure where to report issues for this mod, but I am getting the following warning after logging on to my server when hudbars is installed:
...
2017-05-28 22:51:24: ACTION[Server]: AntumDeluge [192.168.1.118] joins game.
2017-05-28 22:51:24: ACTION[Server]: AntumDeluge joins game. List of players: AntumDeluge
2017-05-28 22:51:24: WARNING[Server]: Deprecated usage of statbar without size!
2017-05-28 22:51:24: WARNING[Server]: Deprecated usage of statbar without size!
2017-05-28 22:51:24: WARNING[Server]: Deprecated usage of statbar without size!
...
--- Edit ---

I'm using hudbars version 1.7.1 (fa82d2d Git) & Minetest server 0.4.15:

Code: Select all

$ minetest --version
Minetest 0.4.15 (Linux)
Using Irrlicht 1.8.3
Build info: VER=0.4.15 BUILD_TYPE=None RUN_IN_PLACE=0 USE_GETTEXT=1 USE_SOUND=1 USE_CURL=1 USE_FREETYPE=1 USE_LUAJIT=1 STATIC_SHAREDIR="/usr/share/minetest"

Re: [Mod] HUD bars [1.8.0] [hudbars]

Posted: Mon May 29, 2017 14:21
by Wuzzy
Version 1.8.0 released!

- Added Turkish translation by admicos
- Hopefully fixed the warning reported by AntumDeluge (please test!)

Re: [Mod] HUD bars [1.8.0] [hudbars]

Posted: Fri Jun 16, 2017 04:36
by AntumDeluge
Sorry I didn't respond sooner. I haven't seen warning since update. Thank you Wuzzy.

Re: [Mod] HUD bars [1.8.0] [hudbars]

Posted: Sun Jun 18, 2017 18:26
by texmex
Hi Wuzzy! I'm a Github head. How to I do the equivalent of a pull request to this repo? Replacing deprecated settings methods…

Re: [Mod] HUD bars [1.8.0] [hudbars]

Posted: Sun Jun 18, 2017 18:38
by Wuzzy
Just send me patches.

Re: [Mod] HUD bars [1.8.0] [hudbars]

Posted: Sun Jun 18, 2017 19:28
by texmex
I don't know how to do that. But basically I replaced all calls for

Code: Select all

minetest.setting_*
with

Code: Select all

minetest.settings:*
as the former method is getting deprecated. You can probably just do it yourself if you want.

Re: [Mod] HUD bars [1.8.0] [hudbars]

Posted: Tue Jun 20, 2017 14:44
by Wuzzy
Okay, fixed in development version.
This will break compability with Minetest 0.4.12, 0.4.13, 0.4.14 and 0.4.15. >_>
What a pointless Lua API change.

Re: [Mod] HUD bars [1.8.0] [hudbars]

Posted: Tue Jun 20, 2017 15:03
by TenPlus1
agreed.