Today I decided to update my Windows build, stale by about a month, and got a crash on startup :(
Recompiled from scratch, removed compiler optimization. Still crash.
Debugging showed a very strange thing. There was this method in desktop.h:
void registerEditWidget (Inkscape::UI::View::EditWidgetInterface *widget) { _widget = widget; }
And it was called just before init with a non-NULL pointer:
dtw->desktop = new SPDesktop(); dtw->stub = new SPDesktopWidget::WidgetStub (dtw); dtw->desktop->registerEditWidget (dtw->stub); dtw->desktop->init (namedview, dtw->canvas);
but inside init(), _widget was NULL, as if some weird optimization made SPDesktop constructor (which NULLs _widget) fire after the registerEditWidget call instead of before.
I have no idea what might be causing this and why it worked before. It might be some quite different but elsewhere that manifests itself in this strange way. Or, my Windows laptop may have become borked in some way.
However, to be on the safe side, I removed registerEditWidget() (the above was its only use) and just added the widget parameter to init(). This way it no longer crashes for me. For everyone else this should be a no-op change.
Still, I would be curious to hear others' ideas on what might be going on here.