LibrePCB closes unexpectedly when opening a local library after updating to version 2.0.1

Hello,

After updating LibrePCB to ver 2.0.1, when opening a local library, the whole software closes unexpectedly with no warning.

There was no error message during the installation.

In my local library I created tens of components that I needed for my projects, because most of the components required are not available in any remote library or in the Base Library (that is understandable, it’s difficult to supply a huge range of components).

Fact is I created tens of components in the local library that I cannot access any more.

I lost tens of hours of work to create them.

Suppose hypothetically I would do it again from scratch, what guarantee do I have that it will still work with the future releases of LibrePCB ?

Sorry to say, if a software app is not reliable, it doesn’t have much value for the users.

I already cleared library cache an checked for locks.

During and after the upgrade there was no error message whatsoever.

Please advice what to do, I am waiting for a feedback.

Hi @daniel71,

That is very unfortunate. I totally agree this is not acceptable and we have to figure out what is the problem, so we can fix it. I would appreciate if you can try out a few things, see below. In any way, do not create your elements again, I am sure we can recover your already created elements.

  1. From the “About LibrePCB” sidepanel, could you copy&paste the system information here? There is a “Copy to clipboard” button, just click that and paste the clipboard here.
  2. Can you run LibrePCB from the console, reproduce the crash, and then paste the whole logging output here? Of course you can obfuscate personal information from it. For instructions, see here.
  3. You say that you updated to LibrePCB 2.0.1 – which version did you use before, 2.0.0 or 1.x? If 2.0.0, did the problem not exist there?
  4. Could you try out the current development version from here, and let me know if the problem still exists with that version? (note that if you are using Windows, those nightly builds are not code signed so you need to accept the “unverified publisher” warning)

Hi ubruhin,

Thank you for the quick reply.

  1. Here is the info of the version:
    LibrePCB Version: 2.0.1
    Git Revision: 083755c (2026-02-22)
    Build Author: OSSign CI
    Qt Version: 6.10.1 (built against 6.10.1)
    CPU Architecture: x86_64
    Operating System: Windows 10 Version 22H2
    Platform Plugin: windows
    TLS Library: Secure Channel, Windows 10.0.19045
    OCC Library: OCCT 7.9.1
  2. Here is the log from the console:
    [ INFO ] LibrePCB 2.0.1 (083755c)
    [ INFO ] Qt version: 6.10.1 (compiled against 6.10.1)
    [ INFO ] Resources directory: “C:\Program Files\LibrePCB\share\librepcb”
    [ INFO ] Application settings: “C:\Users\service-daniel\AppData\Roaming\LibrePCB\LibrePCB.ini”
    [ INFO ] Cache directory: “C:\Users\service-daniel\AppData\Local\LibrePCB\LibrePCB\cache”
    [DEBUG-MSG] Network access manager thread started.
    [DEBUG-MSG] Recently used workspace: “C:\Users\service-daniel\LibrePCB-Workspace”
    [ WARNING ] The system’s full username is empty or could not be determined!
    [DEBUG-MSG] Open workspace data directory “C:\Users\service-daniel\LibrePCB-Workspace\data”…
    [DEBUG-MSG] Load workspace settings…
    [DEBUG-MSG] Successfully loaded workspace settings.
    [DEBUG-MSG] Load workspace library database…
    [DEBUG-MSG] Successfully loaded workspace library database.
    [DEBUG-MSG] Successfully opened workspace.
    [DEBUG-MSG] Workspace library scanner thread started.
    [ INFO ] Loaded parts information cache from “C:\Users\service-daniel\AppData\Local\LibrePCB\LibrePCB\cache\parts.lp”.
    [DEBUG-MSG] Cleaned outdated live information about 0 parts.
    [DEBUG-MSG] Opened new window with ID 1.
    [DEBUG-MSG] Start workspace library scan in worker thread…
    [DEBUG-MSG] Discarded 0 cached library elements.
    [DEBUG-MSG] Workspace libraries indexed: 43 libraries in 99 ms.
    [DEBUG-MSG] Request succeeded: https://api.librepcb.org/api/v1/libraries/v2 (from cache)
    [ WARNING ] Override stale lock on directory “C:\Users\service-daniel\LibrePCB-Workspace\data\libraries\local\My_Library.lplib”…
    [DEBUG-MSG] Update library elements tree…

The last line of the log shows that it closed abruptly. Also a .lock file keeps appearing into the local library every time I launch LibrePCB.

  1. Version used before was 1.3.0 (unfortunately).
  2. For now, please understand I am reluctant to try any other version. Is it possible (or a good idea) to revert back to 1.3.0 ?
    The thing is that all the previous projects work (can be opened) with the elements from the local library … that’s strange ! I did not make any save in those projects as the warning suggested (as the save will be irreversible if I open them in older versions of LibrePCB). Maybe something else will fix the issue… Thank you very much for the help.

