Link
From the report in the link: Brazil had to suspend a trial of hydroxychloroquine after too many participants were developing heart arrhythmia.
So much for the link, now: I am not a doctor or a research scientist, so don't put too much faith in what I say below. It is a layman's comment and not that of a qualified expert.
From what I read, it seemed that even in the "successful" reports of hydroxychloroquine, it only helped those with mild symptoms and then speeded their recovery. (A later Chinese report suggested that it might not have any effect.) It could well have been that the Brazilian team was trying higher dosages (they had been doing that) in an attempt to see if the drug would then have a more successful impact with an increased dosage. Heart problems were a rare, but known side effect of lower dosages. The higher dosages might just have increased the frequency of that side effect. (Again, this is a layperson's speculation.)