Segmentation falut (core dumped)

Bug #1208878 reported by Seungcheol Yeom
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Fix Released
Undecided
Bruno Chareyre

Bug Description

Hello,

I am using yade-daily and I think I found a bug something like "Segmentation falut (core dumped)" when I ran a script below:

from yade import plot,qt

r = 0.003 #particle radius of typical clay
h = 0.001 #praticle distance

#create two sphere paticles#
O.bodies.append([
   utils.sphere(center=(0,0,0),radius=r,fixed=False),
   utils.sphere((0,0,2*r+h),r)
])

#define engines#
O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(aabbEnlargeFactor=2)]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=2)],
      [Ip2_FrictMat_FrictMat_CapillaryPhys()],
      [Law2_ScGeom_FrictPhys_CundallStrack(neverErase=True)]
   ),
   Law2_ScGeom_CapillaryPhys_Capillarity(capillaryPressure=10000,label='Cap'),
   CapillaryStressRecorder(file='capillary pressure',iterPeriod=100),
   NewtonIntegrator(damping=0.4,gravity=(0,0,0)),
   PyRunner(iterPeriod=100,command='addPlotData()')
]

Cap.createDistantMeniscii=True
O.run(1,True)
Cap.createDistantMeniscii=False

def addPlotData():
 d0 = O.bodies[0].state.displ()
 d1 = O.bodies[1].state.displ()
 plot.addData(i=O.iter,b0displ=d0[2],b1displ=d1[2])

plot.plots={'i':('b0displ')}
plot.plot()
plot.live=True
plot.autozoom=True
O.dt=0.5*PWaveTimeStep()
qt.View()
O.saveTmp()

Revision history for this message
Anton Gladky (gladky-anton) wrote : Re: [Bug 1208878] [NEW] Segmentation falut (core dumped)

Bruno, could, you, please, have a look here [1]?

Real V = ( triaxialCompressionEngine->height ) * (
triaxialCompressionEngine->width ) * (
triaxialCompressionEngine->depth );

It seems, the variable V gets NaN or something like that.

[1] https://github.com/yade/trunk/blob/master/pkg/dem/CapillaryStressRecorder.cpp#L107

Thanks,

Anton

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Fixed. Thank you Seungcheol Yeom for reporting, and Anton for pointer.
https://github.com/yade/trunk/commit/376c2efff2d284b6f10d5b285253554c1eba3e25

Note that the script will still not work. It will return an error message. At least not a segfault.
The problem is this recorder depends on TriaxialCompressionEngine, which you don't have, this is what the error message will say.

In fact both TriaxialCompressionEngine and capillaryStressRecorder make no sense in a 2-sphere problem.

Changed in yade:
assignee: nobody → Bruno Chareyre (bruno-chareyre)
status: New → 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.