(Python) dolfin crashes when trying to access <class 'dolfin.cpp.PETScMatrix'>.size(n) with wrong index n

Bug #889173 reported by Hans Fangohr
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Fix Released
Undecided
Anders Logg

Bug Description

Dear dolfin/fenics team,

I expect the following error should be caught when triggered from the Python interface?

Best wishes,

Hans

from dolfin import PETScMatrix
J=PETScMatrix()
J.size(0) #is 0
J.size(1) #is 0
J.size(2) #results in following:

python: /build/buildd/dolfin-1.0-beta2/dolfin/la/PETScBaseMatrix.cpp:33: dolfin::uint dolfin::PETScBaseMatrix::size(dolfin::uint) const: Assertion `dim <= 1' failed.
[osiris:08014] *** Process received signal ***
[osiris:08014] Signal: Aborted (6)
[osiris:08014] Signal code: (-6)
[osiris:08014] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x10060) [0x7f6f3970f060]
[osiris:08014] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f6f384f33a5]
[osiris:08014] [ 2] /lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7f6f384f6b0b]
[osiris:08014] [ 3] /lib/x86_64-linux-gnu/libc.so.6(__assert_fail+0xdd) [0x7f6f384ebd4d]
[osiris:08014] [ 4] /usr/lib/libdolfin.so.1.0(+0x31a0c9) [0x7f6f1e6b50c9]
[osiris:08014] [ 5] /usr/lib/python2.7/dist-packages/dolfin/_cpp.so(+0x120dc3) [0x7f6f1eb77dc3]
[osiris:08014] [ 6] python(PyEval_EvalFrameEx+0x43f6) [0x4ba666]
[osiris:08014] [ 7] python(PyEval_EvalCodeEx+0x13d) [0x4bcd2d]
[osiris:08014] [ 8] python(PyEval_EvalCode+0x32) [0x4bd802]
[osiris:08014] [ 9] python(PyEval_EvalFrameEx+0x339b) [0x4b960b]
[osiris:08014] [10] python(PyEval_EvalCodeEx+0x13d) [0x4bcd2d]
[osiris:08014] [11] python(PyEval_EvalFrameEx+0x7eb) [0x4b6a5b]
[osiris:08014] [12] python(PyEval_EvalCodeEx+0x13d) [0x4bcd2d]
[osiris:08014] [13] python(PyEval_EvalFrameEx+0x7eb) [0x4b6a5b]
[osiris:08014] [14] python(PyEval_EvalFrameEx+0xb07) [0x4b6d77]
[osiris:08014] [15] python(PyEval_EvalCodeEx+0x13d) [0x4bcd2d]
[osiris:08014] [16] python(PyEval_EvalFrameEx+0x7eb) [0x4b6a5b]
[osiris:08014] [17] python(PyEval_EvalCodeEx+0x13d) [0x4bcd2d]
[osiris:08014] [18] python(PyEval_EvalFrameEx+0x7eb) [0x4b6a5b]
[osiris:08014] [19] python(PyEval_EvalCodeEx+0x13d) [0x4bcd2d]
[osiris:08014] [20] python(PyEval_EvalFrameEx+0x7eb) [0x4b6a5b]
[osiris:08014] [21] python(PyEval_EvalCodeEx+0x13d) [0x4bcd2d]
[osiris:08014] [22] python(PyEval_EvalCode+0x32) [0x4bd802]
[osiris:08014] [23] python() [0x4dcc22]
[osiris:08014] [24] python(PyRun_FileExFlags+0x84) [0x4dd7e4]
[osiris:08014] [25] python(PyRun_SimpleFileExFlags+0x17e) [0x4de2ee]
[osiris:08014] [26] python(Py_Main+0x4fd) [0x4ee6dd]
[osiris:08014] [27] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7f6f384de30d]
[osiris:08014] [28] python() [0x41cb69]
[osiris:08014] *** End of error message ***
Aborted

Anders Logg (logg)
Changed in dolfin:
assignee: nobody → Anders Logg (logg)
status: New → Confirmed
milestone: none → 1.0-rc1
Revision history for this message
Anders Logg (logg) wrote :

Fixed in 1.0.x-logg

Changed in dolfin:
status: Confirmed → In Progress
Anders Logg (logg)
Changed in dolfin:
status: In Progress → Fix Committed
Anders Logg (logg)
Changed in dolfin:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.