Friday, January 9, 2015

cx_Freeze and Nuitka non-progress, Cobro first crash

Started the day by trying to do detailed analysis of the Nuitka crash. For the record, this is the minimal test case.

#from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QCoreApplication
from PyQt5.QtCore import QSettings
import sys
app = QCoreApplication([])
app.setOrganizationName("BOGUS_NAME")
app.setOrganizationDomain("bogosity.com")
app.setApplicationName("BOGUS")
settings = QSettings()
byte_string = b'\xde\xad\xbe\xef' # or 'just plain characters'
settings.clear()
settings.setValue('bogus_byte_string',byte_string)
settings.sync()
return_string = settings.value('bogus_byte_string',b'\x00\x00\x00\x00')
if sys.version_info >= (3,):
    assert return_string == byte_string, (repr(return_string), "!=", byte_string)
print("OK.")

If the byte_string variable has plain characters, not a bytes value, it runs and prints "OK". With the bytes value, it dies with a segfault inside the pickle module, while executing the QSettings.value() function. Probably while PyQt is trying to coerce a QByteArray back into a Python bytes()—although why inahell it needs pickle for that is a mystery.

Anyway I tried all the variations that Kay Hayer had suggested (none helped) and sent in a detailed report.


Yesterday I downloaded and tried cx_freeze on Cobro. It generated some ominous looking compiler warnings during installation; and then when I ran it, it died looking for /opt/local/lib/zlib.dylib or such. There is no path "/opt" on this machine. There does exist a /usr/local/lib/zlib.dylib. So I wrote two short notes to the cx-freeze mailing list describing these issues. No response after 24+ hours.


Today when I ran it, Cobro had its first actual crash under Qt5.4. From the crash report the call sequence (innermost or most-recent first) was:

WebCore::ResourceLoader::ResourceLoader()
WebCore::NetscapePlugInStreamLoader::create()
WebCore::ResourceLoadScheduler::schedulePluginStreamLoad()
WebCore::PluginStream::start()
WebCore::PluginView::performRequest()
WebCore::PluginView::requestTimerFired()
WebCore::ThreadTimers::sharedTimerFiredInternal()
QObject::event()
QApplicationPrivate::notify_helper()
QApplication::notify()
sipQApplication::notify()
QCoreApplication::notifyInternal()
QTimerInfoList::activateTimers()
libqcocoa.dylib QCocoaEventDispatcherPrivate::activateTimersSourceCallback(void*)
etc, etc

In other words, a timer popped, and WebCore tried to load a plug-in (a Netscape plug-in??) and died. I would love to set plug-ins disabled, but too many web comics rely on Flash. Anyway, this is a new crash, it never occurred in the log I kept of the many Qt5.3 Webkit crashes. And it's pretty depressing that it happened at all. I just don't know what to do with Cobro. I had a dream of releasing it to the world, promoting it on reddit and elsewhere, getting universal acclaim.

Ain't gonna get no universal acclaim from something that frequently segfaults. Just be a pain in the ass fielding trouble reports about which I can do abso-bloody-lutely nothing because they just happen deep inside WebKit.

I gotta think harder about, could I use WebEngine even lacking the features it does...

No comments: