Illegal storage access...

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
flolli
Posts: 20
Joined: Wed Mar 18, 2009 3:18 pm
Location: Stuttgart,Germany

Re: Illegal storage access...

Post by flolli »

Hi Werner,

i have python 2.6 and the output is simply "illegal storage access".
also in the logfile no Err is mentioned.
so i tried to debug in the widgetfactory.cpp, but got lost at the point i mentioned above:

Gui::Dialog::PreferencePage* w = (Gui::Dialog::PreferencePage*)Produce(sName);

Cheers,
Florian
wmayer
Founder
Posts: 20305
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Illegal storage access...

Post by wmayer »

Okay, as you said you built FreeCAD yourself, let me know please what gdb does say.

Start FreeCAD with gdb ./FreeCAD (assuming you're in the right directory) then you probably have to enter "run". If FreeCAD is up open the preferences page. Go back to the console and enter "bt" to show the backtrace information. Then post the complete output here, please.

I assume this crash is related to python 2.6
flolli
Posts: 20
Joined: Wed Mar 18, 2009 3:18 pm
Location: Stuttgart,Germany

Re: Illegal storage access...

Post by flolli »

Hi Werner,

here it is:

#0 0xb5a24c00 in PyObject_IsInstance () from /usr/lib/libpython2.6.so.1.0
#1 0xb5a24dd2 in PySequence_Check () from /usr/lib/libpython2.6.so.1.0
#2 0xb7c6e713 in Py::SeqBase<Py::Char>::accepts (this=0xbfffd7f4,
pyob=0x841a6cc) at ../../src/CXX/Objects.hxx:1350
#3 0xb5c1979c in Py::Object::validate (this=0xbfffd7f4)
at ../CXX/cxx_extensions.cxx:89
#4 0xb7c66b94 in Gui::Application::workbenchMenuText (this=0xbfffeca0,
wb=@0x85290ac) at ../../src/CXX/Objects.hxx:1331
#5 0xb7cc0c1b in DlgGeneralImp (this=0x85a7d30, parent=0x0)
at DlgGeneralImp.cpp:54
#6 0xb7d916f6 in Gui::PrefPageProducer<Gui::Dialog::DlgGeneralImp>::Produce (
this=0x816bbc8) at WidgetFactory.h:165
#7 0xb5c352ac in Base::Factory::Produce (this=0x816bb08,
sClassName=0x81a258c "Gui::Dialog::DlgGeneralImp") at Factory.cpp:51
#8 0xb7e1666c in Gui::WidgetFactoryInst::createPreferencePage (
this=0x816bb08, sName=0x81a258c "Gui::Dialog::DlgGeneralImp", parent=0x0)
at WidgetFactory.cpp:106
#9 0xb7ce7fa3 in Gui::Dialog::DlgPreferencesImp::setupPages (this=0xbfffdbd8)
at DlgPreferencesImp.cpp:96
#10 0xb7ce866a in DlgPreferencesImp (this=0xbfffdbd8, parent=0xbfffed48, fl=
{i = -1073751016}) at DlgPreferencesImp.cpp:61
#11 0xb7c91c2c in StdCmdDlgPreferences::activated (this=0x81aa268, iMsg=0)
at CommandStd.cpp:355
#12 0xb7c86a97 in Gui::Command::invoke (this=0x81aa268, i=0) at Command.cpp:244
#13 0xb7c5ad38 in Gui::Action::onActivated (this=0x84a4880) at Action.cpp:77
#14 0xb7c5adcb in Gui::Action::qt_metacall (this=0x84a4880,
_c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfffdd9c)
at moc_Action.cpp:66
#15 0xb69df580 in QMetaObject::activate(QObject*, int, int, void**) ()
from /usr/lib/libQtCore.so.4
---Type <return> to continue, or q <return> to quit---
#16 0xb69df980 in QMetaObject::activate(QObject*, QMetaObject const*, int, int, void**) () from /usr/lib/libQtCore.so.4
#17 0xb6dce631 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#18 0xb6dcef9f in QAction::activate(QAction::ActionEvent) ()
from /usr/lib/libQtGui.so.4
#19 0xb71aaf84 in ?? () from /usr/lib/libQtGui.so.4
#20 0xb71aba12 in QMenu::mouseReleaseEvent(QMouseEvent*) ()
from /usr/lib/libQtGui.so.4
#21 0xb6e2ca72 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#22 0xb71add09 in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4
#23 0xb6dd48fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
from /usr/lib/libQtGui.so.4
#24 0xb6ddd111 in QApplication::notify(QObject*, QEvent*) ()
from /usr/lib/libQtGui.so.4
#25 0xb69ca961 in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
from /usr/lib/libQtCore.so.4
#26 0xb6ddc39e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&) () from /usr/lib/libQtGui.so.4
#27 0xb6e469de in ?? () from /usr/lib/libQtGui.so.4
#28 0xb6e45b05 in QApplication::x11ProcessEvent(_XEvent*) ()
from /usr/lib/libQtGui.so.4
#29 0xb6e6e0ca in ?? () from /usr/lib/libQtGui.so.4
#30 0xb67ef9a8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#31 0xb67f3063 in ?? () from /usr/lib/libglib-2.0.so.0
#32 0xb67f3221 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#33 0xb69f4fb8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#34 0xb6e6d7c5 in ?? () from /usr/lib/libQtGui.so.4
#35 0xb69c901a in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
---Type <return> to continue, or q <return> to quit---
#36 0xb69c91da in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib/libQtCore.so.4
#37 0xb69cb895 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#38 0xb6dd4777 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#39 0xb7c6b925 in Gui::Application::runApplication () at Application.cpp:1160
#40 0x0804a999 in main (argc=-1251871448, argv=0xbffff134) at MainGui.cpp:146

Cheers,
Florian
wmayer
Founder
Posts: 20305
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Illegal storage access...

Post by wmayer »

Okay, thanks. Obviously it's a problem with the PyCXX library and python2.6. I'll submit a bug report and look how I can fix it.
In the meantime you can try to use python2.5 insteadof python2.6 -- if possible.
wmayer
Founder
Posts: 20305
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Illegal storage access...

Post by wmayer »

Okay, the bug is fixed. Get the latest changes from svn and have fun ;-)
flolli
Posts: 20
Joined: Wed Mar 18, 2009 3:18 pm
Location: Stuttgart,Germany

Re: Illegal storage access...

Post by flolli »

Thanks Werner,

Now everything works fine.

Danke!
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Illegal storage access...

Post by yorik »

I got "illegal storage access" again!
But good news, this time I could track the problem a bit further down...
When I moved away the .FreeCAD folder, a new one got recreated, and everything went normal again.
So I suspected something went wrong in the cfg files. Actually, one of them contains a module file path. I was playing with Jacques's fold module, installing, removing the module, etc. I thought the error occured because there was a Fold module path in my system.cfg, and that folder wasn't there anymore.
But no. I just made some tests, it works fine even if a folder is in the system.cfg file but not on disk.
Unfortunately I can't make the bug happen again now :cry: , but as soon I get it, I come back with more info.
phreak4257

Re: Illegal storage access...

Post by phreak4257 »

So, I too get the message
"Cannot compute Inventor representation for the shape of Cylinder1.
Illegal storage access..."

Or whatever shape I just made

Steps to reproduce:
Make any shape in Part/Part Designer


Installed dependencies:
AMD-64, + nvidia (driver version 180.51)
gcc 4.3.3-r2
glibc 2.10.1
binutils 2.19.1-r1
Python 2.6.2
OpenCasCade 6.3-r1
Qt 4.5.1
Coin3D 2.5.0
ODE 0.11.1
SoQt 1.4.1
Xerces-C 3.0.1
GTS 20081607
Zlib 1.2.3-r1
Boost 1.37.0-r1
OpenCV 1.0.0-r1

cannot get pivy or pythonocc to compile

compililation command/environment for FreeCAD
./configure CXXFLAGS="-fno-strict-aliasing" LDFLAGS=-"Wl,-z,defs" CFLAGS="-O2 -fomit-frame-pointer -msse3 -mmmx -m3dnow -pipe -march=opteron -w" --with-occ-include=/opt/opencascade-6.3/ros/inc --with-occ-lib=/opt/opencascade-6.3/ros/Linux/lib --with-soqt --with-qt4-bin=/usr/bin --with-qt4-include=/usr/include/qt4 --with-qt4-lib=/usr/lib64/qt4 --with-xercesc-include=/usr/include --with-xercesc-lib=/usr/lib64 --with-coin --with-coin=/usr

Any help would be greatly appreciated, thanks! Let me know if you need more info.

Cheers,
PH
phreak4257

Re: Illegal storage access...

Post by phreak4257 »

Starting program: /home/phreak/FreeCAD/bin/FreeCAD
[Thread debugging using libthread_db enabled]
[New Thread 0x7fc3cda50790 (LWP 14525)]
FreeCAD 0.7, Libs: 0.7R1786
(c) Juergen Riegel, Werner Mayer 2001-2009
##### #### ### ####
# # # # # #
# ## #### #### # # # # #
#### # # # # # # # ##### # #
# # #### #### # # # # #
# # # # # # # # # ## ## ##
# # #### #### ### # # #### ## ## ##

Here is the gdb output

This GDB was configured as "x86_64-pc-linux-gnu"...
(gdb) run
Starting program: /home/phreak/FreeCAD/bin/FreeCAD
[Thread debugging using libthread_db enabled]
[New Thread 0x7fc3cda50790 (LWP 14525)]
FreeCAD 0.7, Libs: 0.7R1786
(c) Juergen Riegel, Werner Mayer 2001-2009
.....
warning: Lowest section in /usr/lib64/libicudata.so.42 is .hash at 0000000000000190
[New Thread 0x7fc3a791b910 (LWP 14545)]
Cannot compute Inventor representation for the shape of PartBox.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fc3cda50790 (LWP 14525)]
0x00007fc3c294cef6 in TColgp_Array1OfPnt::Length (this=0xfefdfefdfefd0018) at /opt/opencascade-6.3/ros/inc/TCollection_Array1.lxx:12
12 return myUpperBound - myLowerBound + 1 ;
(gdb) continue
Continuing.
Illegal storage access...
[Thread 0x7fc3a791b910 (LWP 14545) exited]

Program exited with code 03.
wmayer
Founder
Posts: 20305
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Illegal storage access...

Post by wmayer »

Are you using openSuse 64-bit? If so, then I really think there must be a bug in the 64-bit OpenCascade package for Suse. We then should prepare a small test program that reproduces the problem and submit a bug report in the Suse mailing list.
Post Reply