emacs-eaf / emacs-application-framework

EAF, an extensible framework that revolutionizes the graphical capabilities of Emacs
GNU General Public License v3.0
3.07k stars 232 forks source link

EAF-Docker eaf-open only works with PDF, not images (PNG, JPG) #639

Closed ianyepan closed 3 years ago

ianyepan commented 3 years ago

Describe the bug As titled, M-x eaf-open only works with PDF, not images (PNG, JPG). The image does not open in the buffer, and the buffer simply appeared to be blank (with my blinking cursor at the top left corner).

M-x eaf-open-browser or eaf-open-vue-demo suffer from the same problem. Basically, EAF only works with PDF at this moment for me. Let me know if I should open different issues for different eaf-open functions (one for browser, one for vue demo etc.)

To Reproduce M-x eaf-open and enter a PNG/JPG file name.

Expected behavior The image should open in the buffer as usual.

Versions (please complete the following info):

Screenshots

PNG/JPG doesn't work.

image

PDF works as expected.

image

Additional context In the *eaf* buffer, I noticed these couple of lines:

QGLXContext: Failed to create dummy context
QQuickWidget: Failed to make context current
Session is not restored, as no data present in session file.
QQuickWidget: Attempted to render scene with no context

Process *eaf* segmentation fault
ianyepan commented 3 years ago

The current workaround I have (until I solve this issue) is to set the following line in init.el to avoid opening images with EAF altogether:

(setq eaf-find-file-ext-blacklist '("png" "jpg"))
MatthewZMD commented 3 years ago

M-x eaf-open-browser or eaf-open-vue-demo suffer from the same problem. Basically, EAF only works with PDF at this moment for me. Let me know if I should open different issues for different eaf-open functions (one for browser, one for vue demo etc.)

What is in the *eaf* buffer? I suspect the npm install didn't work correctly.

ianyepan commented 3 years ago

@MatthewZMD This is the complete output of *eaf* when I invoke M-x eaf-open-browser RET google.com RET, in a freshly restarted Emacs instance.

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-yep808'
EAF process starting...
QGLXContext: Failed to create dummy context
QQuickWidget: Failed to make context current
Session is not restored, as no data present in session file.
QQuickWidget: Attempted to render scene with no context

Process *eaf* segmentation fault

p.s. yep808 is just my username.

ianyepan commented 3 years ago

I suspect the npm install didn't work correctly.

I see, I just ran ./install-eaf.sh again, and the console output all seems correct though. The script exited rather smoothly.

Edit: The script ran smoothly, but the issue remains unresolved.

ianyepan commented 3 years ago

@manateelazycat Hi Andy, actually the issue isn't resolved yet 😅. I said the script ran smoothly, as an argument against @MatthewZMD 's suspect that it was an npm problem. The original issue (segmentation fault, no response) still remains unsolved. Please kindly reopen the issue :-)

manateelazycat commented 3 years ago

If you got segfault error, please use the following way to collect crash information:

Install gdb and turn on option eaf-enable-debug Use command eaf-stop-process stop current process Restart eaf, send issue with eaf buffer content when next crash

ianyepan commented 3 years ago

@manateelazycat Thanks Andy, I followed the steps on my machine and collected these error messages when trying to open a file (or browser). Again, yep808 is just my username. I'm using Arch Linux WSL2, Emacs 27.2, and GNU gdb (GDB) 10.1.

Opening "pale_green_leaves.jpg"

