collection of page issues

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
wandererfan
Veteran
Posts: 6324
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: collection of page issues

Post by wandererfan »

uwestoehr wrote: Fri Dec 31, 2021 12:33 am What is your plan? Will you merge the PRs soon? The first one works nicely for me. For the second one I cannot test as I am in vacation and thus away from my compilation machine.
I'm not up to speed on the new CI process yet (what used to be Travis and is now Gitlab?). I think I'm waiting on Bernd to return from holiday?
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: collection of page issues

Post by uwestoehr »

wandererfan wrote: Fri Dec 31, 2021 3:34 pm I'm not up to speed on the new CI process yet (what used to be Travis and is now Gitlab?). I think I'm waiting on Bernd to return from holiday?
Bernd is already back and the CI is running -> I'll send you a private message to inform you.
User avatar
wandererfan
Veteran
Posts: 6324
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: collection of page issues

Post by wandererfan »

TheMarkster wrote: Mon Dec 13, 2021 12:59 am Does the same issue happen in 0.19? The reason I ask is when I added the Use Original Selection to the edit menu -> copy / edit menu -> duplicate dialog (new for 0.20) it revealed a crash when using it to duplicate techdraw pages. I submitted a fix to prevent the crash, but it could have had some unintended effects.
Is there a bug report or forum topic for the crash? I need to modify the fix to allow clean up of the page when a view is moved to a new page and I don't want to reintroduce what you fixed.
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: collection of page issues

Post by TheMarkster »

wandererfan wrote: Fri Jan 07, 2022 5:28 pm
TheMarkster wrote: Mon Dec 13, 2021 12:59 am Does the same issue happen in 0.19? The reason I ask is when I added the Use Original Selection to the edit menu -> copy / edit menu -> duplicate dialog (new for 0.20) it revealed a crash when using it to duplicate techdraw pages. I submitted a fix to prevent the crash, but it could have had some unintended effects.
Is there a bug report or forum topic for the crash? I need to modify the fix to allow clean up of the page when a view is moved to a new page and I don't want to reintroduce what you fixed.
I didn't know enough about techdraw code to do a proper fix (and still don't), but this seemed to work at least to stop the crash. My concern was it might cause some unintended effects.

There were 2 PR's:

https://github.com/FreeCAD/FreeCAD/pull/5013
https://github.com/FreeCAD/FreeCAD/pull/5016

This is the one with the Original Selection button, but it has no specific techdraw changes. It was there that it was discovered duplicating a page without its contents caused a crash and how to reproduce. (Note that the crash also happened in 0.19, but then it wasn't as easy to duplicate the page without the contents because you had to alter the selections in the duplicate dialog.)

https://github.com/FreeCAD/FreeCAD/pull/5010
User avatar
wandererfan
Veteran
Posts: 6324
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: collection of page issues

Post by wandererfan »

TheMarkster wrote: Fri Jan 07, 2022 6:47 pm There were 2 PR's:
I built a version without your change to MDIViewPage, but I can't make it crash. Must not be following the right steps.
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: collection of page issues

Post by TheMarkster »

wandererfan wrote: Sat Jan 08, 2022 1:39 pm
TheMarkster wrote: Fri Jan 07, 2022 6:47 pm There were 2 PR's:
I built a version without your change to MDIViewPage, but I can't make it crash. Must not be following the right steps.
Open this file. Select the Page, in edit menu -> duplicate selection. In the dialog select only the page as shown in this screenshot:
Snip macro screenshot-acacad.png
Snip macro screenshot-acacad.png (71 KiB) Viewed 1177 times
After pressing OK you should get a crash (FreeCAD exists without explanation). I was able to reproduce a crash with 0.19, but I didn't update to the latest 0.19 release, which does include some backported bug fixes. Here is the version that crashes:

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 (Git)
Build type: Release
Branch: master
Hash: b2ca86d8d72b636011a73394bf9bcdedb3b109b7
Python version: 3.8.8
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)


It might also crash with the Use original selections button (without my fix), but that button is not available in 0.19.
Attachments
techdraw_crash.FCStd
(15.82 KiB) Downloaded 19 times
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: collection of page issues

Post by uwestoehr »

TheMarkster wrote: Sat Jan 08, 2022 5:44 pm After pressing OK you should get a crash
It might also crash with the Use original selections button (without my fix), but that button is not available in 0.19.
The crash is also in FC 0.19.3 because the fixes were not backported. Can you please in future add a post to our backport thread for commits/PRs that should be backported:
https://forum.freecadweb.org/viewtopic.php?f=10&t=57659

I backported now these PRs:
https://github.com/FreeCAD/FreeCAD/pull/5013
https://github.com/FreeCAD/FreeCAD/pull/5016

I will now compile and see if the crash is then gone. This takes however, about an hour.
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: collection of page issues

Post by uwestoehr »

uwestoehr wrote: Sat Jan 08, 2022 6:00 pm I will now compile and see if the crash is then gone. This takes however, about an hour.
Yes, this fixed the crash. The fix will be part of a future FC 0.19.4 release.
Post Reply