View Issue Details

IDProjectCategoryView StatusLast Update
0002892FreeCADBugpublic2017-07-22 10:21
Reporterruchg Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionunable to reproduce 
PlatformLinuxOSFedoraOS Version25
Product Version0.16 
Summary0002892: Python help() modules causes crash
DescriptionIn the Python console entering help() and then modules causes FreeCAD to crash, closing gui

From the Python console, on start of FreeCAD:
Python 2.7.13 (default, Jan 12 2017, 17:59:37)
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2
Type 'help', 'copyright', 'credits' or 'license' for more information.

From a terminal window I can start a Python interpreter and issue the same commands and it does not crash
ruchg@linuxHost ~]$ python
Python 2.7.13 (default, Jan 12 2017, 17:59:37)
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help()

Welcome to Python 2.7! This is the online help utility.

<<snip>>

help> modules

Please wait a moment while I gather a list of all available modules...

dm.c: 1693: not running as root returning empty list
linux; GNU C++ version 6.2.1 20160916 (Red Hat 6.2.1-2); Boost_106000; UHD_003.010.001.000-0-unknown

/usr/lib64/python2.7/site-packages/matplotlib/cbook.py:137: MatplotlibDeprecationWarning: The matplotlib.delaunay module was deprecated in version 1.4. Use matplotlib.tri.Triangulation instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)
BaseHTTPServer bsddb inspect resource
Bastion bz2 io rexec
CDROM cPickle ipaddress rfc822
CGIHTTPServer cProfile itertools rlcompleter
CORBA cStringIO jinja2 robotparser
<<snip>>
bonobo importlib repr zipfile
boto imputil requests zipimport
bs4 iniparse requests_kerberos zlib

Enter any module name to get more help. Or, type "modules spam" to search
for modules whose descriptions contain the word "spam".

help>

Steps To ReproduceOpen FreeCAD gui

In Python console type: help() <enter>

After help messages display type: modules <enter>

FreeCAD crashes, gui window shuts down

Additional InformationOS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.Unknown
Build type: Unknown
Python version: 2.7.11
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17
Tagsconsole, packaging, upstream
FreeCAD Information

Activities

Kunda1

2017-02-07 12:15

administrator   ~0008231

Please post to a forum thread and bidirectionally link ticket <=> thread

wmayer

2017-02-07 13:39

administrator   ~0008232

I can't confirm a crash.

Could you run FreeCAD in the debugger to get the callstack?

gdb ./FreeCAD
run
# crash...
bt

ruchg

2017-02-08 12:51

reporter   ~0008241

As requested; forum post: http://forum.freecadweb.org/viewtopic.php?f=22&t=20548

Additionally I ran from a terminal window and saw an additional error message:
*** Abort *** an exception was raised, but no catch was found.
    ... The exception is:SIGSEGV 'segmentation violation' detected. Address 0

FreeCAD gui does not crash in the debuger. Nor does the modules command produce any output. The gui seems locked up trying to select the top menu File or change the Workbench returns nothing. Nor can I close the gui window.

(gdb) bt
#0 0x00007fff10c939d5 in init_libpycomps ()
    at /usr/lib64/python2.7/site-packages/libcomps/_libpycomps.so
#1 0x00007ffff66d15fc in _PyImport_LoadDynamicModule (name=name@entry=0x6181d80 "libcomps._libpycomps", pathname=pathname@entry=0x617b0d0 "/usr/lib64/python2.7/site-packages/libcomps/_libpycomps.so", fp=<optimized out>) at /usr/src/debug/Python-2.7.13/Python/importdl.c:53
0000002 0x00007ffff66cf383 in load_module (name=name@entry=0x6181d80 "libcomps._libpycomps", fp=<optimized out>, pathname=pathname@entry=0x617b0d0 "/usr/lib64/python2.7/site-packages/libcomps/_libpycomps.so", type=<optimized out>, loader=<optimized out>)
    at /usr/src/debug/Python-2.7.13/Python/import.c:1937
0000003 0x00007ffff66cf641 in import_submodule (mod=mod@entry=<module at remote 0x7fff13abf8d8>, subname=subname@entry=0x6181d89 "_libpycomps", fullname=fullname@entry=0x6181d80 "libcomps._libpycomps")
    at /usr/src/debug/Python-2.7.13/Python/import.c:2725