Click me ```text [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe32de640 (LWP 566)] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-yep808' [New Thread 0x7fffe26d1640 (LWP 567)] [New Thread 0x7fffe1d40640 (LWP 568)] [New Thread 0x7fffe13af640 (LWP 569)] [Detaching after fork from child process 570] EAF process starting... [New Thread 0x7fffe0a1e640 (LWP 577)] [New Thread 0x7fffcbfff640 (LWP 578)] [New Thread 0x7fffcb66e640 (LWP 579)] [Thread 0x7fffcb66e640 (LWP 579) exited] [New Thread 0x7fffcacdd640 (LWP 580)] [Thread 0x7fffcacdd640 (LWP 580) exited] [New Thread 0x7fffcacdd640 (LWP 581)] [Thread 0x7fffcacdd640 (LWP 581) exited] QGLXContext: Failed to create dummy context [New Thread 0x7fffcacdd640 (LWP 582)] [Detaching after fork from child process 583] [Detaching after fork from child process 584] [Detaching after fork from child process 585] [New Thread 0x7fffcb66e640 (LWP 588)] [New Thread 0x7fffc9e48640 (LWP 589)] [New Thread 0x7fffc94b7640 (LWP 590)] [New Thread 0x7fffc8b26640 (LWP 591)] [New Thread 0x7fffb3fff640 (LWP 592)] [New Thread 0x7fffb366e640 (LWP 593)] [New Thread 0x7fffb2cdd640 (LWP 594)] [New Thread 0x7fffb234c640 (LWP 595)] [New Thread 0x7fffb19bb640 (LWP 596)] [New Thread 0x7fffb102a640 (LWP 597)] [New Thread 0x7fff97fff640 (LWP 598)] [Detaching after fork from child process 599] [New Thread 0x7fff9766e640 (LWP 600)] [New Thread 0x7fff96cdd640 (LWP 611)] QQuickWidget: Failed to make context current Session is not restored, as no data present in session file. QQuickWidget: Attempted to render scene with no context Thread 1 "python3" received signal SIGSEGV, Segmentation fault. 0x00007ffff3071040 in QOpenGLContext::shareGroup() const () from /usr/lib/libQt5Gui.so.5 #0 0x00007ffff3071040 in QOpenGLContext::shareGroup() const () at /usr/lib/libQt5Gui.so.5 #1 0x00007ffff33c75e6 in () at /usr/lib/libQt5Gui.so.5 #2 0x00007ffff33c77eb in QOpenGLFunctions::initializeOpenGLFunctions() () at /usr/lib/libQt5Gui.so.5 #3 0x00007fffe9d5e7e7 in QSGBatchRenderer::Renderer::Renderer(QSGDefaultRenderContext*) () at /usr/lib/libQt5Quick.so.5 #4 0x00007fffe9dafc44 in QSGDefaultRenderContext::createRenderer() () at /usr/lib/libQt5Quick.so.5 #5 0x00007fffe9e1c603 in QQuickWindowPrivate::syncSceneGraph() () at /usr/lib/libQt5Quick.so.5 #6 0x00007fffe9ea5bcd in QQuickRenderControl::grab() () at /usr/lib/libQt5Quick.so.5 #7 0x00007ffff746946a in () at /usr/lib/libQt5QuickWidgets.so.5 #8 0x00007ffff3756ceb in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #9 0x00007ffff37575a0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList const&, int, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #10 0x00007ffff3755eed in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #11 0x00007ffff375aaca in QWidgetPrivate::render(QPaintDevice*, QPoint const&, QRegion const&, QFlags) () at /usr/lib/libQt5Widgets.so.5 #12 0x00007ffff375afe4 in QWidget::render(QPainter*, QPoint const&, QRegion const&, QFlags) () at /usr/lib/libQt5Widgets.so.5 #13 0x00007ffff3a346cc in QGraphicsProxyWidget::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*) () at /usr/lib/libQt5Widgets.so.5 #14 0x00007ffff3a3a894 in () at /usr/lib/libQt5Widgets.so.5 #15 0x00007ffff3a4fb57 in () at /usr/lib/libQt5Widgets.so.5 #16 0x00007ffff3a50710 in () at /usr/lib/libQt5Widgets.so.5 #17 0x00007ffff3a50d52 in () at /usr/lib/libQt5Widgets.so.5 #18 0x00007ffff3a74b79 in QGraphicsView::paintEvent(QPaintEvent*) () at /usr/lib/libQt5Widgets.so.5 #19 0x00007ffff3ee5954 in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #20 0x00007ffff375dbde in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5 #21 0x00007ffff380925f in QFrame::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5 #22 0x00007ffff3ee76c4 in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #23 0x00007ffff6d243f3 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5 #24 0x00007ffff371c751 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5 #25 0x00007ffff3fd3ecf in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #26 0x00007ffff6d2468a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5 #27 0x00007ffff3755968 in QWidgetPrivate::sendPaintEvent(QRegion const&) () at /usr/lib/libQt5Widgets.so.5 #28 0x00007ffff37561dc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #29 0x00007ffff37575a0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList const&, int, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #30 0x00007ffff3755eed in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #31 0x00007ffff37575a0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList const&, int, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #32 0x00007ffff3755eed in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #33 0x00007ffff372d32c in () at /usr/lib/libQt5Widgets.so.5 #34 0x00007ffff372db9e in () at /usr/lib/libQt5Widgets.so.5 #35 0x00007ffff37799b9 in () at /usr/lib/libQt5Widgets.so.5 #36 0x00007ffff371c762 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5 #37 0x00007ffff3fd3ecf in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #38 0x00007ffff6d2468a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5 #39 0x00007ffff302ea20 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () at /usr/lib/libQt5Gui.so.5 #40 0x00007ffff3002bb5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags) () at /usr/lib/libQt5Gui.so.5 #41 0x00007fffe34ed19c in () at /usr/lib/libQt5XcbQpa.so.5 #42 0x00007ffff604702c in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0 #43 0x00007ffff609ab59 in () at /usr/lib/libglib-2.0.so.0 #44 0x00007ffff6044781 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0 #45 0x00007ffff6d7d191 in QEventDispatcherGlib::processEvents(QFlags) () at /usr/lib/libQt5Core.so.5 #46 0x00007ffff6d22fec in QEventLoop::exec(QFlags) () at /usr/lib/libQt5Core.so.5 #47 0x00007ffff6d2b4a4 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5 #48 0x00007ffff3fd2baf in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #49 0x00007ffff7d3d982 in () at /usr/lib/libpython3.9.so.1.0 #50 0x00007ffff7d2357d in _PyObject_MakeTpCall () at /usr/lib/libpython3.9.so.1.0 #51 0x00007ffff7d1eec2 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0 #52 0x00007ffff7d18cbd in () at /usr/lib/libpython3.9.so.1.0 #53 0x00007ffff7d18681 in _PyEval_EvalCodeWithName () at /usr/lib/libpython3.9.so.1.0 #54 0x00007ffff7ddc593 in PyEval_EvalCode () at /usr/lib/libpython3.9.so.1.0 #55 0x00007ffff7deca4d in () at /usr/lib/libpython3.9.so.1.0 #56 0x00007ffff7de82eb in () at /usr/lib/libpython3.9.so.1.0 #57 0x00007ffff7c885bc in () at /usr/lib/libpython3.9.so.1.0 #58 0x00007ffff7c87970 in PyRun_SimpleFileExFlags () at /usr/lib/libpython3.9.so.1.0 #59 0x00007ffff7dfe42a in Py_RunMain () at /usr/lib/libpython3.9.so.1.0 #60 0x00007ffff7dcf529 in Py_BytesMain () at /usr/lib/libpython3.9.so.1.0 #61 0x00007ffff7a4ab25 in __libc_start_main () at /usr/lib/libc.so.6 #62 0x000055555555504e in _start () Process *eaf* finished ```

