A function
g
:
R
n
→
R
g\colon \mathbb {R}^n\to \mathbb {R}
is linearly continuous provided its restriction
g
↾
ℓ
g\restriction \ell
to every straight line
ℓ
⊂
R
n
\ell \subset \mathbb {R}^n
is continuous. It is known that the set
D
(
g
)
D(g)
of points of discontinuity of any linearly continuous
g
:
R
n
→
R
g\colon \mathbb {R}^n\to \mathbb {R}
is a countable union of isometric copies of (the graphs of)
f
↾
P
f\restriction P
, where
f
:
R
n
−
1
→
R
f\colon \mathbb {R}^{n-1}\to \mathbb {R}
is Lipschitz and
P
⊂
R
n
−
1
P\subset \mathbb {R}^{n-1}
is compact nowhere dense. On the other hand, for every twice continuously differentiable function
f
:
R
→
R
f\colon \mathbb {R}\to \mathbb {R}
and every nowhere dense perfect
P
⊂
R
P\subset \mathbb {R}
there is a linearly continuous
g
:
R
2
→
R
g\colon \mathbb {R}^2\to \mathbb {R}
with
D
(
g
)
=
f
↾
P
D(g)=f\restriction P
. The goal of this paper is to show that this last statement fails, if we do not assume that
f
f
is continuous. More specifically, we show that this failure occurs for every continuously differentiable function
f
:
R
→
R
f\colon \mathbb {R}\to \mathbb {R}
with nowhere monotone derivative, which includes twice differentiable functions
f
f
with such property. This generalizes a recent result of professor Luděk Zajíček [On sets of discontinuities of functions continuous on all lines, arxiv.org/abs/2201.00772v1, 2022] and fully solves a problem from a 2013 paper of the first author and Timothy Glatzer [Real Anal. Exchange 38 (2012/13), pp. 377–389].