Page 1 of 1

FC0.19 [Bug]: C++ exception thrown (ios_base::failbit set: iostream stream error)

Posted: Wed Dec 04, 2019 1:42 pm
by easyw-fc
with FC 0.19 I have this copying issue:
Log: Could not create collator: 4
Log: QWidget::repaint: Recursive repaint detected
Err: C++ exception thrown (ios_base::failbit set: iostream stream error)
Here the procedure to recreate the issue:
1) import the big STEP file linked here at GH (use right-click Save link as) icezum.step
2) select the main Part container (ASSEMBLY)
3) click on FC 'Copy' icon
4) simply click OK on the Object selection dialog
5) create a new FC document
6) click on FC 'Paste' icon
this will lead to the above errors.

The STEP import settings shouldn't count because I can reproduce the same issue when saving the STEP file as FC file and then repeat the copying procedure from the native FC format.
Anyway here my STEP import settings:
-
step-import-settings.png
step-import-settings.png (63.12 KiB) Viewed 3715 times
-
And here my FC full info:

Code: Select all

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18822 (Git)
Build type: Release
Branch: master
Hash: 0935aa9f5c446ef493e45abb3eba5ffc1af9f57d
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
I also can reproduce the issue on Linux Mint, with a different PC and GPU.

FC0.18 just works fine.

Please note that I can correctly copy the objects on FC0.19 using the following python code:

Code: Select all

import ImportGui
ImportGui.open(u"C:/Temp/icezum.step")
Gui.SendMsgToActiveView("ViewFit")
# Gui.runCommand('Std_Copy',0)
i=App.ActiveDocument.ASSEMBLY
App.newDocument("test")
newDoc= App.getDocument('test')
newDoc.copyObject(i,True)
Gui.SendMsgToActiveView("ViewFit")


Re: FC0.19 [Bug]: C++ exception thrown (ios_base::failbit set: iostream stream error)

Posted: Wed Dec 04, 2019 10:21 pm
by sgrogan
easyw-fc wrote: Wed Dec 04, 2019 1:42 pm I also can reproduce the issue on Linux Mint, with a different PC and GPU.
Can you try the previous windows version (it's still on the release page)
The Conda build your using is a bit experimental, I'm trying to activate the Reverseengineering WB.
I see you can reproduce on Mint, but boost-iostream was an issue when compiling the Win Conda version.

Re: FC0.19 [Bug]: C++ exception thrown (ios_base::failbit set: iostream stream error)

Posted: Wed Dec 04, 2019 10:38 pm
by easyw-fc
sgrogan wrote: Wed Dec 04, 2019 10:21 pm Can you try the previous windows version (it's still on the release page)
it is still present on Win Conda previous release FreeCAD_0.19.18811_x64_Conda_Py3QT5-WinVS2015.7z
and on FreeCAD_0.19.18811_x64_LP_12.1.2_PY3QT5-WinVS2015.7z
sgrogan wrote: Wed Dec 04, 2019 10:21 pm I see you can reproduce on Mint, but boost-iostream was an issue when compiling the Win Conda version.
I can reproduce the error on latest PPA build on Linux Mint and on the latest AppImage

Code: Select all

OS: Linux Mint 19.2 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18822 (Git) AppImage
Build type: Release
Branch: master
Hash: 0935aa9f5c446ef493e45abb3eba5ffc1af9f57d
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
I really think this is an issue on the code base and not on the packaging...
may be @realthunder may have an insight, cause this copy&paste dialog improvement is related to the big Link merge...
realthunder wrote: ping

Re: FC0.19 [Bug]: C++ exception thrown (ios_base::failbit set: iostream stream error)

Posted: Wed Dec 04, 2019 10:40 pm
by sgrogan
easyw-fc wrote: Wed Dec 04, 2019 10:38 pm I really think this is an issue on the code base and not on the packaging...
Thanks for testing, I'm always worried I've mucked something up. ;)

Re: FC0.19 [Bug]: C++ exception thrown (ios_base::failbit set: iostream stream error)

Posted: Wed Dec 04, 2019 11:30 pm
by otoien
Yes I can confirm with the linked file and also own step files I worked with in the past week(s). (I thought at the time there was some kind of corruption in the Step file I used, however if the information in the step file is not attempted copy and pasted, and just manipulated in the file it was imported into, I can can continue to work with the imported data without problems. I am using the non-Conda versions,
FreeCAD_0.19.18811_x64_LP_12.1.2_PY3QT5-WinVS2015. I also encountered the problem with FreeCAD_0.19.18778_x64_LP_12.1.2_PY3QT5-WinVS2015 with my own step files, and likely with FreeCAD_0.19.18760_x64_LP_12.1.2_PY3QT5-WinVS2015.

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18811 (Git)
Build type: Release
Branch: master
Hash: b809867021deb37be1039dab37b9fe1cafab254e
Python version: 3.6.7
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

Re: FC0.19 [Bug]: C++ exception thrown (ios_base::failbit set: iostream stream error)

Posted: Wed Dec 04, 2019 11:59 pm
by otoien
I just checked and confirmed problem with non-conda version 0.19.18760, both on linked file and files originating from complicated step import of my own. Some of the data I tested with originated from a FreeCAD file saved with ver. 0.18 in mid-July, and opened in 0.19.

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18760 (Git)
Build type: Release
Branch: master
Hash: ef73ab5f3a330d3c44138f23290f8c9f7a334caf
Python version: 3.6.7
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

Re: FC0.19 [Bug]: C++ exception thrown (ios_base::failbit set: iostream stream error)

Posted: Thu Dec 05, 2019 1:18 am
by realthunder
PR submitted here.

Re: FC0.19 [Bug]: C++ exception thrown (ios_base::failbit set: iostream stream error)

Posted: Thu Dec 05, 2019 12:35 pm
by easyw-fc
realthunder wrote: Thu Dec 05, 2019 1:18 am PR submitted here.
Thx :D

Re: FC0.19 [Bug]: C++ exception thrown (ios_base::failbit set: iostream stream error)

Posted: Sun Dec 08, 2019 9:45 pm
by otoien
Thanks, it appears to have been merged and is working for me in development version binary: 0.19.18842 .

I really appreciate this - it was hard to do without copy/paste of complicated objects.