Jump to content

Improved error message: Using missing texture, unable to load:


Recommended Posts

Posted

Hi

 

Given the number of people I've seen run foul of the "Using missing texture, unable to load:" problem (including myself), it might be helpful to enhance the error message so that it shows the full path attempted

eg

C:\Documents and Settings\TheGreyGhost\My Documents\IDEAprojects\ForgeCurrent\out\production\TestItemRendering\assets\testitemrendering\textures\items/error.png

 

, or alternatively provides a list of the valid paths.

C:\Documents and Settings\TheGreyGhost\My Documents\IDEAprojects\ForgeCurrent\out\production\TestItemRendering

etc

 

-TGG

Posted

Thats the thing, we dont KNOW the full path attempted, as thats all hidden behind resource packs.

And any resource pack could hold the information.

People just need to know there resource pack structure.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

People just need to know there resource pack structure.

 

Funny.  Figuring it out is actually really freaking difficult.  I remember when I was bumbling around when 1.5.2 came out and no one knew the answer of where textures needed to go (I had one person telling me I had to add my textures to the jar manually).  Took like three days because the error message is so delightfully unspecific (even if entirely accurate).

 

Most of the problems with this error have to do with unMatchingCase, as the path given by the mod is toLowerCase'd but directory names are treated as Their oriGinaL caSe, leading to "WTF, it's exactly the same as what I said in my code!" problems like these.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Casing is always an issue, paths are not lcased anywhere, The main issue is that windows users dont understand that paths should be case sensitive, because they are not in the windows folder structure.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Casing is always an issue, paths are not lcased anywhere, The main issue is that windows users dont understand that paths should be case sensitive, because they are not in the windows folder structure.

 

Except that if I attempt to register a texture using setTextureName("MyMod:someImage.png") and use the same casing when I build my folder structure it will fail.  If I recall correctly, it works in Eclipse, but does not work when compiled and zipped.

 

I don't have a convenient setup at the moment to produce a test case, but I've had the problem and when I tell people to always use lower case, it works.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Hmmm

 

I dug into it a bit further and I agree with you that it would require a bit of base class editing to let you extract the information after a failed attempt. 

 

What do you think -?

 

FallBackResourceManager::
    public Resource getResource(ResourceLocation par1ResourceLocation) throws IOException
{
// snip

                return new SimpleResource(par1ResourceLocation, resourcepack1.getInputStream(par1ResourceLocation), inputstream, this.metadataSerializer);
            }
        }

      String allPathsTried = par1ResourceLocation.toString() + ", tried: ";

      for (int i = this.resourcePacks.size() - 1; i >= 0; --i) {
        ResourcePack resourcepack1 = (ResourcePack)this.resourcePacks.get(i);
        if (resourcepack1 instanceof FMLFolderResourcePack) {
          allPathsTried += ((FMLFolderResourcePack)resourcepack1).getAbsolutePath(par1ResourceLocation) + ";";
        }
      }
        throw new FileNotFoundException(allPathsTried);
        //throw new FileNotFoundException(par1ResourceLocation.toString());
    }
}

FMLFolderResourcePack::
    public String getAbsolutePath(ResourceLocation par1ResourceLocation) {
      String rootAssetsName = String.format("%s/%s/%s", new Object[] {"assets", par1ResourceLocation.getroot(), par1ResourceLocation.getname()});
      return (new File(this.basePath, rootAssetsName)).getAbsolutePath();
    }

