I encountered this example on statlect.com and the screenshot of it is as follows

It took me a while to figure out why $P(X=1)=1/2$. I don't have much experience dealing with distribution functions with both discrete and continuous parts. So I am not sure if it is legal to conclude contradiction does arise when doing the following operations:
PDF of $X$ is $f(x) = 1/2$ when $x \in (1,2)$. In addition $f(1)=1/2$. Therefore $f(x)$ is continuous on $[1,2)$. That makes $\int_{1}^{2}f(x)=\frac{1}{2}$. However, that would make $f(x)$ not a legitimate PDF and it would only make sense to do $\int_1^{2}f(x)+f(1) = 1$. But does it mean we have different results when we integrate $f(x)$ on $(1,2]$ and $[1,2]$? How can this happen?
Some digression: I am actually not sure how $f(x)$ should behave when $x=2$ since $F(x)$ can not be differentiated at that point.
Note that $$f(x) = \frac{d}{dx}F(x).$$ Consequently, we have $$f(1) = \frac{1}{2}\delta(x),$$ where $\delta(x)$ is the Dirac delta function. Also, $$\int_{1^-}^{2} f(x) dx = \int_{1^-}^{1^+} \frac{\delta(x)}{2}dx + \int_{1^{+}}^{2} f(x) dx = \frac{1}{2} + \frac{1}{2}=1.$$
For more information, check out this website about mixed random variables.