0000004 0x00007ffff66cf8ba in load_next (mod=mod@entry=<module at remote 0x7fff13abf8d8>, altmod=<module at remote 0x7fff13abf8d8>, p_name=p_name@entry=0x7fffffff9ff8, buf=buf@entry=0x6181d80 "libcomps._libpycomps", p_buflen=p_buflen@entry=0x7fffffffa000)
    at /usr/src/debug/Python-2.7.13/Python/import.c:2539
0000005 0x00007ffff66d02a3 in import_module_level (locals=<optimized out>, level=<optimized out>, fromlist=('*',), globals=<optimized out>, name=<optimized out>)
    at /usr/src/debug/Python-2.7.13/Python/import.c:2247
0000006 0x00007ffff66d02a3 in PyImport_ImportModuleLevel (name=<optimized out>, globals=<optimized out>, locals=<optimized out>, fromlist=('*',), level=<optimized out>)
    at /usr/src/debug/Python-2.7.13/Python/import.c:2312
0000007 0x00007ffff66b2fb8 in builtin___import__ (self=<optimized out>, args=<optimized out>, kwds=<optim---Type <return> to continue, or q <return> to quit---

Kunda1

2017-03-03 07:10

administrator   ~0008526

@wmayer does this bt help you decipher the issue?

looo

2017-03-09 08:06

developer   ~0008587

#0 0x00007fff10c939d5 in init_libpycomps ()
    at /usr/lib64/python2.7/site-packages/libcomps/_libpycomps.so

seems to be not related to freecad.
https://github.com/rpm-software-management/libcomps

Kunda1

2017-06-15 16:36

administrator   ~0009389

@sgrogan1 can you weigh in on this?

user2853

2017-06-15 20:54

  ~0009391

I can't reproduce with:
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11300 (Git)
Build type: Release
Branch: master
Hash: 294551a2fb3a8e4a67e9013217af4d65fdcf30ae
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
or same version from Ubuntu PPA
So I agree with looo that this seems not to be a FreeCAD bug.

Kunda1

2017-06-15 21:27

administrator   ~0009394

Resolving
Tagged this as 'packaging' JIC

Kunda1

2017-06-29 16:52

administrator   ~0009612

@looo can you reproduce?

Kunda1

2017-06-30 14:18

administrator   ~0009623

@yorik maybe we can create a unittest that test this type of scenario?

yorik

2017-07-01 16:23

administrator   ~0009641

This seems a very particular issue, that seems hard to reproduce (probably some specific module/version combination), and furthermore that seems to originate from modules not directly controlled by freecad. We cannot write unit test for all these possible scenarios I think, there would be thousands.

Issue History

Date Modified Username Field Change
2017-02-07 11:41 ruchg New Issue
2017-02-07 12:15 Kunda1 Note Added: 0008231
2017-02-07 12:15 Kunda1 Status new => feedback
2017-02-07 13:39 wmayer Note Added: 0008232
2017-02-08 12:51 ruchg Note Added: 0008241
2017-02-08 12:51 ruchg Status feedback => new
2017-02-09 22:14 Kunda1 Status new => feedback
2017-03-03 07:10 Kunda1 Note Added: 0008526
2017-03-09 08:06 looo Note Added: 0008587
2017-03-10 06:27 Kunda1 Tag Attached: console
2017-06-15 16:36 Kunda1 Note Added: 0009389
2017-06-15 20:54 user2853 Note Added: 0009391
2017-06-15 21:25 Kunda1 Tag Attached: packaging
2017-06-15 21:27 Kunda1 Status feedback => resolved
2017-06-15 21:27 Kunda1 Resolution open => unable to reproduce
2017-06-15 21:27 Kunda1 Note Added: 0009394
2017-06-29 16:52 Kunda1 Note Added: 0009612
2017-06-30 14:18 Kunda1 Note Added: 0009623
2017-07-01 16:23 yorik Note Added: 0009641
2017-07-22 10:21 Kunda1 Tag Attached: upstream
2017-07-22 10:21 Kunda1 Status resolved => closed