We stopped in Barca 4 yrs ago and we sail again from there on 11th August.
I too was told that we should be wary when we were there and went, filled with trepidation. However, if, as we did, you take sensible precautions you should be fine. It's the same as any other big city. When on Ramblas take care of your purse as there are pickpockets about, just as anywhere else. "Haggling" in some of the shops down Rambla, is expected!
We had a wonderful time in Barca and we are really looking forward to our return.Make sure you go to the Gaudi cathedral and climb the steps, it is a wonderful sight from the top (if you can do heights!!).
Opposite, there is a small stall selling drinks and it is a super place to people watch. There is usually some sort of street entertainment on there too.
The port area is worth a visit, with bars and shopping available.
Not sure if it is your cup of tea, but my son and I will be paying a visit to the Nou Camp Stadium, home top Barcelona Football Club.
Have a wonderful time when you are there and be worry and stress free. There are bad folk everywhere, but they are far outweighed by the good.
The train journey is pain free and doesn't take very long. A taxi is about 25 euros.