Latest nightly build not plotting text in schematic symbols

Bug #1827124 reported by Ron Burkey
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
Medium
jean-pierre charras

Bug Description

Here are links to two image files created from almost identical schematics (an extra text string has been added to one of them, so they're not _quite_ the same). They were made by using eeschema's 'plot' function, thus creating postscript, and then reprocessing the postscript into PNG form.

With the current nightly build: https://drive.google.com/open?id=1jYRl9Hxwm1EiVdcINAgNm0YZMJbfpbrq

With an earlier build (probably from a few months ago): http://www.ibiblio.org/apollo/KiCad/2005273A/2005273A-p1of2.png

You'll see that in the older build there are lots of oval shapes with numbers inside them.
 In the current build, all of the numbers inside the oval shapes have disappeared. The number is simply a text string that has explicitly been placed inside the schematic symbol within the symbol editor.

Here's a link to the design files: https://github.com/virtualagc/virtualagc/tree/schematics/Schematics/2005273A

In the design files, I think you should be able to see the oval shape symbols within the file module-cache.lib. (The particular symbols are called ConnectorA1-100 and ConnectorA1-200, each of which is a multipart symbol with 71 different parts. The text strings in the center of the ovals are "101", "102", etc. for ConnectorA1-100 parts A, B, etc., and "201", "202", etc. for ConnectorA1-200 parts A, B, etc.)

Application: kicad
Version: 5.1.0-unknown-c054944~86~ubuntu16.04.1, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.11 libidn/1.32 librtmp/2.3
Platform: Linux 4.4.0-53-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.58.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.47.0
    Compiler: GCC 5.4.0 with C++ ABI 1009

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Tags: eeschema
Changed in kicad:
milestone: none → 6.0.0-rc1
Revision history for this message
Jeff Young (jeyjey) wrote :

@Ron, are you still seeing this?

I created a new schematic with your module_cache.lib and dropped in a couple of ovals. I plotted to Postscript, and then opened it on my Mac. That runs some Apple program to convert to PDF and then displays it in Preview. The numbers appear within the ovals.

Revision history for this message
Ron Burkey (rburkey) wrote :

Unfortunately, yes.

I just now tried it with 6.0.0-6180687, then upgraded to 6.0.0-da645c5 and saw the exact same problem both times. I additionally tried the current schematic I'm working on now; same thing. I keep an old copy around (5.1.0-ca7aec2) solely for the purpose of making these plots, because it works fine with both of those schematics.

Application: KiCad
Version: 6.0.0-unknown-da645c5~86~ubuntu16.04.1, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.11 libidn/1.32 librtmp/2.3
Platform: Linux 4.4.0-53-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.58.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.47.0
    Compiler: GCC 5.4.0 with C++ ABI 1009

Build settings:
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
Ron Burkey (rburkey) wrote :

I hadn't really thought of it before, but my Linux desktop directly displays Postscript, and the numbers are missing when I view the Postscript directly as well. I've uploaded the Postscript to Google Drive (https://drive.google.com/open?id=1tUznqVwxbHedad7eUqJmZg1wkAXO8FDQ) but the numbers are even missing in the Google Drive viewer.

Revision history for this message
Jeff Young (jeyjey) wrote :

@Ron, when I fetched the module_cache.lib file from your GIT repo the schematic I got with it was empty. Did I fluff it up, or is the schematic in your screen-shots different?

Would it be possible to post a .zip containing the project exactly as it displays the bug?

(Or you can email it to me at <email address hidden>.)

Revision history for this message
Ron Burkey (rburkey) wrote :

Well, that's definitely a curiosity, Jeff, since that's not what I see in the repo. Nevertheless, here's a zipfile of precisely the folder on my local computer that I used this afternoon to perform the test: https://drive.google.com/open?id=1bwzyHz5aIeojOAGWcx4pj35w82VnBmgc

Revision history for this message
Jeff Young (jeyjey) wrote :

When I open p1of2 I don't get a rescue dialog, and since the zip doesn't include the libraries I just get a bunch of squares with "??" in them.

When I open p2of2, I /do/ get a rescue dialog, and after that nice little ovals with numbers which plot fine (to PDF anyway; I've nothing to render PS with).

Does it fail for both schematics for you, or only one?

FWIW, p1of2's ovals reference things like "AGC_DSKY:ConnectorA1-100" while p2of2's reference "ConnectorA1-300-AGC_DSKY". If I map one of p1of2's connectors to the rescue library then it plots correctly (again, to PDF).

Revision history for this message
Ron Burkey (rburkey) wrote :

I probably should have explained better, sorry! There's only one cache file (module.cache.lib), so you have to open the top-level drawing (module.sch) and navigate to the individual sheets from there. If you open the p1of2 and p2of2 sheets directly rather than indirectly through module.lib, they'll have no cache files and won't be able to find the original libraries either.

(In my setup, all of the standard *.lib files are discarded, and the *.lib files AGC_DSKY.lib and D3NOR*.lib are used instead. They are in the root directory of the zipfile. But if you open module.sch, that shouldn't matter.)

I have no problems opening any of the files, using either the current 6.0 nightly or the last 5.1 nightly I can rely on to plot properly (ca7aec2). But of course, my setup has the proper libraries, so I can open the p1of2 and p2of2 files directly if I want.

By the way, I dimly remember that the p1of2 and p2of2 files may become corrupted by the exercise of opening them without the proper library setup, even if they aren't explicitly resaved, so it may be necessary to discard them completely and reexpand the zipfile.

I only plot to ps, so I haven't tried plotting to pdf for a while, but I've attached a plot to pdf from the latest 6.0 nightly build, and it's doing exactly what I described.

Revision history for this message
Jeff Young (jeyjey) wrote :

Well, rats. Opening the top-level project works fine, but the bug doesn't reproduce.

Revision history for this message
Jeff Young (jeyjey) wrote :

@Devs, could someone on GTK test this:

1) download zip in comment #5
2) open module.pro
3) plot to PDF (note that the PDF will be written into temp as a sibling of the project folder)
4) see if there are numbers in the ovals (like my PDF in #8, and not like Ron's PDF in #7)

Revision history for this message
jean-pierre charras (jp-charras) wrote :

This is a bug in a plot function. I fixed it.

Seth Hillbrand (sethh)
Changed in kicad:
assignee: nobody → Seth Hillbrand (sethh)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision b74bccbb13230dfc5e69329c8c59d92bc9b6099e
https://git.launchpad.net/kicad/patch/?id=b74bccbb13230dfc5e69329c8c59d92bc9b6099e

Changed in kicad:
status: In Progress → Fix Committed
assignee: Seth Hillbrand (sethh) → jean-pierre charras (jp-charras)
Revision history for this message
Seth Hillbrand (sethh) wrote :

Nice catch jp! I missed your Launchpad post, thanks for fixing

Revision history for this message
Jeff Young (jeyjey) wrote :

I don't get it. How could that be platform-specific?

Oh, wait. Was it because the selected color was uninitialized (which lldb will set it to all 0's while gcc won't)?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.