Can't start blender: bad userpref.blend -- what to do?

I haven’t been able to start blender for a few versions. This is on Kubuntu Linux 24.04, GeForce GTX 1060 6GB running 535 drivers (535.183.01).

For 4.0.0, 4.0.2, and 4.1.1 it gave an error that libsycl.so.6 is not available, but fortunately that issue seem to be fixed in 4.2.

Now for 4.2, and any 3.x version as well, blender just hangs on startup. No window, just a hang (no CPU usage.)

I have narrowed it down to something in my userpref.blend file – if I start without that pref file, all versions (except the troubled 4.x versions that can’t find the .so) start up fine.

I can start over with a fresh pref directory, but there is a lot of customization/window layout/addons/etc. that I would like to save if possible. Any tips?

There is no “safe mode” to start blender in, in order to turn off potentially troublesome addons, right?

Starting blender from CLI with -d shows only the argv lines and then it hangs so I ctrl-Z it and kill it:

$ ./blender-4.2.1-linux-x64/blender -d
Switching to fully guarded memory allocator.
Blender 4.2.1 LTS
Build: 2024-08-19 23:32:23 Linux Release
argv[0] = ./blender-4.2.1-linux-x64/blender
argv[1] = -d
^Z
[1]+  Stopped                 ./blender-4.2.1-linux-x64/blender -d
$ kill -9 %1
[1]+  Stopped                 ./blender-4.2.1-linux-x64/blender -d
$
[1]+  Killed                  ./blender-4.2.1-linux-x64/blender -d

…anything else I can do? Thanks!

As you say, its likely due to an addon (that isn’t standard).
Maybe locate all your addition addons and move all their folders outside of Blender. In theory Blender won’t super like it but should still start and just list errors about not being able to load all the addons.
However, all the rest of the preferences should still be good.
Then just slowly put each addon back one at a time and re-start Blender till it doesn’t work. At which point you should know the addon that has an issue.

1 Like

Do a clean blender install, but first move your blender configuration files (in whatever folder is located in Linux, but I don’t mean the program file folder) for backup. After installing add and enable on by one any add-ons you have downloaded/bought, also is better to do a quick check up if all the add-ons are actually updated to work in your current blender version if not then it may not work.

Addons from v3.6 and below shouldn’t run (but some may, I have a few add-ons that run and are outdated but they are simple operators not a complex addon) on blender v4.1 and above, that’s the quickest way to now which is the culprit…

1 Like

Thanks! – no luck. I’m not sure a plugin/add-on is actually the issue:

  • I moved .config/blender/scripts/addons to .config/blender/scripts/xaddons, but the same thing happens: it hangs when I run it.

  • If I make a clean install config directory, so blender is working, and only copy the “bad” userpref.blender over the “good” one (i.e. no addons/scripts/etc installed in the new config directory), it still hangs on startup.

  • Is it fair to say that a config file shouldn’t be able to hang an otherwise fresh install of blender, so maybe this is a reportable bug?

  • any value in installing a version of blender with debug symbols and generating a stack trace while it is hung?

  • any other tricks to try? I tried opening the userpref.blend file with a working install of blender, but no luck there… thought maybe there’d be a way to inspect it or something.

Almost starting to sound like the userpref file is corrupted. You may just have to bite the bullet and re-configure from a clean start.

Shoot, yeah, I was afraid of that. Do you think it’s bugworthy?

Not really, unless you can easily re-create the issue and have it happen almost every time.

Thanks - It is indeed easy to recreate and happens every time, so I filed a bug: https://projects.blender.org/blender/blender/issues/126661

Good’O.

I guess if nothing else, ideally Blender should bug check the preferences file/settings and if indeed it hits an error, then rather then just locking up, it should load, show a pop-up that says: “Error in Preferences file, continuing using default settings”.
Or something like that.

Yeah… some interesting developments in that bug report. Fingers crossed that the wizards get to the bottom of it.

It does seem like Blender is in need of a preferences export/import function, and/or a “safe mode” to be able to start without addons, etc, and/or a way to inspect/alter preferences [edit: without starting blender], since the .blend config file is an undocumented binary format.

Yup, I’m a little surprised that the preferences isn’t actually just a normal text file, like they are with so many other applications.

No doubt there was a ‘Blender reason’ going back many years for why it is like it is, but still…

1 Like

Wait until you find out how all the icons are stored and loaded. Hint: they have a icons.blend file in the executable that has all the icons as meshes that get silently linked into the UI on every load

It’s possible that at least some of that is moving to an SVG file per icon. Since I helped a little to convert/recreate some that were bitmaps to vector SVG.

Tho none of those were all the various little interface icons and the brush asset icons were already done some other way. So all in all, I suspect it will be a mixed mess for a long time into the future. Guess this is what happens with 30 year old software.

1 Like

If I remember correctly, everything was stored in the startup file, including the preferences. The preferences file was later introduces…
They simply used what was already there, without introducing something new for the sake of it.