sharp: Possible libgsf race condition with concurrent tile-based output
following from this issue https://github.com/lovell/sharp/issues/678
I set:
"build": {
"asar": true,
"asarUnpack": ["**/node_modules/sharp/**/*"]
}
in my package.json. I packaged the app with yarn dist. This seems to solve something but now my App is randomly crashing (white screen) and I get this error:
(sharp:24414): GLib-GObject-WARNING **: cannot register existing type 'GsfOutfile'
(sharp:24414): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed
(sharp:24414): GLib-GObject-WARNING **: cannot register existing type 'GsfOutfile'
(sharp:24414): GLib-GObject-CRITICAL **: g_object_new_valist: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
(sharp:24414): GLib-GObject-WARNING **: cannot register existing type 'GsfOutfile'
(sharp:24414): GLib-GObject-WARNING **: invalid cast from 'GsfOutfileStdio' to '<invalid>'
my set up is:
$ yarn --version
1.5.1
"sharp": "0.19.1"
"electron": "1.8.3",
"electron-builder": "20.3.1",
Final note: this does not happen in dev mode
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 63 (47 by maintainers)
Commits related to this issue
- Add warning about possible concurrent tile race #1151 — committed to lovell/sharp by lovell 6 years ago
- switch to bionic avoids a compiler optimiser bug in gcc 5.4, see https://github.com/lovell/sharp/issues/1151 also, revised build scripts a bit — committed to libvips/build-win64 by jcupitt 6 years ago
- Update for 8.7.0-rc1 - Update ImageMagick to 6.9.10-9. - Update librsvg to 2.43.4. - Update libgsf to 1.14.44 (fixes: https://github.com/lovell/sharp/issues/1151). — committed to libvips/build-win64-mxe by kleisauke 6 years ago
The gsf maintainers have fixed it their end, so the next libgsf release should be fine, on this issue at least.
I think you may be onto something. Making that last change appears to correctly build all types at the beginning now. So, if it’s a compiler optimization bug where do we go from here?