Kernel crashing when evaluating at the boundary

This may be an stupid question. I was trying to understand the inner workings of Fenics (as I have the feeling that learning by examples I’m all the time bothering you asking for code) and I wrote the following code to plot the basis functions:

from dolfinx.mesh import create_unit_interval
from dolfinx.fem import FunctionSpace, Function

from mpi4py import MPI

D = create_unit_interval( comm = MPI.COMM_WORLD, nx = 10)
H = FunctionSpace( D, ( 'Lagrange', 1 ) )
f = Function(H)

import matplotlib.pyplot as plt 
import numpy as np

def plot_function( f, a, b ):
    N = 101
    x = np.linspace( a, b, N)
    p = np.array([ (x_,0,0) for x_ in x ])
    cells = x // 0.1 
    y = f.eval(p,cells)
    plt.plot(p[:,0], y)
    plt.show()

Now if i call:

f.x.array[1] = 1
plot_function( f, 0, 1 )

the kernel crashes, whereas if I call:

f.x.array[1] = 1
plot_function( f, 0.001, 0.999 )

I get this nice plot:
Captura desde 2023-02-28 04-08-13

Is it expected for the kernel to crash?

Thank you very much!

I cannot reproduce this with ghcr.io/fenics/dolfinx/dolfinx:v0.6.0-r1. The code runs without any crashing.

You are totally right, I’m sorry, I may have missunderstood the reason of a former crash. Should I delete the question?