AFFiNE
AFFiNE copied to clipboard
Using Electron's ozone platform for Wayland produces a segmentation fault
What happened?
When running an otherwise blurry AFFiNE with the recommended flag for supporting fractional scaling on Wayland, the application crashes with a segmentation fault.
Distribution version
Linux
What browsers are you seeing the problem on if you're using web version?
No response
Relevant log output
$ ./AFFiNE --ozone-platform-hint=auto
00:25:29.174 (main) › import plugin manager
00:25:29.184 (main) › [ipc-event] updater:onDownloadProgress [ 0 ]
00:25:29.188 (main) › create window
00:25:29.196 (main) › import plugin manager
00:25:29.197 (main) › bookmark plugin path: /home/jonr/Downloads/affine-stable-linux-x64/AFFiNE-linux-x64/resources/app/dist/plugins/bookmark-block/index.mjs
00:25:29.199 (main) › register plugin com.blocksuite.bookmark-block
00:25:29.200 (main) › register plugin command com.blocksuite.bookmark-block.get-bookmark-data-by-link
register server adapter
00:25:29.248 (main) › unregister plugin command com.blocksuite.bookmark-block.get-bookmark-data-by-link
00:25:29.248 (main) › register plugin com.blocksuite.bookmark-block
00:25:29.249 (main) › register plugin command com.blocksuite.bookmark-block.get-bookmark-data-by-link
00:25:29.249 (main) › Plugin Worker import plugin infra
rpc.log('import plugin infra')
Promise { undefined } @yfa1odd14uq
00:25:29.250 (main) › Plugin Worker import bookmark plugin /home/jonr/Downloads/affine-stable-linux-x64/AFFiNE-linux-x64/resources/app/dist/plugins/bookmark-block/index.mjs
rpc.log('import bookmark plugin', '/home/jonr/Downloads/affine-stable-linux-x64/AFFiNE-linux-x64/resources/app/dist/plugins/bookmark-block/index.mjs')
Promise { undefined } @tm7057n47ch
00:25:29.250 (main) › Plugin Worker handle plugin com.blocksuite.bookmark-block
rpc.log('handle plugin', 'com.blocksuite.bookmark-block')
Promise { undefined } @lp7custjlhb
00:25:29.250 (main) › Plugin Worker no server adapter, skipping.
rpc.log('no server adapter, skipping.')
Promise { undefined } @9fvmf3dcsq
00:25:29.250 (main) › Plugin Worker register server adapter
rpc.log('register server adapter')
Promise { undefined } @cfstnwalimg
00:25:29.265 (main) › Plugin Worker handle plugin com.blocksuite.bookmark-block
rpc.log('handle plugin', 'com.blocksuite.bookmark-block')
Promise { undefined } @kqzytefd0o
00:25:29.265 (main) › Plugin Worker register command com.blocksuite.bookmark-block.get-bookmark-data-by-link
rpc.log('register command', 'com.blocksuite.bookmark-block.get-bookmark-data-by-link')
Promise { undefined } @1lrhdusjoag
rpc.getMeta()
Promise {
{
handlers: [
[
'db',
[
'getDocAsUpdates',
'applyDocUpdate',
'addBlob',
'getBlob',
'deleteBlob',
'getBlobKeys',
'getDefaultStorageLocation',
[length]: 7
],
[length]: 2
],
[
'workspace',
[ 'list', 'delete', 'getMeta', [length]: 3 ],
[length]: 2
],
[
'dialog',
[
'revealDBFile',
'loadDBFile',
'saveDBFileAs',
'moveDBFile',
'selectDBFileLocation',
'setFakeDialogResult',
[length]: 6
],
[length]: 2
],
[length]: 3
],
events: [
[ 'db', [ 'onExternalUpdate', [length]: 1 ], [length]: 2 ],
[ 'workspace', [ 'onMetaChange', [length]: 1 ], [length]: 2 ],
[length]: 2
]
}
} @vbesqsoise
00:25:29.279 (main) › loading page at file://./index.html
[1] 1223545 segmentation fault (core dumped) ./AFFiNE --ozone-platform-hint=auto
This also happens with the deprecated flags for Electron:
$ ./AFFiNE --enable-features=UseOzonePlatform --ozone-platform=wayland
00:25:56.534 (main) › import plugin manager
00:25:56.544 (main) › [ipc-event] updater:onDownloadProgress [ 0 ]
00:25:56.549 (main) › create window
00:25:56.561 (main) › import plugin manager
00:25:56.562 (main) › bookmark plugin path: /home/jonr/Downloads/affine-stable-linux-x64/AFFiNE-linux-x64/resources/app/dist/plugins/bookmark-block/index.mjs
00:25:56.566 (main) › register plugin com.blocksuite.bookmark-block
00:25:56.567 (main) › register plugin command com.blocksuite.bookmark-block.get-bookmark-data-by-link
register server adapter
00:25:56.627 (main) › unregister plugin command com.blocksuite.bookmark-block.get-bookmark-data-by-link
00:25:56.627 (main) › register plugin com.blocksuite.bookmark-block
00:25:56.628 (main) › register plugin command com.blocksuite.bookmark-block.get-bookmark-data-by-link
00:25:56.628 (main) › Plugin Worker import plugin infra
rpc.log('import plugin infra')
Promise { undefined } @bixfuv1v87l
00:25:56.629 (main) › Plugin Worker import bookmark plugin /home/jonr/Downloads/affine-stable-linux-x64/AFFiNE-linux-x64/resources/app/dist/plugins/bookmark-block/index.mjs
rpc.log('import bookmark plugin', '/home/jonr/Downloads/affine-stable-linux-x64/AFFiNE-linux-x64/resources/app/dist/plugins/bookmark-block/index.mjs')
Promise { undefined } @8kaquqg8kh3
00:25:56.629 (main) › Plugin Worker handle plugin com.blocksuite.bookmark-block
rpc.log('handle plugin', 'com.blocksuite.bookmark-block')
Promise { undefined } @xl40hu8fm7e
00:25:56.629 (main) › Plugin Worker no server adapter, skipping.
rpc.log('no server adapter, skipping.')
Promise { undefined } @ovgueouwk39
00:25:56.630 (main) › Plugin Worker register server adapter
rpc.log('register server adapter')
Promise { undefined } @hmuazs3gng
rpc.getMeta()
Promise {
{
handlers: [
[
'db',
[
'getDocAsUpdates',
'applyDocUpdate',
'addBlob',
'getBlob',
'deleteBlob',
'getBlobKeys',
'getDefaultStorageLocation',
[length]: 7
],
[length]: 2
],
[
'workspace',
[ 'list', 'delete', 'getMeta', [length]: 3 ],
[length]: 2
],
[
'dialog',
[
'revealDBFile',
'loadDBFile',
'saveDBFileAs',
'moveDBFile',
'selectDBFileLocation',
'setFakeDialogResult',
[length]: 6
],
[length]: 2
],
[length]: 3
],
events: [
[ 'db', [ 'onExternalUpdate', [length]: 1 ], [length]: 2 ],
[ 'workspace', [ 'onMetaChange', [length]: 1 ], [length]: 2 ],
[length]: 2
]
}
} @n9eshsengw
00:25:56.640 (main) › loading page at file://./index.html
[1] 1224110 segmentation fault (core dumped) ./AFFiNE --enable-features=UseOzonePlatform --ozone-platform=wayland
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] Yes I'd like to help by submitting a PR!