TextureMap::
    public void loadTextureAtlas(ResourceManager par1ResourceManager)
    {
// snip
            catch (IOException ioexception)
            {
                Minecraft.getMinecraft().getLogAgent().logSevere("Using missing texture, unable to load: " + ioexception.getMessage());
     }

 

Produces the warning message:

2013-10-27 17:09:29 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: speedytools:textures/items/WandIcon.png, tried: C:\Users\TheGreyGhost\Documents\JavaSources\SpeedyTools\out\production\speedytools\assets\speedytools\textures\items\WandIcon.png;

 

 

Posted
Except that if I attempt to register a texture using setTextureName("MyMod:someImage.png") and use the same casing when I build my folder structure it will fail.  If I recall correctly, it works in Eclipse, but does not work when compiled and zipped.

 

I don't have a convenient setup at the moment to produce a test case, but I've had the problem and when I tell people to always use lower case, it works.

Again, this is typically a modder issue, remember, ZipFiles ARE case sensitive, Windows is not. Also, remember that domains, as a arbitrary decision made by Mojang, are REQUIRED to be lower case. So your issue is probably stemming from the capitol M's.

 

As for gathering a list of tried paths, The better solution would just to print out the root 'paths' of all the resource packs as they are loaded into the debug console. And people can abstract where there folders should be from there. However, part of that issue is that the path your output gives is actually the WRONG path for the development environment. Where you WOULD want to put it is in the SOURCE folder that you have linked in eclipse, and then while compiling, eclipse will copy your assets into the bin folder.

As the bin folder is designed to be transient and you should not manually be putting anything in there at all.

 

Anyways, to help solve Dracos issue, i've fixed a bug in MC that make the log message useless. You now get useful information:

2013-10-27 10:57:21 [WARNING] [Minecraft-Client] ResourcePack: ignored non-lowercase namespace: Forge/ in Z:\Forge\eclipse\Forge\bin

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Hi

 

As for gathering a list of tried paths, The better solution would just to print out the root 'paths' of all the resource packs as they are loaded into the debug console. And people can abstract where there folders should be from there. However, part of that issue is that the path your output gives is actually the WRONG path for the development environment. Where you WOULD want to put it is in the SOURCE folder that you have linked in eclipse, and then while compiling, eclipse will copy your assets into the bin folder.

As the bin folder is designed to be transient and you should not manually be putting anything in there at all.

 

Anyways, to help solve Dracos issue, i've fixed a bug in MC that make the log message useless. You now get useful information:

2013-10-27 10:57:21 [WARNING] [Minecraft-Client] ResourcePack: ignored non-lowercase namespace: Forge/ in Z:\Forge\eclipse\Forge\bin

 

I understand your point, in my case (since I use IntelliJ IDEA) I had to create a macro to do that copying (and I had no end of trouble trying to figure out where to copy it to), so I think your suggestion of printing the root paths as they are created would be helpful.  Also, perhaps the existing error message could be enhanced to print both ResourceLocation and the folder structure, eg

 

2013-10-27 17:09:29 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: speedytools:textures/items/WandIcon.png, (assets\speedytools\textures\items\WandIcon.png);

 

I think your fix for Draco's issue is a good idea.

 

-TGG

 

 

Posted

 

2013-10-27 17:09:29 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: speedytools:textures/items/WandIcon.png, (assets\speedytools\textures\items\WandIcon.png);

That's just redundant data...

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Please read the FAQ and post logs as described there.
    • Upon starting the server I get; [main/ERROR] [minecraft/Main]: Failed to start the minecraft server net.minecraftforge.fml.LoadingFailedException: Loading errors encountered: [     Framework (framework) has failed to load correctly §7java.lang.NoClassDefFoundError: net/minecraft/client/gui/components/toasts/Toast ] I suspect there is a (possibly a few) client-only mods installed on my server. Any help would be appreciated! (Yes I know there are a lot of mods...) Here is the crash log:   https://paste.ee/p/pRz5mhMl#s=0
    • That's basically what the failure does, my apologies for failing to specify.  It just tries again on the next tick until it detects the entities for that chunk are loaded, and then tries to load the entity.  From there it gets into different failure states depending on what goes wrong, but in short, if the entity fails to load once the entity list becomes available, the request is cleared and must be resubmitted by the end user.  There should be few cases where that actually happens. Yes, that is my understanding of forceloading.  That's why on a successful summon, it removes the forceload.  Otherwise it does just leave the chunks loaded long term. Thank you for your help, any knowledge is useful!  I don't often mess with forceloading and my prior experience is 1.16 so I'm also a bit out of my depth haha.
    • I will have to do more research about 1.18 chunk loading. You were unclear about how your code manages with the entity load failure. If you simply used a loop, I suggest submitting a tick task to the next tick which does the same thing, checking if the entities are loaded and if so teleporting the right one else submitting another tick task etc. Also I think forceloading permanently force loads the chunk, and it only starts to unload when you make a subsequent call to mark the chunk as not forceloaded. I may be completely wrong, I dont know much about 1.18, most of my experience is 1.20. Good luck I hope you figure it out after all this time 😅
    • i managed to fix it by reinstalling the modpack and re-add all the extra mods I've had previously.
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.