Opening "lakequill.png"

Click me ```text [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe32de640 (LWP 669)] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-yep808' [New Thread 0x7fffe26d1640 (LWP 670)] [New Thread 0x7fffe1d40640 (LWP 671)] [New Thread 0x7fffe13af640 (LWP 672)] [Detaching after fork from child process 673] EAF process starting... [New Thread 0x7fffe0a1e640 (LWP 680)] [New Thread 0x7fffcbfff640 (LWP 681)] [New Thread 0x7fffcb66e640 (LWP 682)] [New Thread 0x7fffcacdd640 (LWP 683)] [Thread 0x7fffcacdd640 (LWP 683) exited] [Thread 0x7fffcb66e640 (LWP 682) exited] QGLXContext: Failed to create dummy context [New Thread 0x7fffcb66e640 (LWP 684)] [Detaching after fork from child process 685] [Detaching after fork from child process 686] [Detaching after fork from child process 687] [New Thread 0x7fffcacdd640 (LWP 690)] [New Thread 0x7fffc9e48640 (LWP 691)] [New Thread 0x7fffc94b7640 (LWP 692)] [New Thread 0x7fffc8b26640 (LWP 693)] [New Thread 0x7fffb3fff640 (LWP 694)] [New Thread 0x7fffb366e640 (LWP 695)] [New Thread 0x7fffb2cdd640 (LWP 696)] [New Thread 0x7fffb234c640 (LWP 697)] [New Thread 0x7fffb19bb640 (LWP 698)] [New Thread 0x7fffb102a640 (LWP 699)] [New Thread 0x7fff9ffff640 (LWP 700)] [New Thread 0x7fff9f66e640 (LWP 701)] [Thread 0x7fff9f66e640 (LWP 701) exited] [New Thread 0x7fff9f66e640 (LWP 702)] [Detaching after fork from child process 703] [New Thread 0x7fff9ecdd640 (LWP 704)] QQuickWidget: Failed to make context current Session is not restored, as no data present in session file. QQuickWidget: Attempted to render scene with no context [New Thread 0x7fff9dc74640 (LWP 722)] Thread 1 "python3" received signal SIGSEGV, Segmentation fault. 0x00007ffff3071040 in QOpenGLContext::shareGroup() const () from /usr/lib/libQt5Gui.so.5 #0 0x00007ffff3071040 in QOpenGLContext::shareGroup() const () at /usr/lib/libQt5Gui.so.5 #1 0x00007ffff33c75e6 in () at /usr/lib/libQt5Gui.so.5 #2 0x00007ffff33c77eb in QOpenGLFunctions::initializeOpenGLFunctions() () at /usr/lib/libQt5Gui.so.5 #3 0x00007fffe9d5e7e7 in QSGBatchRenderer::Renderer::Renderer(QSGDefaultRenderContext*) () at /usr/lib/libQt5Quick.so.5 #4 0x00007fffe9dafc44 in QSGDefaultRenderContext::createRenderer() () at /usr/lib/libQt5Quick.so.5 #5 0x00007fffe9e1c603 in QQuickWindowPrivate::syncSceneGraph() () at /usr/lib/libQt5Quick.so.5 #6 0x00007fffe9ea5bcd in QQuickRenderControl::grab() () at /usr/lib/libQt5Quick.so.5 #7 0x00007ffff746946a in () at /usr/lib/libQt5QuickWidgets.so.5 #8 0x00007ffff3756ceb in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #9 0x00007ffff37575a0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList const&, int, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #10 0x00007ffff3755eed in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #11 0x00007ffff375aaca in QWidgetPrivate::render(QPaintDevice*, QPoint const&, QRegion const&, QFlags) () at /usr/lib/libQt5Widgets.so.5 #12 0x00007ffff375afe4 in QWidget::render(QPainter*, QPoint const&, QRegion const&, QFlags) () at /usr/lib/libQt5Widgets.so.5 #13 0x00007ffff3a346cc in QGraphicsProxyWidget::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*) () at /usr/lib/libQt5Widgets.so.5 #14 0x00007ffff3a3a894 in () at /usr/lib/libQt5Widgets.so.5 #15 0x00007ffff3a4fb57 in () at /usr/lib/libQt5Widgets.so.5 #16 0x00007ffff3a50710 in () at /usr/lib/libQt5Widgets.so.5 #17 0x00007ffff3a50d52 in () at /usr/lib/libQt5Widgets.so.5 #18 0x00007ffff3a74b79 in QGraphicsView::paintEvent(QPaintEvent*) () at /usr/lib/libQt5Widgets.so.5 #19 0x00007ffff3ee5954 in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #20 0x00007ffff375dbde in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5 #21 0x00007ffff380925f in QFrame::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5 #22 0x00007ffff3ee76c4 in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #23 0x00007ffff6d243f3 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5 #24 0x00007ffff371c751 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5 #25 0x00007ffff3fd3ecf in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #26 0x00007ffff6d2468a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5 #27 0x00007ffff3755968 in QWidgetPrivate::sendPaintEvent(QRegion const&) () at /usr/lib/libQt5Widgets.so.5 #28 0x00007ffff37561dc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #29 0x00007ffff37575a0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList const&, int, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #30 0x00007ffff3755eed in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #31 0x00007ffff37575a0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList const&, int, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #32 0x00007ffff3755eed in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #33 0x00007ffff372d32c in () at /usr/lib/libQt5Widgets.so.5 #34 0x00007ffff372db9e in () at /usr/lib/libQt5Widgets.so.5 #35 0x00007ffff37799b9 in () at /usr/lib/libQt5Widgets.so.5 #36 0x00007ffff371c762 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5 #37 0x00007ffff3fd3ecf in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #38 0x00007ffff6d2468a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5 #39 0x00007ffff302ea20 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () at /usr/lib/libQt5Gui.so.5 #40 0x00007ffff3002bb5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags) () at /usr/lib/libQt5Gui.so.5 #41 0x00007fffe34ed19c in () at /usr/lib/libQt5XcbQpa.so.5 #42 0x00007ffff604702c in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0 #43 0x00007ffff609ab59 in () at /usr/lib/libglib-2.0.so.0 #44 0x00007ffff6044781 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0 #45 0x00007ffff6d7d191 in QEventDispatcherGlib::processEvents(QFlags) () at /usr/lib/libQt5Core.so.5 #46 0x00007ffff6d22fec in QEventLoop::exec(QFlags) () at /usr/lib/libQt5Core.so.5 #47 0x00007ffff6d2b4a4 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5 #48 0x00007ffff3fd2baf in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #49 0x00007ffff7d3d982 in () at /usr/lib/libpython3.9.so.1.0 #50 0x00007ffff7d2357d in _PyObject_MakeTpCall () at /usr/lib/libpython3.9.so.1.0 #51 0x00007ffff7d1eec2 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0 #52 0x00007ffff7d18cbd in () at /usr/lib/libpython3.9.so.1.0 #53 0x00007ffff7d18681 in _PyEval_EvalCodeWithName () at /usr/lib/libpython3.9.so.1.0 #54 0x00007ffff7ddc593 in PyEval_EvalCode () at /usr/lib/libpython3.9.so.1.0 #55 0x00007ffff7deca4d in () at /usr/lib/libpython3.9.so.1.0 #56 0x00007ffff7de82eb in () at /usr/lib/libpython3.9.so.1.0 #57 0x00007ffff7c885bc in () at /usr/lib/libpython3.9.so.1.0 #58 0x00007ffff7c87970 in PyRun_SimpleFileExFlags () at /usr/lib/libpython3.9.so.1.0 #59 0x00007ffff7dfe42a in Py_RunMain () at /usr/lib/libpython3.9.so.1.0 #60 0x00007ffff7dcf529 in Py_BytesMain () at /usr/lib/libpython3.9.so.1.0 #61 0x00007ffff7a4ab25 in __libc_start_main () at /usr/lib/libc.so.6 #62 0x000055555555504e in _start () Process *eaf* finished ```

