Bug 567672 - Regular Anki crashes after update to PyQt4-4.7
Summary: Regular Anki crashes after update to PyQt4-4.7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: PyQt4
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 566682 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-23 16:12 UTC by niklas.laxstrom
Modified: 2010-03-16 00:46 UTC (History)
4 users (show)

Fixed In Version: anki-0.9.9.8.6-2.fc11
Clone Of:
Environment:
Last Closed: 2010-03-10 06:52:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
bt full when anki crashes (34.15 KB, text/plain)
2010-02-23 16:12 UTC, niklas.laxstrom
no flags Details

Description niklas.laxstrom 2010-02-23 16:12:54 UTC
Created attachment 395755 [details]
bt full when anki crashes

Description of problem:
Crashes silently regularly, for example:
* after repeating few cards
* when trying to sync an open deck

With at least two of my own decks.

With only this printed to console:
> python: Modules/gcmodule.c:277: visit_decref: Assertion `gc->gc.gc_refs != 0' failed.

Possible work-around that seems to work for me and one another user:
* Disable "show systray icon" (translated, not sure about exact wording)
* Restart anki

It hasn't crashed for me (yet) after that.

Version-Release number of selected component (if applicable):
Tested and happens with both:
* anki-0.9.9.8.5 from fedora
* anki-0.9.9.8.6 from upstream


Additional info:
Few backtraces acquired by running anki with GDB:
http://laxstrom.name/anki-python-assert.txt
http://laxstrom.name/anki-python-assert-2.txt
http://laxstrom.name/anki-python-assert-3.txt (also attached)

Comment 1 Christian Krause 2010-02-23 20:07:40 UTC
I can reproduce all described issues (in F13, where the kde 4.4/qt4.6 update was already done).

As you already described, the new upstream version won't help, but turning off the systray icon will make the issue go away.

I'll look into the problem.

Comment 2 Christian Krause 2010-02-23 20:15:15 UTC
*** Bug 566682 has been marked as a duplicate of this bug. ***

Comment 3 Christian Krause 2010-02-23 22:00:55 UTC
just for reference:
http://www.mail-archive.com/pyqt@riverbankcomputing.com/msg20352.html

Comment 4 Christian Krause 2010-02-24 21:11:48 UTC
Since the backtraces indicates an assertion in the native code, the problem seems to be either in the shared objects of PyQt4 or Python itself. In general a bug in the managed code (python script) should never cause an assertion in the native code.

Unfortunately I don't have enough insight to Python / PyQt4's, so I'll have to ask the PyQt4 maintainers for help -> moving the bug report to PyQt4.

I'll be happy to help to solve the problem, so if you have any suggestions where I can start looking, please tell me! ;-)

Comment 5 Christian Krause 2010-02-27 15:03:42 UTC
I have debugged the problem a little bit, and it looks like that registering a python signal handler using a lambda construct causes the problem:

/usr/lib/python2.6/site-packages/ankiqt/ui/tray.py:

mw.connect(self.mw.app, QtCore.SIGNAL("focusChanged(QWidget*,QWidget*)"), lambda old,now: self.focusChanged(old,now))

If I change this line to

mw.connect(self.mw.app, QtCore.SIGNAL("focusChanged(QWidget*,QWidget*)"), self.focusChanged)

the crash does not happen anymore.

Unfortunately I'm not that familiar with Python and/or PyQT to tell why this happens.

@PyQT maintainers: Please can you help me to figure out what would be the correct fix here? Thanks!

Comment 6 Rex Dieter 2010-02-27 15:41:26 UTC
I'd suggest asking on the upstream mailing list for advice:
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Comment 7 Rex Dieter 2010-02-27 17:25:27 UTC
or ask anki upstream too, of course. :)

Comment 8 Christian Krause 2010-02-27 17:36:47 UTC
(In reply to comment #7)
> or ask anki upstream too, of course. :)    

Already did, but upstream can't help either.

(In reply to comment #6)
> I'd suggest asking on the upstream mailing list for advice:
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt    

Somebody else already did, but no answer so far. See comment #3.

Comment 9 Fedora Update System 2010-02-28 19:12:25 UTC
anki-0.9.9.8.6-2.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/F13/FEDORA-2010-2555

Comment 10 Fedora Update System 2010-02-28 19:14:28 UTC
anki-0.9.9.8.6-2.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/F12/FEDORA-2010-2553

Comment 11 Fedora Update System 2010-02-28 19:14:47 UTC
anki-0.9.9.8.6-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/F11/FEDORA-2010-2605

Comment 12 Fedora Update System 2010-03-01 01:40:07 UTC
anki-0.9.9.8.6-2.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update anki'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F13/FEDORA-2010-2555

Comment 13 Fedora Update System 2010-03-02 01:01:28 UTC
anki-0.9.9.8.6-2.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update anki'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-2553

Comment 14 Fedora Update System 2010-03-02 01:05:01 UTC
anki-0.9.9.8.6-2.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update anki'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2010-2605

Comment 15 Fedora Update System 2010-03-10 06:52:17 UTC
anki-0.9.9.8.6-2.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 16 niklas.laxstrom 2010-03-10 13:17:12 UTC
anki-0.9.9.8.6-2.fc12 just crashed for me, while adding new words. It may be a different thing or not, but the frequency of crashes seems to be much less now.

Comment 17 Fedora Update System 2010-03-14 13:45:51 UTC
anki-0.9.9.8.6-2.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2010-03-16 00:46:12 UTC
anki-0.9.9.8.6-2.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.