[Fixed for V0.45] Path character limit for imported graphics
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Parallax
- DMwiki contributor
- Posts: 424
- Joined: Mon Aug 28, 2006 7:56 pm
- Location: Back in New Jersey
[Fixed for V0.45] Path character limit for imported graphics
When importing new graphics (and sounds, possibly) in the RTC editor, the importing will fail if the path (including the new file name) is longer than 36 characters. No error message, nothing, it just goes back to the new bitmap window without filling out the proper field. It took me a while figuring out what was happening. At first I thought it was a problem with the file format, but no, it's the path length.
I don't know how easy it would be to raise the character limit to something sensible, like 256 characters, or something, but would it be possible to have at least a 'path too long' error implemented so the user knows why his files are being turned down?
I don't know how easy it would be to raise the character limit to something sensible, like 256 characters, or something, but would it be possible to have at least a 'path too long' error implemented so the user knows why his files are being turned down?
Are you one of those people who have tons of unnecessary folders lying around everywhere, so a path could look something like C:\Program Files\Return To Chaos\Bits & Bobs\New Folder\Images\New Images For Dungeon\Beta Versions Of Images Ready For New Dungeon\image.jpg?
Nevertheless, I understand that not everyone has their computers cleaned up with a simplified filing system so if this bug is a case of what Parallax is saying... maybe an increase in characters wouldn't hurt.
Nevertheless, I understand that not everyone has their computers cleaned up with a simplified filing system so if this bug is a case of what Parallax is saying... maybe an increase in characters wouldn't hurt.
- Parallax
- DMwiki contributor
- Posts: 424
- Joined: Mon Aug 28, 2006 7:56 pm
- Location: Back in New Jersey
Actually, the graphics that gave me trouble did not have the ADGE-genrerated, insanely long file name. But something as simple as (from the RTC directory) Artwork\ConfluxIII\Wallitems\rogue_f.png, case in point, fails to load properly. I'm not even asking for a fix if it's inconvenient, just an error message to tell the next person (who might be me, my memory is not so good anymore) what is happening. and why, so they don't waste their time fiddling with the file format.
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
Re: Path character limit for imported graphics
I can't reproduce the crash you're seeing given the instructions above. The path limit in the editor is already 1024 characters; there must be something else going on here.Parallax wrote:When importing new graphics (and sounds, possibly) in the RTC editor, the importing will fail if the path (including the new file name) is longer than 36 characters. No error message, nothing, it just goes back to the new bitmap window without filling out the proper field. It took me a while figuring out what was happening. At first I thought it was a problem with the file format, but no, it's the path length.
I don't know how easy it would be to raise the character limit to something sensible, like 256 characters, or something, but would it be possible to have at least a 'path too long' error implemented so the user knows why his files are being turned down?
What makes you so certain that it's the path limit that's causing you problems? For example, if you simply rename the file that's causing the crash, does it go away?
- Parallax
- DMwiki contributor
- Posts: 424
- Joined: Mon Aug 28, 2006 7:56 pm
- Location: Back in New Jersey
Yes, changing the file name or the directory name can make it work. And the editor doesn't crash, it just doesn't load the file. It returns to its previous window without filling out the grayed field for the path or loading the image, as if I had clicked 'cancel' instead of 'load'.
I still have older RTC versions in their own RTC_0.4x directories. In particular, I started a custom dungeon when .42 was around so I kept custom art in there. Now I'm using 0.44, so I had copied the files I wanted to the 0.44 directory. When loading the graphics stored in the 0.44 directory didn't work I tried loading those in the 0.42 directory, which worked. At that point I started fiddling with the path and the file name in the 0.44 directory and, once I had shortened them enough, was able to load these files as well, which made me think it was something to do with a limit on the path length.
But if it is not the path length then I don't know what it is. And rest assured that all attempts at loading images where made with the RTCEditor from the .44 package.
I still have older RTC versions in their own RTC_0.4x directories. In particular, I started a custom dungeon when .42 was around so I kept custom art in there. Now I'm using 0.44, so I had copied the files I wanted to the 0.44 directory. When loading the graphics stored in the 0.44 directory didn't work I tried loading those in the 0.42 directory, which worked. At that point I started fiddling with the path and the file name in the 0.44 directory and, once I had shortened them enough, was able to load these files as well, which made me think it was something to do with a limit on the path length.
But if it is not the path length then I don't know what it is. And rest assured that all attempts at loading images where made with the RTCEditor from the .44 package.
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact:
Nope - still can't reproduce it. This is what I am doing; can you do the same and get a different result?
- Start the editor up.
- Select "File/New"
- Select "Resources/Add replace graphics"
- Select "Add new bitmap"
- Select "..."
- Select "Modules/abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz.png" (65 characters).
...and the name appears in the name box and the image appears in the image box.
What happens for you (and assuming that the above works, what *else* do you have to do to cause the problem)?
- Start the editor up.
- Select "File/New"
- Select "Resources/Add replace graphics"
- Select "Add new bitmap"
- Select "..."
- Select "Modules/abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz.png" (65 characters).
...and the name appears in the name box and the image appears in the image box.
What happens for you (and assuming that the above works, what *else* do you have to do to cause the problem)?
- Parallax
- DMwiki contributor
- Posts: 424
- Joined: Mon Aug 28, 2006 7:56 pm
- Location: Back in New Jersey
OK, then we have a problem. I've tried it, with your double alphabet name, and the image doesn't load and the name doesn't appear in the box. A copy of the same image, in the same directory, with a short name (rogue_f.png) loads as it should.
I have tried saving like that and changing the name with a text editor (notepad) in the .txt file so that abc... is loaded instead, and it works when I reopen the txt file with RTCeditor. If I change the target image to rogue_f.png it works, and shifting back to abc... doesn't.
I don't know what else to say, if you can't reproduce it maybe there's something wrong on my end, but I am at a loss as to what it could be.
I have tried saving like that and changing the name with a text editor (notepad) in the .txt file so that abc... is loaded instead, and it works when I reopen the txt file with RTCeditor. If I change the target image to rogue_f.png it works, and shifting back to abc... doesn't.
I don't know what else to say, if you can't reproduce it maybe there's something wrong on my end, but I am at a loss as to what it could be.
- George Gilbert
- Dungeon Master
- Posts: 3022
- Joined: Mon Sep 25, 2000 11:04 am
- Location: London, England
- Contact: