ShaderEditor icon indicating copy to clipboard operation
ShaderEditor copied to clipboard

Bug: sampler2D reference to non-existent images

Open fekga opened this issue 4 years ago • 3 comments

I downloaded a PBR texturepack with albedo, metalness and roughness textures and added them as samplers to the app. They remained in the Download folder so probably something happened to them and they were deleted/moved. However their reference in the app still remained but I can't remove or use them. When I want to edit them the uniform/texture window closes and returns to the editor part. When I'm using them in a shader and run them, the whole app closes without any error message. A temporary solution would be to be able to remove the samplers without going to their edit windows.

fekga avatar Jul 19 '21 10:07 fekga

Try export your shader and clear the app data, after that you can import the shader back into the editor.

arbyanmukmin avatar Jul 19 '21 20:07 arbyanmukmin

Sorry for the inconvenience - I suppose the images were simply too big 😬 Because moving files after importing shouldn't matter because the images are saved as BLOBs in the SQLite database.

The reason why the app is crashing as soon as you load them back from the SQLite database may then be an OutOfMemory exception 🤔

Unfortunately, there's no other way than to clear the app data to remove the defunkt samplers as @playbyan1453 wrote 😬

But if you want to rescue the rest of your data, you could export the whole SQLite database (Settings > Export database), remove the samplers manually (e.g. DELETE FROM textures WHERE name = 'foo';), clear the app data and import the database back. Quite an effort, I know. Sorry about that.

markusfisch avatar Jul 22 '21 21:07 markusfisch

That's alright, but now I have the issue of cleaning the database and reimporting it. It shows me that there is an error and the message is this: %1$s

I used python's sqlite3 package to delete the textures from the database, maybe it messed something up.

fekga avatar Jul 22 '21 22:07 fekga