[BUG] QR Code Wizard

Hello

I have version 5.1.6 running on Windows and Ubuntu, generating a footprint of a QR code for the PCB, freezes the program and a few minutes later the crash program.

I have tested on both computers and get the same result, which does not respond and after a few minutes it closes.

I don’t know if it’s a known bug or it’s my problem, does anyone know how to fix it? I tried to create the QR and convert it with the Kicad tool, but it is not recognized by a QR reader. So I found out there was a wizard with kicad, but it doesn’t work for me.

Thank you.

Best regards

Least I can do is confirm this.
Footprint Editor / File / Create Footprint / “2D Barcode QRCode” gets stuck and absorbing 50% of my dual-core CPU when changing the “Contents” string + [Enter].
I killed the Footprint Editor after 4 minutes.

Can anyone else confirm this?

@OP: Do you have a gitlab account for making a bug report?

Application: KiCad
Version: 5.1.6-c6e7f7d~87~ubuntu18.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 5.4.0-42-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
Boost: 1.65.1
OpenCASCADE Community Edition: 6.9.1
Curl: 7.58.0
Compiler: GCC 7.5.0 with C++ ABI 1011

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

I gave it a try and it didn’t get stuck, the text of the QR Code changed and the code itself got modified in 1s maybe 2s.

Application: ModEdit
Version: (5.1.6)-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.66.0 OpenSSL/1.1.1d (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.1.1) nghttp2/1.39.2
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.71.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.66.0
    Compiler: GCC 9.2.0 with C++ ABI 1013

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

Python2/3 maybe? @kid, give you full version information from Help->About->Copy Version Info.

Hello

I’ve tried both teams. I paste the data from the Windows computer which is the one I use mainly.

I do not have a Gitlab account to be able to report the error, if necessary and someone else happens this error, I can create it, but better if it can be done by someone else who usually works with Gitlab.

Application: KiCad
Version: (5.1.6)-1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.66.0 OpenSSL/1.1.1d (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.1.1) nghttp2/1.39.2
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.71.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.66.0
    Compiler: GCC 9.2.0 with C++ ABI 1013

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

My python version is: Python 3.7.9 (On Ubuntu I have the version that installed the official repository).

I can paste the computer data with Ubuntu if necessary.

Thank you.

Best regards.

Yes please, also add the version info from the Ubuntu PC.
I run Mint myself, which is “not officially supported”.

I did a little search on gitlab, and the issue is already known for V5.99, so I added a link there back to this forum thread.

P.S:
If you’ve got some Python knowledge, you can have a look at the wizard yourself.

No problems using a recent pre 5.1.7 Testing on Windows, AMD Ryzen with 8+8 cores
Application: KiCad
Version: (5.1.6-86-gc30dc04571)-1, release build
Libraries:
wxWidgets 3.0.5
libcurl/7.71.0 OpenSSL/1.1.1g (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.41.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.73.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.71.0
Compiler: GCC 10.2.0 with C++ ABI 1014

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

Hello

Attach data with Ubuntu:

Application: KiCad
Version: 5.1.6-c6e7f7d~87~ubuntu20.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Linux 5.4.0-45-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
    Boost: 1.71.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.68.0
    Compiler: GCC 9.3.0 with C++ ABI 1013

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

Python version: Python 3.8.2

Thanks !

@paulvdh, I know very little about Python, although I know someone who does handle it very well.

I don’t know how python integrates into kicad or how to view logs of the bug, to try to fix it or tell my friend. Thank you.

Best regards

Hi

I installed a version testing ( kicad-patched-9-ac6ceb84b-x86_64.exe ) and now at least it throws me an error when I choose “2D Barcode”.

Attached screenshot
bug_qrcode

Best regards

You mentioned this:

for your Windows box and also for your Ubuntu box, but in Windows Python 3 is not supported, as such you see the following text:

How are you running the script ? Footprint editor->Create footprint?

Seems to me that you are somehow launching the script with Python3 and the script may have a problem with Python3 (judging from @paulvdh 's reproduction of the bug in Linux and @davidsrsb not seeing the bug in Windows either, like me.)

Unfortunatly I don’t know why Python3 may be running your script instead of Python2 or how to reverse it :flushed:

But hope it helps,

EDIT: It may be related to this topics:


Python 2 vs Python 3 is a big mess.
I was interested in Python, some 5 years ago, and the python website advised Python V3, but too many libraries and tutorials were only for Python V2 and there did not seem to be much interest moving on from V2 to V3 back then.

But now:
Python V2 is now officially obsolete since 2020-01-01. (finally, that took 8 years too long)

My scripting console shows Python 2.7.18 (default, Apr 20 2020, 16:57:11)

I also have QGIS 3.14 on my PCs which is Python 3

Mine is 2.7.16
image

@kid Could you post an screenshot of your Window’s box python console ?

Hi

After my previous message, I had to uninstall the testing version as I fail in a finished design. With the stable version solved, I was already afraid of the worst.

By the way remove from the operating system all the versions of python that I had installed and performed a clean installation of Kicad, but with the stable version does not exit the error, it happens as before, it freezes the program until it closes.

Attached the requested capture.

I’ve tried to generate a QR and convert it with the bitmap tool, but I can’t get it detected by a QR reader.

I’ll keep investigating.

Thank you.

Well, a bit of falling into the rabit hole, I was wondering what was the problem with your imported QR code, so I made a test footprint with the text “test1” and try to generate a QR code online with the same text.

The first thing I noticed was the the KiCAD generated QR code had much more information (redundancy or something else) that the online generators

For the simple text “test1” you see that the KiCAD QR code is much more complex than the ones generated online.

The QR Code looks to me on the 3D Viewer, but if is scannable or not, could not tell

EDIT: @kid I followed you recommendation and used my phone to scan the codes directly from the computer screen, it worked well.

Hi

I’ve tried those steps just like others in a forum, but I can’t get the QR reader to identify it, in the bitmap converter if it works (tested with an android APP), but adding the footprint doesn’t look the same as the original.

I installed Python version 2.7.18 (https://www.python.org/downloads/release/python-2718/), but I get the same result, it freezes the application until it closes.

I’m going to try another computer that was pending reinstalling Windows 10 and try installing Kicad.

If it doesn’t work for me, I guess I’ll use Eagle again, which has never given me these problems. Start using kicad thanks to a friend who works with kicad in your company.

I later return feedback on the installation result on the other computer. Thanks!

The KiCad version is not more complex, it just has more pixels. :slight_smile:

QR codes come in around 7 different sizes, from 21x21 pixels to 177x177 pixels.

Could you share how does the QR code looks after you imported it into kicad? I am asking because of this

@paulvdh i reckoned it had to be something like that, thanks for the clarification, howeve it appears that the type is fixed on the script.

FYI the feature size seems to be hardcoded to 0.5mm but I can confirm that a a 0.3mm feature size prints on silkscreen well and scans fine on boards produced by one of the cheap Chinese fabs.

The python plugin structure is fairly amenable to a bit of lightweight hacking. This thread is worth a read

I also grafted on a DataMatrix version which makes much smaller codes - 6mm x 6mm are easily possible but the text length is more limited - fine for a serial number of version control ref though.

1 Like