testmineweirdo reports: ImageError while going through ... #7410

Open
opened 2024-09-12 09:10:23 +02:00 by yourland-report · 15 comments

testmineweirdo reports a bug:

ImageError while going through netherlands church nether portal

Player position:

{
	x = 3112.6721191406,
	y = 29294.5,
	z = 4019.5639648438
}

Player look:

{
	x = 0.25258040428162,
	y = -0.03612045198679,
	z = 0.96690142154694
}

Player information:

{
	version_string = "5.9.0",
	avg_rtt = 0.17399999499321,
	max_rtt = 4.2950000762939,
	state = "Active",
	protocol_version = 43,
	minor = 9,
	connection_uptime = 7825,
	ip_version = 6,
	min_rtt = 0.16799999773502,
	min_jitter = 0,
	max_jitter = 4.1160001754761,
	avg_jitter = 0.0020000040531158,
	formspec_version = 7,
	serialization_version = 29,
	patch = 0,
	lang_code = "",
	major = 5
}

Player meta:

{
	fields = {
		["3d_armor_inventory"] = "return {\"\", \"\", \"\", \"\", \"\", \"\"}",
		repellant = "0",
		hud_state = "on",
		partychat = "party",
		yl_commons_player_created = "1708500045",
		["petz:werewolf"] = "0",
		["signslib:pos"] = "(-1108,30,-2977)",
		["stamina:level"] = "15",
		xp = "106750",
		["stamina:exhaustion"] = "10.5",
		jointime = "1708500045",
		bitten = "0",
		yl_commons_thankyou = "94",
		played_time = "4221575",
		digged_nodes = "412607",
		yl_church = "return {[\"last_death_portal\"] = 1726124357, [\"last_heal\"] = 1724396781, [\"last_death\"] = {[\"x\"] = -873, [\"y\"] = -327, [\"z\"] = 20002}}",
		died = "978",
		crafted = "117151",
		inflicted_damage = "124866",
		placed_nodes = "53613",
		["petz:lycanthropy"] = "0",
		yl_commons_player_joined = "1726117211",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		punch_count = "6844",
		["petz:werewolf_clan_idx"] = "3"
	}
}

Log identifier


[MOD] yl_report log identifier = MotgwxWs2k8bLnHo7hV5LrDNN1Fzb3ht

Profiler save:

profile-20240912T071023.json_prettyEE

Status:

# Server: version: 5.8.0-yl-debug | game: Minetest Game | uptime: 7d 2h 44min 44s | max lag: 0.584s | clients (10/52): AliasAlreadyTaken, Bailiff, daydream, Deathwing, flux, LadyPixels, Murmel, RPiManiac, Service, testmineweirdo

Teleport command:

/teleport xyz 3113 29295 4020

Compass command:

/give_compass Construction MotgwxWs2k8bLnHo7hV5LrDNN1Fzb3ht D2691E 3113 29295 4020
testmineweirdo reports a bug: > ImageError while going through netherlands church nether portal Player position: ``` { x = 3112.6721191406, y = 29294.5, z = 4019.5639648438 } ``` Player look: ``` { x = 0.25258040428162, y = -0.03612045198679, z = 0.96690142154694 } ``` Player information: ``` { version_string = "5.9.0", avg_rtt = 0.17399999499321, max_rtt = 4.2950000762939, state = "Active", protocol_version = 43, minor = 9, connection_uptime = 7825, ip_version = 6, min_rtt = 0.16799999773502, min_jitter = 0, max_jitter = 4.1160001754761, avg_jitter = 0.0020000040531158, formspec_version = 7, serialization_version = 29, patch = 0, lang_code = "", major = 5 } ``` Player meta: ``` { fields = { ["3d_armor_inventory"] = "return {\"\", \"\", \"\", \"\", \"\", \"\"}", repellant = "0", hud_state = "on", partychat = "party", yl_commons_player_created = "1708500045", ["petz:werewolf"] = "0", ["signslib:pos"] = "(-1108,30,-2977)", ["stamina:level"] = "15", xp = "106750", ["stamina:exhaustion"] = "10.5", jointime = "1708500045", bitten = "0", yl_commons_thankyou = "94", played_time = "4221575", digged_nodes = "412607", yl_church = "return {[\"last_death_portal\"] = 1726124357, [\"last_heal\"] = 1724396781, [\"last_death\"] = {[\"x\"] = -873, [\"y\"] = -327, [\"z\"] = 20002}}", died = "978", crafted = "117151", inflicted_damage = "124866", placed_nodes = "53613", ["petz:lycanthropy"] = "0", yl_commons_player_joined = "1726117211", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", punch_count = "6844", ["petz:werewolf_clan_idx"] = "3" } } ``` Log identifier ``` [MOD] yl_report log identifier = MotgwxWs2k8bLnHo7hV5LrDNN1Fzb3ht ``` Profiler save: ``` profile-20240912T071023.json_prettyEE ``` Status: ``` # Server: version: 5.8.0-yl-debug | game: Minetest Game | uptime: 7d 2h 44min 44s | max lag: 0.584s | clients (10/52): AliasAlreadyTaken, Bailiff, daydream, Deathwing, flux, LadyPixels, Murmel, RPiManiac, Service, testmineweirdo ``` Teleport command: ``` /teleport xyz 3113 29295 4020 ``` Compass command: ``` /give_compass Construction MotgwxWs2k8bLnHo7hV5LrDNN1Fzb3ht D2691E 3113 29295 4020 ```
AliasAlreadyTaken was assigned by yourland-report 2024-09-12 09:10:23 +02:00
AliasAlreadyTaken added the
4. step/needs confirmation
label 2024-09-19 16:26:31 +02:00
Member

I got this in the transitional nether portal:

2024-10-16 23:45:12: ERROR[Main]: generateImage(): baseimg is NULL (attempted to create texture "")
2024-10-16 23:45:12: ERROR[Main]: generateImagePart(): baseimg == NULL for part_of_name="[colorize:#A00:255", cancelling.
2024-10-16 23:45:12: ERROR[Main]: generateImage(): Failed to generate "[colorize:#A00:255"
2024-10-16 23:45:12: ERROR[Main]: generateImage(): baseimg is NULL (attempted to create texture "^[colorize:#A00:255")
2024-10-16 23:45:12: ERROR[Main]: generateImage(): baseimg is NULL (attempted to create texture "")
2024-10-16 23:45:12: ERROR[Main]: generateImagePart(): baseimg == NULL for part_of_name="[colorize:#A50:255", cancelling.
2024-10-16 23:45:12: ERROR[Main]: generateImage(): Failed to generate "[colorize:#A50:255"
2024-10-16 23:45:12: ERROR[Main]: generateImage(): baseimg is NULL (attempted to create texture "^[colorize:#A50:255")

When errors appeared, I saw a smoke (from nether:fumarole I think).

[minetest 5.9.1]

/teleport xyz 3112 29296 4020
I got this in the transitional nether portal: ```bash 2024-10-16 23:45:12: ERROR[Main]: generateImage(): baseimg is NULL (attempted to create texture "") 2024-10-16 23:45:12: ERROR[Main]: generateImagePart(): baseimg == NULL for part_of_name="[colorize:#A00:255", cancelling. 2024-10-16 23:45:12: ERROR[Main]: generateImage(): Failed to generate "[colorize:#A00:255" 2024-10-16 23:45:12: ERROR[Main]: generateImage(): baseimg is NULL (attempted to create texture "^[colorize:#A00:255") 2024-10-16 23:45:12: ERROR[Main]: generateImage(): baseimg is NULL (attempted to create texture "") 2024-10-16 23:45:12: ERROR[Main]: generateImagePart(): baseimg == NULL for part_of_name="[colorize:#A50:255", cancelling. 2024-10-16 23:45:12: ERROR[Main]: generateImage(): Failed to generate "[colorize:#A50:255" 2024-10-16 23:45:12: ERROR[Main]: generateImage(): baseimg is NULL (attempted to create texture "^[colorize:#A50:255") ``` When errors appeared, I saw a smoke (from nether:fumarole I think). [minetest 5.9.1] ```bash /teleport xyz 3112 29296 4020 ```
whosit added
1. kind/bug
and removed
4. step/needs confirmation
labels 2024-10-16 22:49:31 +02:00

