src/fflib/lgmat.cpp:1738: error: NULL_DEREFERENCE pointer `a` last assigned on line 1736 could be null and is dereferenced at line 1738, column 54. Showing all 20 steps of the trace src/fflib/lgmat.cpp:1735:1: start of procedure get_elementp2mc() 1733. 1734. template 1735. > R * get_elementp2mc(Matrice_Creuse * const & ac,const long & b,const long & c){ 1736. MatriceCreuse * a= ac ? ac->A:0 ; 1737. if( !a || a->n <= b || c<0 || a->m <= c ) src/fflib/lgmat.cpp:1736:26: Condition is true 1734. template 1735. R * get_elementp2mc(Matrice_Creuse * const & ac,const long & b,const long & c){ 1736. MatriceCreuse * a= ac ? ac->A:0 ; ^ 1737. if( !a || a->n <= b || c<0 || a->m <= c ) 1738. { cerr << " Out of bound 0 <=" << b << " < " << a->n << ", 0 <= " << c << " < " << a->m src/femlib/RefCounter.hpp:89:2: start of procedure CountPointer 87. CountPointer( T * a,bool mmaster=false) :c(a) { if(!mmaster) add(c);} 88. CountPointer( T & a) :c(&a) { add(c);} 89. CountPointer(const CountPointer & a) :c(a.c) { add(c);} ^ 90. ~CountPointer() { destroyPtr(c);c=0;} 91. //void destroy() const { destroyPtr(c);} src/femlib/RefCounter.hpp:89:53: 87. CountPointer( T * a,bool mmaster=false) :c(a) { if(!mmaster) add(c);} 88. CountPointer( T & a) :c(&a) { add(c);} 89. > CountPointer(const CountPointer & a) :c(a.c) { add(c);} 90. ~CountPointer() { destroyPtr(c);c=0;} 91. //void destroy() const { destroyPtr(c);} src/femlib/RefCounter.hpp:45:7: start of procedure baseCountPointer 43. // ruse pour utiliser le prive c RefCounter de 44. // pas de syntaxe pour des friends template 45. class baseCountPointer { protected: ^ 46. void add(const RefCounter * c) const; 47. void destroyPtr(const RefCounter * c) const; src/femlib/RefCounter.hpp:45:7: return from a call to baseCountPointer_baseCountPointer 43. // ruse pour utiliser le prive c RefCounter de 44. // pas de syntaxe pour des friends template 45. class baseCountPointer { protected: ^ 46. void add(const RefCounter * c) const; 47. void destroyPtr(const RefCounter * c) const; src/femlib/RefCounter.hpp:89:40: 87. CountPointer( T * a,bool mmaster=false) :c(a) { if(!mmaster) add(c);} 88. CountPointer( T & a) :c(&a) { add(c);} 89. > CountPointer(const CountPointer & a) :c(a.c) { add(c);} 90. ~CountPointer() { destroyPtr(c);c=0;} 91. //void destroy() const { destroyPtr(c);} src/femlib/RefCounter.hpp:89:49: 87. CountPointer( T * a,bool mmaster=false) :c(a) { if(!mmaster) add(c);} 88. CountPointer( T & a) :c(&a) { add(c);} 89. > CountPointer(const CountPointer & a) :c(a.c) { add(c);} 90. ~CountPointer() { destroyPtr(c);c=0;} 91. //void destroy() const { destroyPtr(c);} src/femlib/RefCounter.hpp:77:1: start of procedure add 75. }; 76. 77. > inline void baseCountPointer::add(const RefCounter * c) const 78. { if (c) c->count++;} 79. inline void baseCountPointer::destroyPtr(const RefCounter * c) const src/femlib/RefCounter.hpp:78:10: Taking true branch 76. 77. inline void baseCountPointer::add(const RefCounter * c) const 78. { if (c) c->count++;} ^ 79. inline void baseCountPointer::destroyPtr(const RefCounter * c) const 80. { if (c) c->destroy();} src/femlib/RefCounter.hpp:78:13: 76. 77. inline void baseCountPointer::add(const RefCounter * c) const 78. > { if (c) c->count++;} 79. inline void baseCountPointer::destroyPtr(const RefCounter * c) const 80. { if (c) c->destroy();} src/femlib/RefCounter.hpp:78:6: 76. 77. inline void baseCountPointer::add(const RefCounter * c) const 78. > { if (c) c->count++;} 79. inline void baseCountPointer::destroyPtr(const RefCounter * c) const 80. { if (c) c->destroy();} src/femlib/RefCounter.hpp:78:24: return from a call to baseCountPointer_add 76. 77. inline void baseCountPointer::add(const RefCounter * c) const 78. { if (c) c->count++;} ^ 79. inline void baseCountPointer::destroyPtr(const RefCounter * c) const 80. { if (c) c->destroy();} src/femlib/RefCounter.hpp:89:56: return from a call to CountPointer>_CountPointer 87. CountPointer( T * a,bool mmaster=false) :c(a) { if(!mmaster) add(c);} 88. CountPointer( T & a) :c(&a) { add(c);} 89. CountPointer(const CountPointer & a) :c(a.c) { add(c);} ^ 90. ~CountPointer() { destroyPtr(c);c=0;} 91. //void destroy() const { destroyPtr(c);} src/fflib/lgmat.cpp:1736:4: 1734. template 1735. R * get_elementp2mc(Matrice_Creuse * const & ac,const long & b,const long & c){ 1736. > MatriceCreuse * a= ac ? ac->A:0 ; 1737. if( !a || a->n <= b || c<0 || a->m <= c ) 1738. { cerr << " Out of bound 0 <=" << b << " < " << a->n << ", 0 <= " << c << " < " << a->m src/femlib/RefCounter.hpp:93:2: start of procedure operator_MatriceCreuse_* 91. //void destroy() const { destroyPtr(c);} 92. void destroy() { destroyPtr(c);c=0;} 93. operator T * () const { return c;} ^ 94. operator T & () const {return *c;} 95. T& operator*() const {return *c;} src/femlib/RefCounter.hpp:93:29: 91. //void destroy() const { destroyPtr(c);} 92. void destroy() { destroyPtr(c);c=0;} 93. > operator T * () const { return c;} 94. operator T & () const {return *c;} 95. T& operator*() const {return *c;} src/femlib/RefCounter.hpp:93:38: return from a call to CountPointer>_operator_MatriceCreuse_* 91. //void destroy() const { destroyPtr(c);} 92. void destroy() { destroyPtr(c);c=0;} 93. operator T * () const { return c;} ^ 94. operator T & () const {return *c;} 95. T& operator*() const {return *c;} src/fflib/lgmat.cpp:1737:9: Taking true branch 1735. R * get_elementp2mc(Matrice_Creuse * const & ac,const long & b,const long & c){ 1736. MatriceCreuse * a= ac ? ac->A:0 ; 1737. if( !a || a->n <= b || c<0 || a->m <= c ) ^ 1738. { cerr << " Out of bound 0 <=" << b << " < " << a->n << ", 0 <= " << c << " < " << a->m 1739. << " Matrix type = " << typeid(ac).name() << endl; src/fflib/lgmat.cpp:1738:6: Skipping std::operator<<_>(): function or method not found 1736. MatriceCreuse * a= ac ? ac->A:0 ; 1737. if( !a || a->n <= b || c<0 || a->m <= c ) 1738. { cerr << " Out of bound 0 <=" << b << " < " << a->n << ", 0 <= " << c << " < " << a->m ^ 1739. << " Matrix type = " << typeid(ac).name() << endl; 1740. cerr << ac << " " << a << endl;