Jump to content

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


TheGreyGhost

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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;

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

 

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

Link to comment
Share on other sites

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



×
×
  • Create New...

Important Information

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