New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Texture names with spaces should be quoted #3951
Comments
Please attach the map file that provokes the error. |
Hi, kduske. I could email you the file, but after more testing I was able to create a minified test case file that throws the same error. I eventually figured out that if I replaced all of the "Walls15" textures in the problem map file then the issues goes away. Download ZIP: https://drive.google.com/file/d/1JboJatPK76fcP5i6EPJTjNB1hcP6sByW/view?usp=sharing
The image texture in question is actually named "Maintenance Walls15.png", not "Walls15". I looked at the image file and it appears to be just like all my other textures. I can open it in Photoshop; the files appears to be in good condition. Try to open the map file from the zip and see what happens. I can't open it. I have NO idea why TrenchBroom does not like these image files. |
The texture name contains a space. TB cannot handle texture names that contain spaces because it doesn't know where the texture name ends, so they must be enclosed in quotation marks. TB adds quotation marks to texture names when necessary while saving, so either there is a bug with that logic, or this file was somehow changed outside of TB. |
Oh geeze . . . yep that seems to be the problem - spaces in texture filenames. Coincidentally, I just hadn't used a texture with a space in its filename yet, up until this point. My texture library for this project has a mixtures of files with and without spaces. (I'll definitely be removing all spaces from textures I'm given to use in the future. Thanks for your speedy help!) |
I have a large MAP file created with TrenchBroom that TrenchBroom can no longer open. Instead, I get an error message.
Fortunately an autosave backup prevented significant progress loss but it's the second time in 24 hours this has happened, while working on the same file. It seems likely that continuing to work in the same file will just lead it to it happening again so my plan is to manually split up the map into multiple map files. Inconvenient, but apparently necessary.
The second time it happened, I expected it because I could no longer paste a copy of a brush. So, it seems like some program functions become impaired when this problem happens. Once I could no longer paste, I tried re-opening the file and sure enough, I got the error message.
If someone intends to investigate the issue and wants a copy of the file for testing, let me know. I don't want to share it publicly.
System Information
TrenchBroom V2021.1 on Windows 10
Expected Behavior
File opens as per usual.
Steps to Reproduce
Attempt to open said file.
This error will appear:
I believe "Walls15" is part of a texture filename. Could this just be a simple to solve syntax error type of thing?
Crash Info
No crash occurs. Only an error message (see above screenshot) when trying to open a problem file.
Before closing the problem file, I checked the console tab - here are the last lines:
And while I still have the problem file open, and I try to copy/paste brushes from it into a new fresh map file (because once I close it, I cannot open it again), nothing happens. No brushes get pasted. But this appears in the console:
The text was updated successfully, but these errors were encountered: