Calibre crashing on Haiku at start

Bug #1821541 reported by Zoltán Mizsei on 2019-03-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

I'm with the HaikuPorts team, and working on the Calibre port right now. I already upstreamed some required patches 2 years ago, and at that time i got it working nicely, but then the code rusted a bit and calibre changed also plenty ways, so i tried to resurrect the port.
The current recipe with every required dependecnies and patches are here: https://github.com/haikuports/haikuports/pull/2940

For the recipe i using the latest Calibre version, 3.40.1.
Haiku is : hrev53001 x86_64
Python is 2.7.15

The Viewer already working and running, but the main program crashing during the initialization.
See the attached calibre-debug output.

Netifaces and psutil needs platform-specific code to be written, they missing yet, but afaik Calibre should work without them.

I inserted plenty debug printfs, and i think, the crash happens somewherein the gui2/main.py in the start_gui(), precisely at this line:

main.initialize(self.library_path, db, self.listener, self.actions)

At least it doesn't crashing if i comment this line, but the gui doesn't shows up. I tried to follow the code, but i was unable so far.

Any help would be really appreciated.

Zoltán Mizsei (extrowerk) wrote :
Zoltán Mizsei (extrowerk) wrote :

Viewer on Haiku

Kovid Goyal (kovid) wrote :

The initialize function starts on line 218 of gui2/ui.py

Zoltán Mizsei (extrowerk) wrote :

According to my research, it crashing as it tries do divide the screen estate with QSplitters, more precisely in gui2/init.py. I did inserted debug prints around the Calibre code, and the one before got executed, while the one directly after it never, still i may be wrong here.
It hints to me it crashes in the PyQt code, but i may be mistaken here.

I tried to rebuild sip and PyQt, but no dice. Then i noticed, PyQT built with QtOpenGL support, wich is not supported yet on Haiku (and results known crash), so i rebuilt it again without OGL, but still crashing.

// Braindump: According to Debian, Calibre needs OGL and MESA. Does it using OpenGL somewhere? I use Calibre with fully minimalized UI, basicly just a listview, so i don't know how it looks like with clean profile, maybe it have some kind of GL based coverflow in default... Have to check Calibre with a new user on Linux. //

Our SIP port is version 4.19.15 and PyQT is 5.9.1

I should research if PyQT comes with tests, or make a small testcase.

Any idea would be really appreciated.

Kovid Goyal (kovid) wrote :

calibre does not use OpenGL in any way. From your crah log it looks like something inside PyQt. Check the Chimera::fromPyobject function.

Zoltán Mizsei (extrowerk) wrote :

Sorry, my mistake, our PyQt port is 5.12.1

Zoltán Mizsei (extrowerk) wrote :

I just rebuilt SIP and PyQT with debug and tracing enabled, and running calibre returns:

python2: /sources/sip-4.19.15/siplib/siplib.c:9371:sip_api_can_convert_to_type: td == NULL || sipTypeIsClass(td) || sipTypeIsMapped(td)
[1] 1975 SIGKILLTHR /Ports/Inst/Calibre2/bin/calibre

I think this is the real reason, it was just hidden before. I even got a whole debug log.

That looks like an issue in SIP/PyQt, try posting to the PyQt mailing
list for help.

 status invalid

Changed in calibre:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers