labelImg icon indicating copy to clipboard operation
labelImg copied to clipboard

Segmentation fault (core dumped) - program crash

Open luizcast opened this issue 3 years ago • 11 comments

Someone?

'TypeError: setValue(self, int): argument 1 has unexpected type 'float' Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/labelImg/labelImg.py", line 965, in scroll_request bar.setValue(bar.value() + bar.singleStep() * units) TypeError: setValue(self, int): argument 1 has unexpected type 'float' Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/libs/canvas.py", line 530, in paintEvent p.drawLine(self.prev_point.x(), 0, self.prev_point.x(), self.pixmap.height()) TypeError: arguments did not match any overloaded call: drawLine(self, QLineF): argument 1 has unexpected type 'float' drawLine(self, QLine): argument 1 has unexpected type 'float' drawLine(self, int, int, int, int): argument 1 has unexpected type 'float' drawLine(self, QPoint, QPoint): argument 1 has unexpected type 'float' drawLine(self, Union[QPointF, QPoint], Union[QPointF, QPoint]): argument 1 has unexpected type 'float' QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it? QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it? QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it? QPainter::begin: Painter already active Segmentation fault`

why?

  • ubuntu22.04
  • pyqt5
  • python3.10

luizcast avatar Sep 16 '22 23:09 luizcast

Did you use following code to install pip install labelImg ? Because there is a bug to install with pip.

sammiee5311 avatar Sep 17 '22 02:09 sammiee5311

you need to use python3.8

SperenzaNarra avatar Sep 19 '22 09:09 SperenzaNarra

Is there a fix coming any time soon?

kevin192291 avatar Sep 20 '22 15:09 kevin192291

I got the same problem, did you solve it?

cy954188536 avatar Oct 13 '22 15:10 cy954188536

I met the same problem, can't create any ractangle for labeling at all

 p.drawLine(self.prev_point.x(), 0, self.prev_point.x(), self.pixmap.height())
TypeError: arguments did not match any overloaded call:
  drawLine(self, QLineF): argument 1 has unexpected type 'float'
  drawLine(self, QLine): argument 1 has unexpected type 'float'
  drawLine(self, int, int, int, int): argument 1 has unexpected type 'float'
  drawLine(self, QPoint, QPoint): argument 1 has unexpected type 'float'
  drawLine(self, Union[QPointF, QPoint], Union[QPointF, QPoint]): argument 1 has unexpected type 'float'

HuyPham55 avatar Oct 20 '22 10:10 HuyPham55

I'm running into the same thing now that I upgraded to Ubuntu 22.04. installed via pip Python 3.10.6 PyQt5 5.15.7 PyQt5-Qt5 5.15.2 PyQt5-sip 12.11.0 labelImg 1.8.6

garrettkajmowicz avatar Dec 06 '22 01:12 garrettkajmowicz

Same here: Python 3.10.6 labelImg 1.8.6

Creating a rectangle (just press w) makes the program crash with that error. Any fix ?

rokopi-byte avatar Dec 15 '22 10:12 rokopi-byte

It's a duplicate of this. There is also a workaround.

rokopi-byte avatar Dec 15 '22 10:12 rokopi-byte

estou com o mesmo problema:

I have the same problem:

Traceback (most recent call last):
  File "/home/Joao_Pedro_Uchoa/.local/lib/python3.10/site-packages/libs/canvas.py", line 530, in paintEvent
    p.drawLine(self.prev_point.x(), 0, self.prev_point.x(), self.pixmap.height())
TypeError: arguments did not match any overloaded call:
  drawLine(self, QLineF): argument 1 has unexpected type 'float'
  drawLine(self, QLine): argument 1 has unexpected type 'float'
  drawLine(self, int, int, int, int): argument 1 has unexpected type 'float'
  drawLine(self, QPoint, QPoint): argument 1 has unexpected type 'float'
  drawLine(self, Union[QPointF, QPoint], Union[QPointF, QPoint]): argument 1 has unexpected type 'float'
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?
QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?
QPainter::begin: Painter already active
Falha de segmentação (imagem do núcleo gravada)

PandaBatera007 avatar Jan 09 '23 13:01 PandaBatera007

I faced the same issue. The error was because of a dependency conflict in Ubuntu 22.04. Creating a virtual environment for labelImg solved this problem.

esraa-abdelmaksoud avatar Mar 14 '23 19:03 esraa-abdelmaksoud

Same as @esraa-abdelmaksoud and this comment. Installing a separate environment was enough to not see the error again. My setup: Ubuntu 22.04 and python 3.11.5

conda create -n labelImg python=3.8
pip3 install labelImg

kkedich avatar Oct 30 '23 13:10 kkedich