Opening EAF browser with M-x eaf-open-browser RET google.com RET:

Click me ```text [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". [New Thread 0x7fffe32de640 (LWP 771)] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-yep808' [New Thread 0x7fffe26d1640 (LWP 772)] [New Thread 0x7fffe1d40640 (LWP 773)] [New Thread 0x7fffe13af640 (LWP 774)] [Detaching after fork from child process 775] EAF process starting... [New Thread 0x7fffe0a1e640 (LWP 782)] [New Thread 0x7fffcbfff640 (LWP 783)] [New Thread 0x7fffcb66e640 (LWP 784)] [New Thread 0x7fffcacdd640 (LWP 785)] [Thread 0x7fffcacdd640 (LWP 785) exited] [Thread 0x7fffcb66e640 (LWP 784) exited] QGLXContext: Failed to create dummy context [New Thread 0x7fffcb66e640 (LWP 786)] [Detaching after fork from child process 787] [Detaching after fork from child process 788] [Detaching after fork from child process 789] [New Thread 0x7fffcacdd640 (LWP 792)] [New Thread 0x7fffc9e88640 (LWP 793)] [New Thread 0x7fffc94f7640 (LWP 794)] [New Thread 0x7fffc8b66640 (LWP 795)] [New Thread 0x7fffb3fff640 (LWP 796)] [New Thread 0x7fffb366e640 (LWP 797)] [New Thread 0x7fffb2cdd640 (LWP 798)] [New Thread 0x7fffb234c640 (LWP 799)] [New Thread 0x7fffb19bb640 (LWP 800)] [New Thread 0x7fffb102a640 (LWP 801)] [New Thread 0x7fff97fff640 (LWP 802)] [New Thread 0x7fff9766e640 (LWP 803)] [Thread 0x7fff9766e640 (LWP 803) exited] [New Thread 0x7fff9766e640 (LWP 804)] [Detaching after fork from child process 805] [New Thread 0x7fff96cdd640 (LWP 806)] QQuickWidget: Failed to make context current Session is not restored, as no data present in session file. [New Thread 0x7fff9634c640 (LWP 824)] QQuickWidget: Attempted to render scene with no context Thread 1 "python3" received signal SIGSEGV, Segmentation fault. 0x00007ffff3071040 in QOpenGLContext::shareGroup() const () from /usr/lib/libQt5Gui.so.5 #0 0x00007ffff3071040 in QOpenGLContext::shareGroup() const () at /usr/lib/libQt5Gui.so.5 #1 0x00007ffff33c75e6 in () at /usr/lib/libQt5Gui.so.5 #2 0x00007ffff33c77eb in QOpenGLFunctions::initializeOpenGLFunctions() () at /usr/lib/libQt5Gui.so.5 #3 0x00007fffe9d5e7e7 in QSGBatchRenderer::Renderer::Renderer(QSGDefaultRenderContext*) () at /usr/lib/libQt5Quick.so.5 #4 0x00007fffe9dafc44 in QSGDefaultRenderContext::createRenderer() () at /usr/lib/libQt5Quick.so.5 #5 0x00007fffe9e1c603 in QQuickWindowPrivate::syncSceneGraph() () at /usr/lib/libQt5Quick.so.5 #6 0x00007fffe9ea5bcd in QQuickRenderControl::grab() () at /usr/lib/libQt5Quick.so.5 #7 0x00007ffff746946a in () at /usr/lib/libQt5QuickWidgets.so.5 #8 0x00007ffff3756ceb in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #9 0x00007ffff37575a0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList const&, int, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #10 0x00007ffff3755eed in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #11 0x00007ffff375aaca in QWidgetPrivate::render(QPaintDevice*, QPoint const&, QRegion const&, QFlags) () at /usr/lib/libQt5Widgets.so.5 #12 0x00007ffff375afe4 in QWidget::render(QPainter*, QPoint const&, QRegion const&, QFlags) () at /usr/lib/libQt5Widgets.so.5 #13 0x00007ffff3a346cc in QGraphicsProxyWidget::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*) () at /usr/lib/libQt5Widgets.so.5 #14 0x00007ffff3a3a894 in () at /usr/lib/libQt5Widgets.so.5 #15 0x00007ffff3a4fb57 in () at /usr/lib/libQt5Widgets.so.5 #16 0x00007ffff3a50710 in () at /usr/lib/libQt5Widgets.so.5 #17 0x00007ffff3a50d52 in () at /usr/lib/libQt5Widgets.so.5 #18 0x00007ffff3a74b79 in QGraphicsView::paintEvent(QPaintEvent*) () at /usr/lib/libQt5Widgets.so.5 #19 0x00007ffff3ee5954 in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #20 0x00007ffff375dbde in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5 #21 0x00007ffff380925f in QFrame::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5 #22 0x00007ffff3ee76c4 in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #23 0x00007ffff6d243f3 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5 #24 0x00007ffff371c751 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5 #25 0x00007ffff3fd3ecf in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #26 0x00007ffff6d2468a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5 #27 0x00007ffff3755968 in QWidgetPrivate::sendPaintEvent(QRegion const&) () at /usr/lib/libQt5Widgets.so.5 #28 0x00007ffff37561dc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #29 0x00007ffff37575a0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList const&, int, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #30 0x00007ffff3755eed in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #31 0x00007ffff37575a0 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList const&, int, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #32 0x00007ffff3755eed in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, QFlags, QPainter*, QWidgetRepaintManager*) () at /usr/lib/libQt5Widgets.so.5 #33 0x00007ffff372d32c in () at /usr/lib/libQt5Widgets.so.5 #34 0x00007ffff372db9e in () at /usr/lib/libQt5Widgets.so.5 #35 0x00007ffff37799b9 in () at /usr/lib/libQt5Widgets.so.5 #36 0x00007ffff371c762 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5 #37 0x00007ffff3fd3ecf in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #38 0x00007ffff6d2468a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5 #39 0x00007ffff302ea20 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () at /usr/lib/libQt5Gui.so.5 #40 0x00007ffff3002bb5 in QWindowSystemInterface::sendWindowSystemEvents(QFlags) () at /usr/lib/libQt5Gui.so.5 #41 0x00007fffe34ed19c in () at /usr/lib/libQt5XcbQpa.so.5 #42 0x00007ffff604702c in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0 #43 0x00007ffff609ab59 in () at /usr/lib/libglib-2.0.so.0 #44 0x00007ffff6044781 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0 #45 0x00007ffff6d7d191 in QEventDispatcherGlib::processEvents(QFlags) () at /usr/lib/libQt5Core.so.5 #46 0x00007ffff6d22fec in QEventLoop::exec(QFlags) () at /usr/lib/libQt5Core.so.5 #47 0x00007ffff6d2b4a4 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5 #48 0x00007ffff3fd2baf in () at /usr/lib/python3.9/site-packages/PyQt5/QtWidgets.abi3.so #49 0x00007ffff7d3d982 in () at /usr/lib/libpython3.9.so.1.0 #50 0x00007ffff7d2357d in _PyObject_MakeTpCall () at /usr/lib/libpython3.9.so.1.0 #51 0x00007ffff7d1eec2 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0 #52 0x00007ffff7d18cbd in () at /usr/lib/libpython3.9.so.1.0 #53 0x00007ffff7d18681 in _PyEval_EvalCodeWithName () at /usr/lib/libpython3.9.so.1.0 #54 0x00007ffff7ddc593 in PyEval_EvalCode () at /usr/lib/libpython3.9.so.1.0 #55 0x00007ffff7deca4d in () at /usr/lib/libpython3.9.so.1.0 #56 0x00007ffff7de82eb in () at /usr/lib/libpython3.9.so.1.0 #57 0x00007ffff7c885bc in () at /usr/lib/libpython3.9.so.1.0 #58 0x00007ffff7c87970 in PyRun_SimpleFileExFlags () at /usr/lib/libpython3.9.so.1.0 #59 0x00007ffff7dfe42a in Py_RunMain () at /usr/lib/libpython3.9.so.1.0 #60 0x00007ffff7dcf529 in Py_BytesMain () at /usr/lib/libpython3.9.so.1.0 #61 0x00007ffff7a4ab25 in __libc_start_main () at /usr/lib/libc.so.6 #62 0x000055555555504e in _start () Process *eaf* finished ```
manateelazycat commented 3 years ago

