Draft workbench throws access violation when started

A forum dedicated to the Draft, Arch and BIM workbenches development.
falviani
Posts: 123
Joined: Tue May 07, 2019 8:49 pm

Draft workbench throws access violation when started

Postby falviani » Thu Sep 17, 2020 2:17 pm

Hello All,

For this test I downloaded the latest developer release:
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22411 (Git)
Build type: Release
Branch: master
Hash: d4519d5aec15bc08f029da5ed15410a494b57b2c
Python version: 3.8.5
Qt version: 5.12.6
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)

I created a new project on the start page, then immediately switched to the draft workbench. This triggered an access violation (here's the log):

09:04:30 OpenGL version is: 4.6 (4.6.13559 Compatibility Profile Context 26.20.12028.2)
09:04:30 Run Gui init script
09:04:30 Init: Running FreeCADGuiInit.py start script...
09:04:31 Init: Searching modules...
09:04:31 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\AddonManager... done
09:04:31 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Arch... done
09:04:31 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Complete... done
09:04:31 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Draft... done
09:04:31 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Drawing... done
09:04:31 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Fem... done
09:04:31 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Idf(InitGui.py not found)... ignore
09:04:31 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Image... done
09:04:31 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Import... done
09:04:31 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Inspection... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Material... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Measure(InitGui.py not found)... ignore
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Mesh... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\MeshPart... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\OpenSCAD... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Part... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\PartDesign... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Path... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Points... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Raytracing... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\ReverseEngineering... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Robot... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Show(InitGui.py not found)... ignore
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Sketcher... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Spreadsheet... done
09:04:32 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Start... done
09:04:33 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Surface... done
09:04:33 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\TechDraw... done
09:04:33 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Test... done
09:04:33 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Tux... done
09:04:33 Init: Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Web... done
09:04:33 Module: Part
09:04:33 Loading Part module... done
09:04:33 Init: Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\A2plus... done
09:04:33 Init: Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\Assembly4... done
09:04:33 Init: Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\DynamicData... done
09:04:33 Init: Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\fasteners... done
09:04:33 Init: Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\lattice2... done
09:04:34 Init: Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\Manipulator... done
09:04:34 Init: Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\parts_library(InitGui.py not found)... ignore
09:04:34 Init: Initializing freecad.asm3
09:04:38 Init: Initializing freecad.asm3... done
09:04:38 Init: Loading FreeCAD GUI
09:04:38 Init: Running FreeCADGuiInit.py start script... done
09:04:40 Init: Activating default workbench StartWorkbench
09:04:40 Loading GUI of Web module... done
09:04:40 Loading GUI of Start module... done
09:04:40 Loading Start module... done
09:04:40 Installed Qt WebEngine locales directory not found at location E:/Downloads/3D Printer software installers etc/FreeCAD/FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64/FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64/translations\qtwebengine_locales. Trying application directory...
09:04:40 Qt WebEngine locales directory not found at location E:/Downloads/3D Printer software installers etc/FreeCAD/FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64/FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64/bin\qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
09:04:40 Init: Showing main window
09:04:40 Main window restored
09:04:40 Show main window
09:04:40 Toolbars restored
09:04:40 3Dconnexion device not attached.
09:04:40 Init: Entering event loop
09:04:40 Init: Processing command line files
09:04:53 Loading Draft workbench, done.
09:04:53 Loading GUI of Part module... done
09:04:53 Loading Sketcher module... done
09:04:53 Loading GUI of Sketcher module... done
09:04:53 Draft workbench activated.
09:04:53 Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
09:04:53 Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
09:04:53 The event type 12 was sent to QOpenGLWidget
Object tree:
QOpenGLWidget is child of
SIM::Coin3D::Quarter::QuarterWidget is child of
QStackedWidget is child of
Gui::View3DInventor is child of
QMdiSubWindow is child of
QWidget is child of
QMdiArea is child of
Gui::MainWindowUnhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
09:04:53 The event type 12 was sent to QOpenGLWidget
Object tree:
QOpenGLWidget is child of
SIM::Coin3D::Quarter::QuarterWidget is child of
QStackedWidget is child of
Gui::View3DInventor is child of
QMdiSubWindow is child of
QWidget is child of
QMdiArea is child of
Gui::MainWindowUnhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
09:05:06 The event type 12 was sent to QOpenGLWidget
Object tree:
QOpenGLWidget is child of
SIM::Coin3D::Quarter::QuarterWidget is child of
QStackedWidget is child of
Gui::View3DInventor is child of
QMdiSubWindow is child of
QWidget is child of
QMdiArea is child of
Gui::MainWindow

I have checked the page dealing with video driver issues and none of them seem relevant to this. My processor is an AMD Ryzen 7 1700x (16GB RAM), the video card is a Radeon RX Vega (8 GB RAM). It has the latest drivers installed.

Thanks,
Frank Alviani
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: Draft workbench throws access violation when started

Postby vocx » Thu Sep 17, 2020 6:54 pm

falviani wrote:
Thu Sep 17, 2020 2:17 pm
video card is a Radeon RX Vega (8 GB RAM). It has the latest drivers installed.
Downgrade the graphics drivers.

Don't dump the entire terminal output like that because it's unreadable, place it inside

Code: Select all

code tags
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
falviani
Posts: 123
Joined: Tue May 07, 2019 8:49 pm

Re: Draft workbench throws access violation when started

Postby falviani » Thu Sep 17, 2020 7:21 pm

Sorry - I use this machine for many things - FreeCAD is just one of them. I will not cripple the machine because of this.

Your request for a more readable log is quite reasonable. Here it is:

Code: Select all

09:04:30  OpenGL version is: 4.6 (4.6.13559 Compatibility Profile Context 26.20.12028.2)
09:04:30  Run Gui init script
09:04:30  Init: Running FreeCADGuiInit.py start script...
09:04:31  Init:   Searching modules...
09:04:31  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\AddonManager... done
09:04:31  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Arch... done
09:04:31  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Complete... done
09:04:31  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Draft... done
09:04:31  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Drawing... done
09:04:31  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Fem... done
09:04:31  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Idf(InitGui.py not found)... ignore
09:04:31  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Image... done
09:04:31  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Import... done
09:04:31  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Inspection... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Material... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Measure(InitGui.py not found)... ignore
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Mesh... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\MeshPart... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\OpenSCAD... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Part... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\PartDesign... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Path... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Points... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Raytracing... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\ReverseEngineering... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Robot... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Show(InitGui.py not found)... ignore
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Sketcher... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Spreadsheet... done
09:04:32  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Start... done
09:04:33  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Surface... done
09:04:33  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\TechDraw... done
09:04:33  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Test... done
09:04:33  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Tux... done
09:04:33  Init:      Initializing E:\Downloads\3D Printer software installers etc\FreeCAD\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64\Mod\Web... done
09:04:33  Module: Part
09:04:33  Loading Part module... done
09:04:33  Init:      Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\A2plus... done
09:04:33  Init:      Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\Assembly4... done
09:04:33  Init:      Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\DynamicData... done
09:04:33  Init:      Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\fasteners... done
09:04:33  Init:      Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\lattice2... done
09:04:34  Init:      Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\Manipulator... done
09:04:34  Init:      Initializing C:\Users\frank\AppData\Roaming\FreeCAD\Mod\parts_library(InitGui.py not found)... ignore
09:04:34  Init: Initializing freecad.asm3
09:04:38  Init: Initializing freecad.asm3... done
09:04:38  Init: Loading FreeCAD GUI
09:04:38  Init: Running FreeCADGuiInit.py start script... done
09:04:40  Init: Activating default workbench StartWorkbench
09:04:40  Loading GUI of Web module... done
09:04:40  Loading GUI of Start module... done
09:04:40  Loading Start module... done
09:04:40  Installed Qt WebEngine locales directory not found at location E:/Downloads/3D Printer software installers etc/FreeCAD/FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64/FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64/translations\qtwebengine_locales. Trying application directory...
09:04:40  Qt WebEngine locales directory not found at location E:/Downloads/3D Printer software installers etc/FreeCAD/FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64/FreeCAD_0.19.22411-Win-Conda_vc14.x-x86_64/bin\qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
09:04:40  Init: Showing main window
09:04:40  Main window restored
09:04:40  Show main window
09:04:40  Toolbars restored
09:04:40  3Dconnexion device not attached.
09:04:40  Init: Entering event loop
09:04:40  Init: Processing command line files
09:04:53  Loading Draft workbench, done.
09:04:53  Loading GUI of Part module... done
09:04:53  Loading Sketcher module... done
09:04:53  Loading GUI of Sketcher module... done
09:04:53  Draft workbench activated.
09:04:53  Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
09:04:53  Unhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
09:04:53  The event type 12 was sent to QOpenGLWidget
Object tree:
	QOpenGLWidget is child of
	SIM::Coin3D::Quarter::QuarterWidget is child of
	QStackedWidget is child of
	Gui::View3DInventor is child of
	QMdiSubWindow is child of
	QWidget is child of
	QMdiArea is child of
	Gui::MainWindowUnhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
09:04:53  The event type 12 was sent to QOpenGLWidget
Object tree:
	QOpenGLWidget is child of
	SIM::Coin3D::Quarter::QuarterWidget is child of
	QStackedWidget is child of
	Gui::View3DInventor is child of
	QMdiSubWindow is child of
	QWidget is child of
	QMdiArea is child of
	Gui::MainWindowUnhandled Base::Exception caught in GUIApplication::notify.
The error message is: Access violation
09:05:06  The event type 12 was sent to QOpenGLWidget
Object tree:
	QOpenGLWidget is child of
	SIM::Coin3D::Quarter::QuarterWidget is child of
	QStackedWidget is child of
	Gui::View3DInventor is child of
	QMdiSubWindow is child of
	QWidget is child of
	QMdiArea is child of
	Gui::MainWindow
chrisb
Posts: 29010
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft workbench throws access violation when started

Postby chrisb » Thu Sep 17, 2020 8:35 pm

falviani wrote:
Thu Sep 17, 2020 7:21 pm
I will not cripple the machine because of this.
sometimes you have to go through a valley to reach the next peak. It doesn't mean you have to stay in the valey.
Your request for a more readable log is quite reasonable. Here it is:
You can edit your posts. Is there any difference now to the previously posted log?
A Sketcher Lecture with in-depth information is available in English, auf deutsch, en français, en español.
falviani
Posts: 123
Joined: Tue May 07, 2019 8:49 pm

Re: Draft workbench throws access violation when started

Postby falviani » Thu Sep 17, 2020 9:58 pm

Hi Chris,

It's the same log. I felt it would be clearer that I was responding to his reasonable request.
carlopav
Posts: 1570
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Draft workbench throws access violation when started

Postby carlopav » Fri Sep 18, 2020 2:50 am

Does this only happen with Draft workbench?
follow my experiments on BIM modelling for architecture design
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: Draft workbench throws access violation when started

Postby vocx » Fri Sep 18, 2020 3:12 am

carlopav wrote:
Fri Sep 18, 2020 2:50 am
Does this only happen with Draft workbench?
The crash is probably in Coin (Pivy) + Qt, hence why you see the messages in the log related SIM::QOpenGLWidget, SIM::Coin3D::Quarter::QuarterWidget, Gui::View3DInventor, etc.

Thus why I suggested another GPU driver. No other workbench uses Pivy.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
vanuan
Posts: 465
Joined: Wed Oct 24, 2018 9:49 pm

Re: Draft workbench throws access violation when started

Postby vanuan » Fri Sep 18, 2020 5:28 am

Here's a handler:
https://github.com/FreeCAD/FreeCAD/blob ... #L100-L101

Here's what it prints:
https://github.com/FreeCAD/FreeCAD/blob ... #L112-L130

So, a Base::Exception happened when QOpenGLWidget was notified of a paint event.
According to QOpenGLWidget documentation, https://doc.qt.io/qt-5/qopenglwidget.html#paintEvent
paintEvent calls the abstract method paintGL which should be implemented in a subclass of QOpenGLWidget.
The object of class QOpenGLWidget belongs to a widget of class SIM::Coin3D::Quarter::QuarterWidget.

There are the following classes that implement paintGL:
Image/Gui//GLImageBox
Image/Gui//OpenGLImageBox
Sandbox/Gui/Overlay
Gui/CoinRiftWidget
Gui/GLPainter
Gui/Flag.h
Gui/Quarter/QuarterWidget.cpp: CustomGLWidget

Among those, the following inherit from QOpenGLWidget:

Image/Gui//GLImageBox
Gui/Quarter/QuarterWidget.cpp: CustomGLWidget

Only CustomGLWidget seems appropriate since according to user, a fresh project was opened.

It is further confirmed by the fact that it is owned by SIM::Coin3D::Quarter::QuarterWidget:

Code: Select all

QuarterWidget::constructor(const QtGLFormat & format, const QtGLWidget * sharewidget)
{
  QGraphicsScene* scene = new QGraphicsScene;
  setScene(scene);
  setViewport(new CustomGLWidget(format, this, sharewidget));
There are 2 interesting functions in the CustomGLWidget, event:

Code: Select all

    bool event(QEvent *e)
    {
        // If a debug logger is activated then Qt's default implementation
        // first releases the context before stopping the logger. However,
        // the logger needs the active context and thus crashes because it's
        // null.
        if (e->type() == QEvent::WindowChangeInternal) {
            if (!qApp->testAttribute(Qt::AA_ShareOpenGLContexts)) {
                QOpenGLDebugLogger* logger = this->findChild<QOpenGLDebugLogger*>();
                if (logger) {
                    logger->stopLogging();
                    delete logger;
                }
            }
        }

        return QOpenGLWidget::event(e);
    }
and paintGL

Code: Select all

    // paintGL() is invoked when e.g. using the method grabFramebuffer of this class
    // \code
    // from PySide2 import QtWidgets
    // mw = Gui.getMainWindow()
    // mdi = mw.findChild(QtWidgets.QMdiArea)
    // gl = mdi.findChild(QtWidgets.QOpenGLWidget)
    // img = gl.grabFramebuffer()
    // \endcode
    void paintGL()
    {
        QuarterWidget* qw = qobject_cast<QuarterWidget*>(parentWidget());
        if (qw) {
            qw->redraw();
        }
    }
The event method delegates to QOpenGLWidget::event which calls paintGL for the event type 12 (paint).

So the error is somewhere here:

Code: Select all

        QuarterWidget* qw = qobject_cast<QuarterWidget*>(parentWidget());
        if (qw) {
            qw->redraw();
        }
Here's its implementation:

Code: Select all

QuarterWidget::redraw(void)
{
  // we're triggering the next paintGL(). Set a flag to remember this
  // to avoid that we process the delay queue in paintGL()
  PRIVATE(this)->processdelayqueue = false;

  // When stylesheet is used, there is recursive repaint warning caused by
  // repaint() here. It happens when switching active documents. Based on call
  // stacks, it happens like this, the repaint event first triggers a series
  // calls of QWidgetPrivate::paintSiblingsRecrusive(), and then reaches one of
  // the QuarterWidget. From its paintEvent(), it calls
  // SoSensorManager::processDelayQueue(), which triggers redraw() of another
  // QuarterWidget. And if repaint() is called here, it will trigger another
  // series call of QWidgetPrivate::paintSiblingRecursive(), and eventually
  // back to the first QuarterWidget, at which time the "Recursive repaint
  // detected" Qt warning message will be printed.
  //
  // Note that, the recursive repaint is not infinite due to setting
  // 'processdelayqueue = false' above. However, it does cause annoying
  // flickering, and actually crash on Windows.
#if 1
  this->viewport()->update();
#else
Hm. So:
However, it does cause annoying flickering, and actually crash on Windows.
Does the topic starter use Windows? Yes, indeed. Did it happen when the user activated a 3D view? Yes.

Looks like a smoking gun. So it's a known issue. But why it happens is still a mistery to me. It also seem to give a explain why FreeCAD recreates/redraws 3D objects so often.
Last edited by vanuan on Fri Sep 18, 2020 5:47 am, edited 3 times in total.
User avatar
vanuan
Posts: 465
Joined: Wed Oct 24, 2018 9:49 pm

Re: Draft workbench throws access violation when started

Postby vanuan » Fri Sep 18, 2020 5:32 am

Let's ping whoever added the "I know this code will crash on Windows" comment:
https://github.com/FreeCAD/FreeCAD/comm ... 8a175a5436
realthunder wrote: ping
Any recommendation? Did you find the root cause?
realthunder
Posts: 1809
Joined: Tue Jan 03, 2017 10:55 am

Re: Draft workbench throws access violation when started

Postby realthunder » Fri Sep 18, 2020 11:29 am

vanuan wrote:
Fri Sep 18, 2020 5:32 am
Let's ping whoever added the "I know this code will crash on Windows" comment:
https://github.com/FreeCAD/FreeCAD/comm ... 8a175a5436
realthunder wrote: ping
Any recommendation? Did you find the root cause?
Hmm... looks like you have developed some bias against me, no? The comment you quoted means that the crash on Windows will happen if the code calls repaint(). I fixed it by replacing it with update().

It is not really useful to know where the exception is caught. Can anyone with a Windows debug build reproduce this problem? If so, it will be more useful to catch the exception in the debugger.
Try Assembly3 (latest version 0.11) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal