CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

FATAL ERROR hanging pointer cannot dereference

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By ttsurvase

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 18, 2006, 08:16
Default When I tried to run dieselEngi
  #1
Member
 
Tomislav Sencic
Join Date: Mar 2009
Posts: 42
Rep Power: 17
tsencic is on a distinguished road
When I tried to run dieselEngineFoam on a simulation that run perfectly before I obtained this:

--> FOAM FATAL ERROR : hanging pointer, cannot dereference

From function PtrList::operator[]
in file /home/tom/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/PtrListI.H at line 92.
FOAM aborting

What is the reason? How can I solve the problem?
tsencic is offline   Reply With Quote

Old   September 18, 2006, 08:45
Default Well, this information is not
  #2
Member
 
stefan
Join Date: Mar 2009
Posts: 96
Rep Power: 17
stefanke is on a distinguished road
Well, this information is not enough to say what is going wrong here. Is there no backtrace information available?

Check your dictionary files carefully!
stefanke is offline   Reply With Quote

Old   September 18, 2006, 10:00
Default This is the complete message:
  #3
Member
 
Tomislav Sencic
Join Date: Mar 2009
Posts: 42
Rep Power: 17
tsencic is on a distinguished road
This is the complete message:

Executing: /home/tom/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPOpt/dieselEngineFoam /home/tom/OpenFOAM/tom-1.3/run/. EMD8-spray > /home/tom/OpenFOAM/tom-1.3/run/./EMD8-spray/log &
tom@snjofko:~/OpenFOAM/tom-1.3/run>

--> FOAM FATAL ERROR : hanging pointer, cannot dereference

From function PtrList::operator[]
in file /home/tom/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/PtrListI.H at line 92.

FOAM aborting

Foam::error::printStack(Foam:stream&)
Foam::error::abort()
/home/tom/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPOpt/dieselEngineFoam [0x806fd9a]
/home/tom/OpenFOAM/OpenFOAM-1.3/applications/bin/linuxGcc4DPOpt/dieselEngineFoam [0x805ead2]
__libc_start_main
__gxx_personality_v0

The dictionary files are coppied from a previous, succesfull simulation.
tsencic is offline   Reply With Quote

Old   December 12, 2013, 05:18
Default
  #4
Member
 
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12
zqlhzx is on a distinguished road
Quote:
Originally Posted by tsencic View Post
When I tried to run dieselEngineFoam on a simulation that run perfectly before I obtained this:

--> FOAM FATAL ERROR : hanging pointer, cannot dereference

From function PtrList:perator[]
in file /home/tom/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/PtrListI.H at line 92.
FOAM aborting

What is the reason? How can I solve the problem?
I have the same problem with you,Do you have solver it?
zqlhzx is offline   Reply With Quote

Old   March 27, 2018, 09:47
Default
  #5
New Member
 
Nick
Join Date: Dec 2017
Location: UK
Posts: 7
Rep Power: 8
NICKTAVOUKT is on a distinguished road
Hi all,

I'm getting a similar error with above. To give you some context I have wrote a solver which based on interFoam/waveFoam and combined it with the solid particle class in OF5

when I run it I get the following error:
Quote:
--> FOAM FATAL ERROR:
hanging pointer at index 0 (size 9), cannot dereference
From function const T& Foam::UPtrList<T>:perator[](Foam::label) const [with T = Foam::fvsPatchField<double>; Foam::label = int]
in file /apps/openfoam/5.0.x/gcc/7.2.0/OpenFOAM-5.0/src/OpenFOAM/lnInclude/UPtrListI.H at line 107.
FOAM aborting
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::Boundary::Boundary(Foam:imen sionedField<double, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::Boundary const&) at ??:?
#3 Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::GeometricField(Foam::Geometric Field<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:?
#4 ? at ??:?
#5 __libc_start_main in "/lib64/libc.so.6"
#6 ? at ??:?
could someone kindly explain what UPtrListI.H does?

Thanks,
Nick
NICKTAVOUKT is offline   Reply With Quote

Old   August 2, 2018, 02:40
Default
  #6
Member
 
Join Date: May 2017
Posts: 44
Rep Power: 8
bbita is on a distinguished road
Hi Nick,

I am wondering if you find the solution to this problem. I am experiencing the same issue.

Thanks.
bbita is offline   Reply With Quote

Old   January 23, 2019, 15:25
Default hanging pointer at index 0 (size 3), cannot dereference
  #7
Member
 
Join Date: Apr 2016
Posts: 30
Rep Power: 9
shanvach is on a distinguished road
Hi all,

I have been getting this error while my running twoPhaseEulerFoam code. I have added a file called scalarTransport.H that solves for Scalar Transport Equation in addition to solving of the phases.

My scalarTransport.H is as follows:

Code:
dimensionedScalar dimen 
( 
"dimen", 
dimensionSet(0,0,1,0,0,0,0), 
scalar(1.0) 
); 
dimensionedScalar dimen1 
( 
"dimen1", 
dimensionSet(0,0,-1,0,0,0,0), 
scalar(1.0) 
); 
volTensorField grU_2 = (fvc::grad(U2))*dimen;
volScalarField sc = grU_2 && (grU_2 + grU_2.T());
const scalar a  = 4e-6;

dimensionedScalar dir_ste 
( 
"dir_ste", 
dimensionSet(0,0,2,0,0,0,0), 
scalar(1.0) 
); 
//const scalar a  = 4e-6;
const scalar K = 1;
volScalarField dsid = 0.7*.3*a*a*sc*alpha2*alpha2*dir_ste*dimen1*dimen1;
const scalar dbr = (1.380648e-23)*300/(6*3.142*(1.5e-3)*(4e-6));
volScalarField dbro = ((1.0-alpha2)/(1+0.95*alpha2))*(dbr/K);

volScalarField dnp = (dsid + dbro)*DT; 

		
fvScalarMatrix scalarEqn
             
 (
   		
  fvm::ddt(psi)             
 		
+ fvm::div(phi2,psi)        
 		
- fvm::laplacian(dnp,psi) 
		
);
 

  scalarEqn.solve();
The code compiles correctly but gives the following error at runtime.

Code:
--> FOAM FATAL ERROR: 
hanging pointer at index 0 (size 3), cannot dereference

    From function const T& Foam::UPtrList<T>::operator[](Foam::label) const [with T = Foam::fvPatchField<double>; Foam::label = int]
    in file /usr/local/apps/OpenFOAM/gcc482-v1706/OpenFOAM-v1706/src/OpenFOAM/lnInclude/UPtrListI.H at line 107.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::UPtrList<Foam::fvPatchField<double> >::operator[](int) const at ??:?
#3  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::Boundary(Foam::DimensionedField<double, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary const&) at ??:?
#4  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#5  ? at ??:?
#6  __libc_start_main in "/lib64/libc.so.6"
#7  ? at ??:?
How do I rectify this?
Your help in this matter is greatly appreciated.

Thanks and Regards,
Shantanu
shanvach is offline   Reply With Quote

Old   November 4, 2020, 02:09
Default
  #8
New Member
 
shiyu
Join Date: Mar 2018
Location: london
Posts: 7
Rep Power: 8
shiyu is on a distinguished road
Hi all,
Did anyone figure this problem out? I have exactly the same issue as above.

Thanks in advance.

Cheers,Shiyu
shiyu is offline   Reply With Quote

Old   January 7, 2021, 04:10
Default
  #9
New Member
 
Tushar Survase
Join Date: Nov 2020
Posts: 7
Rep Power: 5
ttsurvase is on a distinguished road
The issue is the pointer created by user is empty or null. Check what is size of pointerlist. In my case, i didnt assigned value to ptrlist and i was calling using[] operator. Hope it helps.
shiyu likes this.
ttsurvase is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hanging pointer fabianpk OpenFOAM Running, Solving & CFD 8 January 28, 2011 11:29
error: null domain pointer alp FLUENT 0 October 31, 2007 12:25
error: null domain pointer Virag FLUENT 0 March 4, 2007 23:56
null pointer error Virag FLUENT 0 March 3, 2007 03:12
Error Msg: Null Domain Pointer Olufemi Ajiboye FLUENT 2 December 4, 2006 20:39


All times are GMT -4. The time now is 22:24.