warnings in weekly build 33263 win-conda

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Piero69
Posts: 476
Joined: Thu Jul 04, 2019 1:22 pm
Location: Parma - Italy

warnings in weekly build 33263 win-conda

Post by Piero69 »

@chennes

i keep having these two warnings when running FC and addonmanager, what are they? can be corrected?

07:32:35 Addon Developer Warning: Repository branch set in package.xml file for addon freecad.gears workbench (develop) does not match the branch it was fetched from (master)

07:32:39 libpng warning: iCCP: known incorrect sRGB profile

Code: Select all

OS: Windows 10 build 19044
Word size of FreeCAD: 64-bit
Version: 0.21.0.33263 (Git)
Build type: Release
Branch: master
Hash: 864f99bf984c237ef38d9451fd6f3a5ec34e6eb4
Python 3.10.11, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: Italian/Italy (it_IT)
Installed mods: 
  * 3DfindIT 1.2.0
  * CurvedShapes 1.0.4
  * Curves 0.6.9
  * fasteners 0.4.56
  * freecad.gears 1.0.0
  * InventorLoader 1.4.0
  * QuickMeasure 2022.10.28
  * sheetmetal 0.2.63
  * Silk 0.1.3
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: warnings in weekly build 33263 win-conda

Post by chennes »

For the freecad.gears warning: the developer of that addon needs to update their package.xml file (or they need to update the branch used in FreeCAD-Addons). The PNG warning is coming from libpng, which we don't really control -- someplace on the wiki there are macros using bad icon data. So we could try to hunt those down, but it's not easy to figure out which ones are the problem.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
adrianinsaval
Veteran
Posts: 5544
Joined: Thu Apr 05, 2018 5:15 pm

Re: warnings in weekly build 33263 win-conda

Post by adrianinsaval »

Can we filter out the libpng warnings? They are not helpful to the user, at least we should move them to log level messages
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: warnings in weekly build 33263 win-conda

Post by chennes »

I don't know -- is there a way to filter the report view? That warning is basically worthless.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Syres
Veteran
Posts: 2898
Joined: Thu Aug 09, 2018 11:14 am

Re: warnings in weekly build 33263 win-conda

Post by Syres »

chennes wrote: Mon May 22, 2023 12:45 pm someplace on the wiki there are macros using bad icon data. So we could try to hunt those down, but it's not easy to figure out which ones are the problem.
Assuming pngcrush is installed:

Code: Select all

#!/bin/bash

FILES=$(find "$1" -type f -iname '*.png')

FIXED=0
for f in $FILES; do
    WARN=$(pngcrush -n -warn "$f" 2>&1)
    if [[ "$WARN" == *"PCS illuminant is not D50"* ]] || [[ "$WARN" == *"known incorrect sRGB profile"* ]] || [[ "$WARN" == *"iCCP: Not recognizing known sRGB profile"* ]]; then
        pngcrush -s -ow -rem allb -reduce "$f"
        FIXED=$((FIXED + 1))
    fi
done

echo "$FIXED errors fixed"
Successfully corrected a PNG file on my Linux Mint 20.3 box in subfolder to ensure it was recursive. If you want a test 'faulty' PNG file, I used https://raw.githubusercontent.com/Geosc ... 3/icon.png
User avatar
adrianinsaval
Veteran
Posts: 5544
Joined: Thu Apr 05, 2018 5:15 pm

Re: warnings in weekly build 33263 win-conda

Post by adrianinsaval »

@wmayer @abdullah I believe some filters where created for the notification system, can we filter out libpng warnings from report view too?
wmayer
Founder
Posts: 20300
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: warnings in weekly build 33263 win-conda

Post by wmayer »

The filters passed to QLoggingCategory::setFilterRules only work when the function qCWarning() is used where the first argument is the category string. When qWarning() is used instead then with Qt it's not possible to filter the warning. In this case we must implement our own filtering mechanism.
wmayer
Founder
Posts: 20300
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: warnings in weekly build 33263 win-conda

Post by wmayer »

Possibly the PNG reader uses the category string: qt.gui.imageio
https://github.com/qt/qtbase/blob/6a4af ... r.cpp#L237

Do we have a PNG file that triggers the warning in order to see if with ignoring "qt.gui.imageio" the warning can be filtered?
User avatar
chennes
Veteran
Posts: 3904
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: warnings in weekly build 33263 win-conda

Post by chennes »

According to the poster above, this PNG is faulty:
https://raw.githubusercontent.com/Geosc ... 3/icon.png
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
wmayer
Founder
Posts: 20300
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: warnings in weekly build 33263 win-conda

Post by wmayer »

OK, thanks. I can confirm the warning when loading the file but unfortunately the warning hasn't the context string "qt.gui.imageio"
Post Reply