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

Most upvoted comments

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?