HumanSignal / labelImg

LabelImg is now part of the Label Studio community. The popular image annotation tool created by Tzutalin is no longer actively being developed, but you can check out Label Studio, the open source data labeling tool for images, text, hypertext, audio, video and time-series data.
https://youtu.be/p0nR2YsCY_U
MIT License
22.56k stars 6.27k forks source link

Segmentation fault (core dumped) - program crash #945

Open luizcast opened 2 years ago

luizcast commented 2 years ago

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?

sammiee5311 commented 2 years ago

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

SperenzaNarra commented 2 years ago

you need to use python3.8

kevin192291 commented 2 years ago

Is there a fix coming any time soon?

cy954188536 commented 1 year ago

I got the same problem, did you solve it?

HuyPham55 commented 1 year ago

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'
garrettkajmowicz commented 1 year ago

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

rokopi-byte commented 1 year ago

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 commented 1 year ago

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

PandaBatera007 commented 1 year ago

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)
esraa-abdelmaksoud commented 1 year ago

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.

kkedich commented 11 months ago

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