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?
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
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.
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 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…
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 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 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
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…
this is an old thread but I’m still having difficulty in v1.2 identifying components at fault when the library fails to update.
I am often building my library as I need to as I make a board. Making the board teaches me what components I need to make or modify for the library.
So I’m updating the project library often. When it fails it’s my fault, but it’s very easy to make a change that breaks stuff without intending or realising that, and very hard to find the cause when it happens. When this fails it’s Really Annoying and the error dialog really does very little to help fix the problem.
I have the following suggestions if they aren’t too much work:
Make the text in the error window copyable so I can copy the UUID of the problem part or whatever other info I need to search for. (I’m on mac, maybe it is copyable on other systems?)
give the schematic reference or some other identifier for the problem part that is more comprehensible than a UUID. for example if it had said the problem is first found in R3 symbol variant 1 it would have saved me at least an hour.
i found the problem part, but it took some time, since the only identifier is the UUID and that isn’t copyable and it only existed as a ref in the schematic.
type “variant” wasn’t that helpful as many parts have variants
in this case it was unfixable, but in other cases it is fixable and I just need a comprehensible pointer to where I slipped up in editing the library.
Yeah to be honest, the error messages are not intended to be read by users, often they are coming from some very low-level part of LibrePCB which don’t have more context about the error case. Basically we just print these low-level errors because it’s still better than nothing.
In addition, actually you should never get these errors. They mean you made a breaking change in a library. But the library editor tells you with a big warning whenever you are about making a breaking change so you have the chance to avoid it (e.g. you should duplicate and delete the old component instead of making changes to an already used component). It’s way easier to avoid breaking changes than fixing them later in projects (even if the error message was more descriptive).
Anyway, I agree it would still be nice to improve the messages and make them copyable. It’s just something with very low priority