OK thanks for the information. I do not see anything suspicious in the logs, other than the abrupt exit :frowning:

The thing is that all the previous projects work (can be opened) with the elements from the local library

All the library elements which are used by the projects are automatically copied into the project, so the local library is not needed to make them working. You could even delete your local library and all the project would still be fine.

Is it possible (or a good idea) to revert back to 1.3.0 ?

Yes it is possible. During the upgrade 1.x → 2.0, LibrePCB in fact made a backup of all your libraries. When you open 1.3.0 again. you will still have all the libraries in the state they were before the upgrade. Only modifications you made with 2.x (if any) would be “lost”, respectively they will be only available for 2.x but not for 1.3.

You can see in your workspace folder there is a subfolder named “v1” which is used by LibrePCB 1.3.0, and a folder “data” which is used by the most recent LibrePCB version (i.e. 2.0 in this case). So you can go back to the old version at any time. Only projects which have been migrated to 2.x cannot be reverted.

And if you decide to stay with 1.3.0, I’d highly recommend you to delete the “data” folder. This ensures that it will be re-created (and initialized again with your 1.3.0 libraries) the next time you use LibrePCB 2.x.

For now, please understand I am reluctant to try any other version.

I understand. But I hope you understand it’s almost impossible for us to investigate and fix the problem if we just ignore it (I cannot reproduce it, and nobody else reported it yet – it might be related to your specific setup or libraries). Our nightly builds are also available as a portable *.zip (no installation needed) and as said, they won’t break anything in your 1.3.0 libraries.

OK,

I will try the nightly versions and I will give you a feedback as soon as a have a result.

Thanks again.

1 Like

By the way – if you like, you could also send me your local library (My_Library.lplib as a ZIP file), then I would be happy to check if the problem is related to your library or not, i.e. I would try to reproduce it. If you agree with it, you could upload it either here (if it’s not confidential), or send it to the e-mail listed at Contact | LibrePCB, I will handle it confidentially then.

But I’d recommend to also first check that the problem occurs only with this specific library – not with the remote libraries, and not with e.g. a new, empty local library.

Anyway I appreciate any help as I really don’t accept application crashes so I want to fix this issue.

As promised, I’m coming back with a feedback.
I tried the LibrePCB nightly version and the symptom is the same, when accessing the local library, the software closes unexpectedly with no warning and no error.

I reverted back to version 1.3.0 and the local library works well as it did before.

Problem is that I will get stuck with a version that sooner or later will become obsolete and I will not be able to benefit from the new features and improvements included in the newer versions of LibrePCB software.

You read my mind, I was going to say that I want to send you the “faulty” local library to you to investigate the issue.

I made some checks and I came up with the following conclusions:

  • the symptom in version 2.0.1 does not occur with all local libraries. I have 3 local libraries: the 1st one that triggers the symptom (which has about 10 elements that I’m using in my projects), the 2nd one that it opens normally (it has just 1 element in the library) and the 3rd is an empty local library that I’m using to copy back and forth packages and symbols from another libraries (it opens normally in ver 2.0.1 as well).
  • all local libraries were created in ver 1.3.0. All the elements in the libraries are created modifying already created symbols and packagers of elements already existing in LibrePCB Base
  • I cannot make a 100% claim that the created local libraries are flawless, but they work with no errors in all the projects that I have created
  • I think the symptom is related to something wrong or abnormal in this local library that does not manifest as an error in ver 1.3.0
  • the remote libraries work properly

Please see attached the local folder (generated in ver 1.3.0). The faulty library is located in the “My_Library.lplib” folder.

Hope this will help to solve the issue.

local.zip (119.6 KB)

Thanks a lot! I can reproduce it and found the issue.

The problem is that the component category “Phase Control IC” has its parent category set to itself. In LibrePCB 1.x we handled this fault properly, but apparently in LibrePCB 2.0 I forgot a case, which now ends up in an endless recursion.

Of course this should not happen, I will fix that tomorrow so the next release will be fine again. Now you have two options:

  • Wait for tomorrow until I fixed it, then you can open your library with the nightly build.
  • Fix the file manually, then you can open it with the stable 2.0.1 release. To fix it, replace My_Library.lplib/cmpcat/d5e66c31-48ca-49ac-a812-5a075bccdb33/component_category.lp with the file in this zip. This moves the component category to the root, so you need to assign the desired parent category afterwards. Important: Before opening the (fixed) library in LibrePCB, wait for the background library rescan to complete.

EDIT: Actually you have a third option:

  • Assign the proper parent category with LibrePCB 1.x. Then you can delete the “data” folder and open LibrePCB 2.0 again, which will then do the migration of your 1.x libraries again, and the recursion doesn’t exist anymore.

Alright, I fixed the issue in #1737 and you should now be able to open the library with the nightly builds.

Thank you very much for support.

I am glad that the issue was solved.

1 Like