Page MenuHome

Blender DELETES all data on photoshop files upon viewing folder, making it 0kb
Closed, ArchivedPublic


System Information
Operating system: Ubuntu mate, both 18.10 and 18.04 64 bits, Ryzen 7 2700x
Graphics card: Radeon fury nano

Blender Version
Broken: 2.79b official from distro

Short description of error
When I simply access a folder that contains a photoshop file, at least in thumbnail mode, as well as trying to open the file for viewing or using it as a texture, Blender turn the file in a ZERO kb file, essentially deleting it. Luckily I haven't been keeping my original file on the working folder but at one point this will be catastrophic and I'll lose an original file.

Exact steps for others to reproduce the error
Simply open Blender, go to file browser (maybe change it to thumbnails), and access a folder on systems like mine that contains a photoshop file. This doesn't seem to happen on windows. All photoshop files on that folder will be zeroed out and it's unrecoverable, nor there is any message.

I have tested this on many photoshop files (not intentionally, I always just forget that there's this huge bug and to make sure any folder I'm viewing doesn't have a photoshop file). All of them became zero kb and I had to find the source to recover.

I'm not sure why I haven't seen people complaining about it but this is pretty major.



Event Timeline

Cannot reproduce on Mac.

But if this is true on Linux, that is a serious bug.

I cannot reproduce it here either (elementaryOS 0.4.1, based on Ubuntu 16.04, GTX1080). I can open and view PSD files just fine.

I added that it's Ubuntu mate. It has been happening for weeks but only now i decided if was serious enough. It could be something on my system but this absolutely only happens with Blender

I cannot reproduce on Windows 10 either.

Broken: 2.79b official from distro

that is the 2.79 from your linux distribution right? can you try a build from ?

Jacques Lucke (JacquesLucke) triaged this task as Needs Information from User priority.

@guismo faiad (guismo), can you upload one of the photoshop files, please?

I'm sending the photoshop files, the 0kb that Blender tried to view, the original and a tga of what's supposed to look like.

I tested further and it's not enough to browse, you have to use thumbnail or view. It's when Blender tries to access the content of the file that it deletes it.

I also tested on another computer with ubuntu mate, not downloaded from the distro, and it did not happen. I'll test on my computer (it's taking ages to download) and do further tests. I'll also download from the distro on the other computer and see if it happens as well.

Initially I thought it could be because I'm using syncthing, but it happens with folders not touched by syncthing as well.

Tested on downloaded blender with date 2018-03-22 14:10

It did not happen. Although it couldn't see all thumbnails, it can open and not corrupt them.

Tested on another ubuntu mate 18.10 with distro downloaded Blender, and it corrupted the files.

Sorry guys, I guess this is a huge mess up from the Ubuntu mantainers or something then? I'll try to file a bug there, although I'm not familiar.

I guess maybe there could be a warning if blender knows it's not official from the website? I don't know... I hope they will do something urgently

Sorry, my systems are actually 18.04.2
But I'm pretty sure it was happening on 18.10 because I just recently downgraded (precisely hoping to fix issues like this and get AMD opencl, all failed)

Jacques Lucke (JacquesLucke) raised the priority of this task from Needs Information from User to Needs Triage by Developer.Mar 28 2019, 10:33 PM

@Jacques Lucke (JacquesLucke) i'm not sure what there is for us to triage, the distro build eats files for breakfast, our builds are fine?

Yeah, this sounds like something that is up to the package maintainers to fix.

I sent a bug report both to ubuntu and ubuntu mate but I haven't heard anything back yet.

Ok, let us know how it goes.

Brecht Van Lommel (brecht) triaged this task as Confirmed, High priority.

I believe @Matteo F. Vescovi (mfv) is the maintainer of this package.

This is a really bad bug, deleting data by just viewing it. I can confirm it with the Ubuntu package but not the official 2.79b release. Even if it's not necessarily our fault (but it definitely could be), I think we should look into this.

In the patches that Debian applies, I couldn't find anything that would affect this.

PSD is the only file format we read through OpenImageIO for file browsers previews. So this may be a bug in OIIO or how we integrate it.

@Matteo F. Vescovi (mfv) there is a bug in your OpenJPEG patch that is causing this. It is not there in the Blender repository. It can be fixed like this:

--- jp2.c	2019-03-29 14:28:35.000000000 +0100
+++ jp2.c	2019-03-29 18:36:28.619342016 +0100
@@ -332,7 +332,7 @@
 	FILE *p_file = NULL;
 	unsigned char mem[JP2_FILEHEADER_SIZE];
-	opj_stream_t *stream = opj_stream_create_from_file(filepath, OPJ_J2K_STREAM_CHUNK_SIZE, false, &p_file);
+	opj_stream_t *stream = opj_stream_create_from_file(filepath, OPJ_J2K_STREAM_CHUNK_SIZE, true, &p_file);
 	if (stream) {
 		return NULL;

I know this is not the place, but thank you Brecht! And thanks for everyone doing the heavy work of maintaining old code. I owe my living to you and I hope you are well paid!
It's nice seeing how quickly this was handled. Until the maintainer fixes it, should more people be made aware of this, for instance, posting on blendernation to make sure someone doesn't loose an essential file or entire folders?

Brecht Van Lommel (brecht) claimed this task.

Closing in favor of the Debian bug, there's nothing we can do on our side.

Hi @Brecht Van Lommel (brecht)!

Sorry for the belated reply. Notifications were disabled, so I have seen nothing until the bug report on Debian BTS.

The Debian package (as in -7 Debian revision) is now fixed. Ubuntu packages should be updated by their respective maintainers.

Hi all!

Fixes for Ubuntu are on their way to get reviewed/accepted via SRU.