Page MenuHome

File Browser Crash while listing big folders in preview mode (fonts, images...).
Closed, ResolvedPublic

Description

System Information
Windows 10
Nvidia GeForce GT 750M with latest drivers version 10.18.13.5362
I am using CPU for Cycles renders.
750 GB Hard Drive
16 GB of RAM

Blender Version
Broken: Blender 2.76 RC1 and RC2 e24ea81 2015-09-23 14:02
Worked: Blender 2.75a c27589e 2015-07-07 14:56

Short description of error
I am a chinese blender user, and I downloaded Blender 2.76 RC2 yesterday. When I try to modify the interface font in the User Preferences window, I open the file browser and navigate to the system fonts folder with the thumbnails option enabled. Then I scroll down to find the font, but suddenly Blender crashed.

I tried to add a new text object, and modify the fonts with the file browser, the same issue(Blender crashed) happened again.

My system font folder has 745 font files with 623MB disk space.
I tried to creat a font folder with161 font files and 368MB disk space, and then tested the file browser in preview mode, Blender did not crashed again.

It appears that there is a limit to the number of files that the Blender file browser can handle in preview mode. I did not experience this problem with Blender versions 2.75a and earlier.

Exact steps for others to reproduce the error

  1. Open with Blender 2.76 RC1 or RC2;
  2. Creat a simple text object or enter the User Preferences window, and click the open button to modify the fonts.
  3. Navigate to system fonts folder(745 font files with 623MB disk space) and scroll down to find proper font.
  4. Blender crashes when I have not scrolled down to the end of the folder.

Perform the same steps with a folder with161 font files and 368MB disk space, and it loads the file without any problem.

Event Timeline

zdy (NGENNGT) raised the priority of this task from to Needs Triage by Developer.
zdy (NGENNGT) updated the task description. (Show Details)
zdy (NGENNGT) added a project: BF Blender.
zdy (NGENNGT) set Type to Bug.
zdy (NGENNGT) added a subscriber: zdy (NGENNGT).

I found the same problem with font preview, just sometimes will happen, although the thumbnail have generated done, but when I drag the bar up or down to view font, sometimes will crash. I'm think the thumbnail preview in blender 2.76 not stable. something like T46291

Bastien Montagne (mont29) lowered the priority of this task from Needs Triage by Developer to Needs Information from User.Sep 28 2015, 8:34 AM

Yes, sounds pretty similar to T46291… I’m tempted to merge them, but can you please first try and see whether issue happens with Blender launched with -t 1 command line option?

Thing is, here on linux I used new browser with a dir with thousands of images, without issues. Also, both reports are on win10, if someone could try and reproduce those on other OS (at least another win version) it would be nice too.

Note that preview generation is now done only over a small subset of listed entries, in big directories (the visible ones plus a “margin” before and after them), while in previous system it was generating all previews at once… This is lighter and quicker, but somewhat more complicated codewise.

@Bastien Montagne (mont29) I have test many times, it's looks the crash only happened in normal model, and never with -t 1. the system is windows 7 sp1 64bit, e5300 2.6ghz 2g ram. because it's not aways, just crash by sometimes, so the results only as a reference, hope can help you, thanks.

Well, tried to reproduce here on my win7 VBox (virtual machine), with a listing of over 1500 pictures, no crash so far…

Also, other question, does the same issue happen if you list many images, but from several subdirectories (using the new 'multi-level' drop-down list in header)?

Test many and many times, the image preview like font preview, also crashed, and I have test under Multi-level, still happened. it not very frequent, and even let me believe that will not collapse, but it still happened by sometimes. hope more people try that, sorry for my bad English.

Bastien Montagne (mont29) raised the priority of this task from Needs Information from User to Normal.Sep 29 2015, 8:15 AM

OK, thanks for the testings, merged the other report then, since it's probably exact same issue.

Now comes the issue of being able to reproduce it… Will try again later today, but I can only do it on a crappy VM where Blender is slow as Hell (have to use software OpenGL), so not sure I'll ever be able to reproduce. I would expect it to happen under linux too, though, that’s strange… :/

So, was finally able to confirm the issue here (firing Blender with 48 threads!), issue actually lies in our mmap/munmap code for windows, which is not threadsafe. Patch done, but will need to be checked by @Sergey Sharybin (sergey) & @Campbell Barton (campbellbarton) before going to master…

Bastien Montagne (mont29) triaged this task as Confirmed, Medium priority.
Bastien Montagne (mont29) renamed this task from File Browser Crash while listing big font folders in preview mode to File Browser Crash while listing big folders in preview mode (fonts, images...)..Sep 29 2015, 3:39 PM

Glad that you managed to find the issue mont29.
If there is any additional information needed I did some testing and the bug is easily triggered by holding the scrollbar and scrolling fast up and down on a big folder.
Linux worked fine (tested several distributions and blender versions) windows crashed with software opengl too.

I have a > 6000 images folder so I can help with the testing of the fix.

Bug is expected to be fixed, but check with tomorrow's build from our buildbot would be most welcomed. :)