From crash context, looks like QOpenGLContext::shareGroup() cause crash. It's perhaps a bug of WSL2 Arch repo, or a bug of QOpenGL with WSL2.

I don't use Windows, and the crash log is clear, not bug of EAF

MatthewZMD commented 3 years ago

@yqu212 could you take a look at this issue?

yqu212 commented 3 years ago

@ianpan870102 Please try the following steps:

  1. Make sure your wsl is on version 2.
  2. Replace your xserver with Mobaxterm and just use the default configuration.
ianyepan commented 3 years ago

Hi, I tried the steps, but eaf-open-browser crashes with the following error:

Fatal error 6: IOT trap
zsh: abort      emacs
ianyepan commented 3 years ago

P.s. Why use Mobaxterm over VcXsrv? The latter provided me with crisp font rendering, while the former left with quite a blurry Emacs instance.

yqu212 commented 3 years ago

From the information you provided, it looks like the problem is caused by pyqtwebengine.

I have seen a similar situation under wsl1. Under wsl2, I have not encountered the problem.

So I suggest you start investigating with pyqtwebengine.

You've already ruled out xserver earlier.

A feasible approach now is to run an eaf docker as a way to determine whether there is a problem with wsl and eaf.

I have successfully run the eaf docker under archwsl+wsl2+mobaxterm.

