Can't draw anything using cursor in the newest weekly build

Hi,

I’ve downloaded the newest weekly build for Windows and I’ve noticed that I can’t draw anything in Draft using cursor. It just doesn’t work, I can only enter the dimensions manually:

Cursor not working in Draft.gif

OS: Windows 10 build 19045
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.33981 (Git)
Build type: Release
Branch: master
Hash: 5a153e50ffb6046b6cc4dba498344032f6edb952
Python 3.10.12, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: Polish/Poland (pl_PL)

it seems to work here

OS: Ubuntu 20.04.6 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.33981 (Git) AppImage
Build type: Release
Branch: master
Hash: 5a153e50ffb6046b6cc4dba498344032f6edb952
Python 3.10.12, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: German/Germany (de_DE)

Thanks for the report. I have done some recent PRs that may have caused this. Will check this today.

Can’t reproduce the issue. NewJoker can you check if the problem also occurs in the previous dev version?

OS: Windows 8 build 9600
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.33981 (Git)
Build type: Release
Branch: master
Hash: 5a153e50ffb6046b6cc4dba498344032f6edb952
Python 3.10.12, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: Dutch/Netherlands (nl_NL)
Installed mods:

Where can I find it ? There’s only 33981 build for Windows here: https://github.com/FreeCAD/FreeCAD-Bundle/releases/tag/weekly-builds

It is no longer available for download, but you might have had a copy.

So, just for clarity, the problem does not occur in the V0.21 release?

No, unfortunately I don’t.


That’s right, it works normally in 0.21.

Since FreeCAD is modular, you can try this:

  1. Move the Draft folder from your V0.21 installation to a backup location.
  2. Copy the Draft folder from the V0.22 archive in its place.
  3. Start V0.21.
  4. Check if the error occurs.
  5. Remove the new Draft folder and move the old Draft folder back.

Just to report another feedback: here draft seems to work fine with the latest dev. version

OS: Ubuntu Core 22 (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.33983 (Git) Snap 752
Build type: Release
Branch: master
Hash: 010dca83030357a1b9467e7c5843d51b103ecb70
Python 3.10.12, Qt 5.15.10, Coin 4.0.0, Vtk 7.1.1, OCC 7.7.1
Locale: Italian/Italy (it_IT)
Installed mods: 
  * BIM 2021.12.0
  * FreeCAD-NativeIFC 2022.10.20

I tried this. It works properly in 0.21 with the Draft folder from 0.22.

Thanks. That tells us that the cause of your problem is probably not the revised Draft code. Can you try downloading and installing V0.22 again? If you use the same folder as before then you should delete all existing files and folders first.

It happens on 3 different Windows computers. I use a portable build so I just download it and unpack it.

In theory something might have gone wrong with your download.

Another thing I just remembered: The latest weeklies use a new 7-Zip compression method. But perhaps you are already aware of this.

While the original previous download has been removed from the Weekly Assets, the old package can still be built using the specific win-64/freecad-0.21.pre-py310h4ba7268__nnn_.conda from https://anaconda.org/freecad/freecad/files

I have a miniconda setup on my Windows partition so I’ve have a try with both tomorrow morning but I have to say one of the ‘fun’ things with Conda is finding out whether an upstream file that’s not pinned has changed.

But I downloaded and unpacked the build separately on each computer. Now I checked on yet another Windows computer and the same thing happens. I also got multiple instances of this error message when I enabled the Draft Rectangle tool:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 18: invalid continuation byte

I think from the French forum that OpenBrain might have an idea what is wrong but to confirm could you replace the src\Mod\Draft\draftguitools\gui_rectangles.py with the one attached, this will just give some more debug info. start FC, change to Draft and try to just create the first point of the rectangle, you don’t need to move your mouse very much, it’ll flood the Report View. Copy the lines from:

19:53:57  Draft workbench activated.
19:54:00  ----------------
19:54:00  GuiCommand: Rectangle
19:54:00  About to call ViewObserver
19:54:00  Pick first point

down to the first UniCodeDecodeError please.

I just wish I could replicate the bug on Linux!!

Syres I did this on one of the computers where this issue occurs. On that computer, there’s no full error message from above, just class ‘UnicodeDecodeError’ message in orange. When I replaced the gui_rectangles.py file, I just got:

23:57:55  Pick first point
23:57:56  <class 'UnicodeDecodeError'>
23:57:56  UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 18: invalid continuation byte

and those two messages repeated many times. Perhaps I should try on that computer on which the longer (red) error message occurred even without the modified file but I’m not sure if I can get more output this way.

NewJoker that’s absolutely fine, it means I can narrow down before the mouse event gets launched, thanks.

Not sure whether the issue is caused by a Py3.10 specific fix for Debian. Here is a PR that activates that fix for Linux & UNIX only. Maybe it heals the Windows issue: https://github.com/FreeCAD/FreeCAD/pull/10395