This is due to a change in 5.9.0. You'll need to do:

"blank.png^[noalpha^[colorize:..."

or make a fully black image and do:

"black.png^[colorize:..."

This is due to a change in 5.9.0. You'll need to do: "blank.png^[noalpha^[colorize:..." or make a fully black image and do: "black.png^[colorize:..."

Every occurance of colorization that has no base texture will cause this sadly.

Every occurance of colorization that has no base texture will cause this sadly.
Member

Should this bug be converted into a general bug for all mods that do this?
Or create a new one and link all these there? idk.

Should this bug be converted into a general bug for all mods that do this? Or create a new one and link all these there? idk.
Member

"blank.png^[noalpha^[colorize:..."

i haven't tested this, but i don't think it's necessary to use blank.png. instead, use something like

[combine:16x16^[noalpha^[colorize:#000:255

> "blank.png^[noalpha^[colorize:..." i haven't tested this, but i don't think it's necessary to use blank.png. instead, use something like ```[combine:16x16^[noalpha^[colorize:#000:255```

that would work, however that would also take up a good bit more room if used in lots of occurences.

And it would take slightly more code.

that would work, however that would also take up a good bit more room if used in lots of occurences. And it would take slightly more code.

Is there a way to find all occurrences of that?

Is there a way to find all occurrences of that?
AliasAlreadyTaken added the
2. prio/interesting
label 2024-10-29 05:19:16 +01:00

python script could easily work

python script could easily work
AliasAlreadyTaken added this to the Alias@work project 2024-10-29 05:43:44 +01:00
AliasAlreadyTaken removed this from the Alias@work project 2024-10-29 05:43:53 +01:00

A little python script I quickly made. No docs but here's a rundown of how it works.

  1. run python3 search.py (or whatever you name it) in your terminal (make sure that it's in the directory where all the mods you're testing are in.)
  2. input the keyword (or really whatever you're trying to find)
  3. input what to ignore.
  4. type yes or no depending on if you need to ignore more (in this case you'll want yes to allow you to add more options to avoid an fp (or multiple))
  5. Then input the number of extra keywords to ignore.
  6. Fill in all the extras then the script should run.

In the end it should tell you all the occurences of the keyword, and what file has it. Hope this helps.

@AliasAlreadyTaken pinging you since this is somewhat of a more important matter since 5.9.0 users and above can't see particles, but might get their chat spammed with warnings.

import re
from collections import defaultdict

def is_text_file(filepath):
    blacklisted_extensions = ('.png', '.jpg', '.jpeg')
    if filepath.lower().endswith(blacklisted_extensions):
        return False
    return True

def search_files(directory, include_term, exclude_terms):
    results = defaultdict(int)
    include_pattern = re.compile(re.escape(include_term), re.IGNORECASE)
    exclude_patterns = [re.compile(re.escape(term), re.IGNORECASE) for term in exclude_terms]
    for root, _, files in os.walk(directory):
        for file in files:
            file_path = os.path.join(root, file)
            if is_text_file(file_path):
                try:
                    with open(file_path, 'r', encoding='utf-8') as f:
                        text = f.read()
                        if include_pattern.search(text) and not any(pattern.search(text) for pattern in exclude_patterns):
                        results[file_path] = len(re.findall(include_pattern, text))
                except (UnicodeDecodeError, PermissionError):
                    pass
                for file, count in results.items():
                    print(f"\nFile: {file}")
                    print(f"  '{include_term}' found {count} times")
                    include_term = input("Enter the word or phrase to search for: ")
                    exclude_terms = []
                    exclude_term = input("Enter the word or phrase to exclude: ")
                    exclude_terms.append(exclude_term)
                    add_more = input("Would you like to add more words or phrases to ignore? (yes/no): ").strip().lower()
            if add_more == 'yes':
                try:
                    num_exclusions = int(input("How many more words or phrases would you like to exclude? "))
                for _ in range(num_exclusions):
                    additional_term = input("Enter a word or phrase to exclude: ")
                    exclude_terms.append(additional_term)
                except ValueError:
                    print("Invalid input. Please enter a number.")
                    
directory = os.getcwd()

search_files(directory, include_term, exclude_terms)```
A little python script I quickly made. No docs but here's a rundown of how it works. 1. run python3 search.py (or whatever you name it) in your terminal (make sure that it's in the directory where all the mods you're testing are in.) 2. input the keyword (or really whatever you're trying to find) 3. input what to ignore. 4. type yes or no depending on if you need to ignore more (in this case you'll want yes to allow you to add more options to avoid an fp (or multiple)) 5. Then input the number of extra keywords to ignore. 6. Fill in all the extras then the script should run. In the end it should tell you all the occurences of the keyword, and what file has it. Hope this helps. @AliasAlreadyTaken pinging you since this is somewhat of a more important matter since 5.9.0 users and above can't see particles, but might get their chat spammed with warnings. ```import os import re from collections import defaultdict def is_text_file(filepath): blacklisted_extensions = ('.png', '.jpg', '.jpeg') if filepath.lower().endswith(blacklisted_extensions): return False return True def search_files(directory, include_term, exclude_terms): results = defaultdict(int) include_pattern = re.compile(re.escape(include_term), re.IGNORECASE) exclude_patterns = [re.compile(re.escape(term), re.IGNORECASE) for term in exclude_terms] for root, _, files in os.walk(directory): for file in files: file_path = os.path.join(root, file) if is_text_file(file_path): try: with open(file_path, 'r', encoding='utf-8') as f: text = f.read() if include_pattern.search(text) and not any(pattern.search(text) for pattern in exclude_patterns): results[file_path] = len(re.findall(include_pattern, text)) except (UnicodeDecodeError, PermissionError): pass for file, count in results.items(): print(f"\nFile: {file}") print(f" '{include_term}' found {count} times") include_term = input("Enter the word or phrase to search for: ") exclude_terms = [] exclude_term = input("Enter the word or phrase to exclude: ") exclude_terms.append(exclude_term) add_more = input("Would you like to add more words or phrases to ignore? (yes/no): ").strip().lower() if add_more == 'yes': try: num_exclusions = int(input("How many more words or phrases would you like to exclude? ")) for _ in range(num_exclusions): additional_term = input("Enter a word or phrase to exclude: ") exclude_terms.append(additional_term) except ValueError: print("Invalid input. Please enter a number.") directory = os.getcwd() search_files(directory, include_term, exclude_terms)```
AliasAlreadyTaken added this to the Alias@work project 2024-10-29 05:52:51 +01:00
Member

re: DragonWrangler's code:
As far as I can see, this is a grep reimplementation...

Do we know exact change that caused these messages to appear?
Any specific issue or commit from MT's repo?

Blame'ing the error message leads nowhere. I don't really want to bisect the error appearance...

re: DragonWrangler's code: As far as I can see, this is a `grep` reimplementation... Do we know exact change that caused these messages to appear? Any specific issue or commit from MT's repo? Blame'ing the error message leads nowhere. I don't really want to bisect the error appearance...

@whosit

re: DragonWrangler's code:
As far as I can see, this is a grep reimplementation...

I always forget about the existance of grep, however the python script is probably simpler to use in this case.

Do we know exact change that caused these messages to appear?
Any specific issue or commit from MT's repo?

https://github.com/minetest/minetest/pull/14308

@whosit > re: DragonWrangler's code: > As far as I can see, this is a `grep` reimplementation... I always forget about the existance of `grep`, however the python script is probably simpler to use in this case. > Do we know exact change that caused these messages to appear? > Any specific issue or commit from MT's repo? https://github.com/minetest/minetest/pull/14308
Member

I've tried this:
grep . -rn -e '[^.][^.][ ]*"\^\[color' --exclude '*.py' --exclude '*.png'

Only nether stuff seems to have this pattern:

./mobs_redo/api.lua:3676:		damage_texture_modifier = def.damage_texture_modifier or "^[colorize:#c9900070",
./mobs_redo/api.txt:73:                   or default when enabled is "^[colorize:#c9900070".
./nether/nodes.lua:614:		texture = "^[colorize:#A00:255",
./nether/nodes.lua:618:	lava_particlespawn_def.texture = "^[colorize:#FB0:255"
./nether/nodes.lua:820:				texture = "^[colorize:#A00:255",
./nether/nodes.lua:824:			embers_particlespawn_def.texture = "^[colorize:#A50:255"
./unifieddyes/airbrush.lua:172:	local colorize = minetest.formspec_escape("^[colorize:#"..hexcolor..":255")

NPCs trigger similar error, but there's no similar patterns in code. Maybe it's some old NPCs with incorrectly defined textures? I'm not sure.

I've tried this: ```grep . -rn -e '[^.][^.][ ]*"\^\[color' --exclude '*.py' --exclude '*.png'``` Only nether stuff seems to have this pattern: ```bash ./mobs_redo/api.lua:3676: damage_texture_modifier = def.damage_texture_modifier or "^[colorize:#c9900070", ./mobs_redo/api.txt:73: or default when enabled is "^[colorize:#c9900070". ./nether/nodes.lua:614: texture = "^[colorize:#A00:255", ./nether/nodes.lua:618: lava_particlespawn_def.texture = "^[colorize:#FB0:255" ./nether/nodes.lua:820: texture = "^[colorize:#A00:255", ./nether/nodes.lua:824: embers_particlespawn_def.texture = "^[colorize:#A50:255" ./unifieddyes/airbrush.lua:172: local colorize = minetest.formspec_escape("^[colorize:#"..hexcolor..":255") ``` NPCs trigger similar error, but there's no similar patterns in code. Maybe it's some old NPCs with incorrectly defined textures? I'm not sure.
Member

upstream's master has already implemented a fix for this.

but our yl_stable branch is several commits behind. There is just one commit where I'm not exactly sure whether we want it on yl bc. it registers 4? new nodes (I believe each xpane needs 2 nodes...) (nodes.lua @ 957fdc887b)

IMO these 4 nodes should not be a problem (and the pane looks quite cool :-)

upstream's master has already implemented a fix for this. but our yl_stable branch is several commits behind. There is just one commit where I'm not exactly sure whether we want it on yl bc. it registers 4? new nodes (I believe each xpane needs 2 nodes...) (nodes.lua @ https://gitea.your-land.de/your-land/nether/commit/957fdc887b81bc802ed6a3000e75c07c355e5618) IMO these 4 nodes should not be a problem (and the pane looks quite cool :-)
tour added the
4. step/want approval
label 2025-07-10 21:48:47 +02:00

The problem with the nether is that I'd like to upgrade to the new nether, but that requires us to drop the old nether.

Until this problem is solved we can't upgrade OR we'd have to cut out the mapgen for the new nether.

The problem with the nether is that I'd like to upgrade to the new nether, but that requires us to drop the old nether. Until this problem is solved we can't upgrade OR we'd have to cut out the mapgen for the new nether.
Member

OK, so no automatic updates.
yl_stable looks like a big mess already (many manual merges). So I simply cherry-picked some bugfix-commits.

OK, so no automatic updates. yl_stable looks like a big mess already (many manual merges). So I simply cherry-picked some bugfix-commits.
tour added
4. step/ready to QA test
and removed
4. step/want approval
labels 2025-07-25 23:05:19 +02:00
AliasAlreadyTaken added this to the Next milestone 2025-07-25 23:13:37 +02:00
AliasAlreadyTaken removed this from the Alias@work project 2025-07-25 23:13:40 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#7410
No description provided.