Mobaxterm is not better than vcxser. I just wanted to use it to rule out any problems with the xserver

ianyepan commented 3 years ago

Hi @yqu212 , understood, thanks for getting back to me so promptly.

I'm rather new to Docker -- is there a detailed step-by-step guide that can help me with running an EAF docker? I checked the Wiki (https://github.com/manateelazycat/emacs-application-framework/wiki/Docker), but I can't get pass the first command docker build -t eaf --build-arg=_UID=$UID --build-arg=_USER=$USER . I am getting an error as follows:

unable to prepare context: unable to evaluate symlinks in Dockerfile path
yqu212 commented 3 years ago

I am also new to docker. There is no such guide AFAIK.

ianyepan commented 3 years ago

That's okay, guess I'll leave this issue open and hope if anything comes up. In the meanwhile, I'll disable EAF for png and jpg filetypes.

manateelazycat commented 3 years ago

@MatthewZMD Maybe we should remove docker code since EAF has supports Windows/Mac/Linux ?

MatthewZMD commented 3 years ago

@MatthewZMD Maybe we should remove docker code since EAF has supports Windows/Mac/Linux ?

I think we should still have it, some people who doesn't want to install many dependencies may opt-in to use docker.

manateelazycat commented 3 years ago

I have remove docker file since I dont use it。

please dont run EAF with docker

we confirm EAF can work with windows

please try install-eaf.py to install EAF