Project Update Library Fail, Error Source Identification

I fully appreciate the current sate of development of this project. And I’m also learning the in’s and out’s of the application while trying to achieve a real goal. Consequently I cock it up often, on the whole I have identified an rectified the problem. So my current issue is: having identified I had made some errors assigning pins to signals in the library editor and corrected them. I then attempted to run Project, Update Library and received the following error:
* [ERROR] Logic Error
* [ERROR] Failed to update library elements! Probably there were breaking changes in some library elements.

I have seen this often, I have made lots of mistakes, but generally I have worked back through the library and identified and resolved the issue(s). But on this occasion I’m stuck.

What would have been really helpful is if the error message reported the first or last item it identified at fault. Or pointed to a more detailed log file. In fact does it generate a separate log file?

Hm, I’m not sure if there is any useful information being logged. Maybe @ubruhin knows?

If updating library elements fails, and if you know which library element you recently modified, you can try removing that and re-adding it manually.

There is no log file, but when running LibrePCB from the terminal, you should see some messages which might be useful to investigate the problem. But if you are working on Windows, probably you won’t see the logging output since GUI applications can’t write to the terminal on Windows :sob:

Thank you both.

I am running under Windoze, but I did eventually fix my problem. I removed each device I had changed from the schematic in turn, running the Library Update in between, then re-inserted device and re-routed the pcb. Fortunately that only involved two devices.

Could a more detailed log option be a useful improvement request? Accessed by clicking on a link in the current report.

Regards All.

OK, perfect! :+1:

I just saw in the code that actually the second to last line should contain the detailed error message. But unfortunately in your case, this was just “Logic Error”. Seems that you got an error case which did not contain an informative message. But without knowing which error it was exactly, it’s almost impossible to fix this :frowning: I suspect the only solution would be to run into the same problem with a debug build of LibrePCB since then each LogicError also logs the exact line of code where the error was raised. Release builds do not contain this information…

Ok. I run in to this skimpy error message practally all the time. So If I come up with a test project that exhibits the issue would that help?


Yes, probably that would help. But still, much more important is actually to not make breaking changes in library elements after they have been added to a project :wink: Or in other words, if one ignores the big yellow warning popup in the library editor, it’s the user’s responsibility to accept the consequences :slight_smile: It is expected behavior that after doing breaking changes, the project library updater will fail.

I have now recreated the issue using my library elements.

My library has a 64 DIN 41612 connector. The problem occurred when creating the “Devices” element. “Package Pin” 23a was wrongly assigned to 19a and not 23a.

I created the circuit then placed and routed the board. (Its obvious on the simple test case there is an issue but easily missed on a real example.) I also ran “Library Update” to check that no error was reported.

The “Devices” element was corrected and “Library Update” executed. The [ERROR] … now recreated.

To resolve the problem

  • delete the connector from the board and circuit,
  • run Library Update run,
  • re-insert the connector in the circuit diagram and re-place the device on the board.
  • All is now well.

In recreating the problem I think I identified how it may have occurred. When editing the Devices pin assignments: click on a pin and then scroll the mouse wheel through the available pins (don’t click again and use the pop-up list). However I found my self trying to scroll the assignment list using the mouse wheel. Is there a UI problem here?

I’m using windows 10 20H2. Hardware specs available on request.
If you what my library and project how should I submit them? I could try Gitt but I’m not familiar with it.

Thanks for the explanation how to trigger this error, I was able to reproduce it!

I implemented much more expressive error messages in cases like this, so with the next LibrePCB release it should be easy to determine which library element caused the breaking change :slight_smile:

This is actually intended behavior. For devices with only a few pins, one can assign the pads to signals much faster with the mouse wheel instead of opening the popup for each signal…

I thought it was intentional. However could I request a improvement. Add a option switch that allows it to be disabled please.