[Mod] HUD bars [2.2.2] [hudbars]

User avatar
Fixer
Member
Posts: 895
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

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

by Fixer » Post

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.

User avatar
Wuzzy
Member
Posts: 3938
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

(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.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

Out`Of`Control
Member
Posts: 19
Joined: Sun Feb 12, 2017 08:17
GitHub: 00c
In-game: Evil
Location: Liberty Land
Contact:

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

by Out`Of`Control » Post

I do use hbhunger and hbarmor mods with hudbars

User avatar
Wuzzy
Member
Posts: 3938
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

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
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

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

by ExeterDad » Post

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.

User avatar
Wuzzy
Member
Posts: 3938
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Version 1.7.1

by Wuzzy » Post

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.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

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

by ExeterDad » Post

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
Last edited by ExeterDad on Sat Feb 25, 2017 12:11, edited 1 time in total.

bell07
Member
Posts: 587
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

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

by bell07 » Post

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!

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

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

by ExeterDad » Post

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 :)

Out`Of`Control
Member
Posts: 19
Joined: Sun Feb 12, 2017 08:17
GitHub: 00c
In-game: Evil
Location: Liberty Land
Contact:

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

by Out`Of`Control » Post

Thanks for fix Wuzzy

Out`Of`Control
Member
Posts: 19
Joined: Sun Feb 12, 2017 08:17
GitHub: 00c
In-game: Evil
Location: Liberty Land
Contact:

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

by Out`Of`Control » Post

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.

User avatar
Wuzzy
Member
Posts: 3938
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

Do you use hbarmor and which version?
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

Out`Of`Control
Member
Posts: 19
Joined: Sun Feb 12, 2017 08:17
GitHub: 00c
In-game: Evil
Location: Liberty Land
Contact:

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

by Out`Of`Control » Post

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!

Out`Of`Control
Member
Posts: 19
Joined: Sun Feb 12, 2017 08:17
GitHub: 00c
In-game: Evil
Location: Liberty Land
Contact:

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

by Out`Of`Control » Post

Wuzzy wrote:Do you use hbarmor and which version?
Latest version. If player rejoins error disappear.

User avatar
Wuzzy
Member
Posts: 3938
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

Try hbarmor version 0.3.0: viewtopic.php?f=9&t=11337

Please report back in the hbarmor thread.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

Out`Of`Control
Member
Posts: 19
Joined: Sun Feb 12, 2017 08:17
GitHub: 00c
In-game: Evil
Location: Liberty Land
Contact:

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

by Out`Of`Control » Post

Looks as its gone, will keep an eye open.
In case it appear again will report on that thread

Thanks

User avatar
admicos
Member
Posts: 13
Joined: Fri Feb 24, 2017 14:31
GitHub: admicos
IRC: admicos
In-game: admicos
Contact:

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

by admicos » Post

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

User avatar
AntumDeluge
Member
Posts: 167
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

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

by AntumDeluge » Post

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"

User avatar
Wuzzy
Member
Posts: 3938
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

Version 1.8.0 released!

- Added Turkish translation by admicos
- Hopefully fixed the warning reported by AntumDeluge (please test!)
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
AntumDeluge
Member
Posts: 167
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

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

by AntumDeluge » Post

Sorry I didn't respond sooner. I haven't seen warning since update. Thank you Wuzzy.

User avatar
texmex
Member
Posts: 1751
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

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

by texmex » Post

Hi Wuzzy! I'm a Github head. How to I do the equivalent of a pull request to this repo? Replacing deprecated settings methods…
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw

User avatar
Wuzzy
Member
Posts: 3938
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

Just send me patches.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
texmex
Member
Posts: 1751
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

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

by texmex » Post

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.
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw

User avatar
Wuzzy
Member
Posts: 3938
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

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

by Wuzzy » Post

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.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
TenPlus1
Member
Posts: 2727
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

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

by TenPlus1 » Post

agreed.

Post Reply

Who is online

Users browsing this forum: deoxify and 5 guests