Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emacs -nw calls window code #502

Closed
2e0byo opened this issue Mar 2, 2023 · 0 comments · Fixed by #503
Closed

emacs -nw calls window code #502

2e0byo opened this issue Mar 2, 2023 · 0 comments · Fixed by #503
Labels
bug Something isn't working

Comments

@2e0byo
Copy link
Contributor

2e0byo commented Mar 2, 2023

Describe the bug
emacs -nw calls wr_adjust_canvas_size() despite webrender not running. This results (under tao on my hardware) in a segfault when tao tries to get a non-existent window. This also causes emacs -nw to fail when a graphical environment can't be found, e.g. over ssh.

To Reproduce

./configure --with-winit=tao --with-wr-gl=glutin

Expected behavior
Emacs should not call any graphical code when launching in a terminal.

OS
Which os do you use? (uname -a)

Linux 6.2.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Sun, 26 Feb 2023 03:39:23 +0000 x86_64 GNU/Linux

Error callstack

Program received signal SIGSEGV, Segmentation fault.
                                                    0x0000555555ab7bdc in wrterm::display_info::DisplayInfo::get_inner::haca182995104828c ()
(gdb) bt
#0  0x0000555555ab7bdc in wrterm::display_info::DisplayInfo::get_inner::haca182995104828c ()
#1  0x0000555555ac4bce in wrterm::output::Canvas::build::h57abddb1fff9f40a ()
#2  0x0000555555ac4ac8 in <emacs::lisp::ExternalPtr<emacs::bindings::frame> as wrterm::frame::LispFrameExt>::canvas::heb8da1159cdfb60c ()
#3  0x0000555555b0fcfe in wr_adjust_canvas_size ()
#4  0x0000555555600fe0 in adjust_frame_size
    (f=0x5555563b6370, new_text_width=<optimized out>, new_text_height=<optimized out>, inhibit=inhibit@entry=5, pretend=<optimized out>, parameter=parameter@entry=0x4110) at frame.c:910
#5  0x00005555555f4ad5 in change_frame_size_1
    (f=<optimized out>, new_width=<optimized out>, new_height=<optimized out>, pretend=pretend@entry=false, delay=delay@entry=false, safe=safe@entry=true)
    at dispnew.c:5984
#6  0x00005555555fd6e3 in change_frame_size (safe=true, delay=false, pretend=false, new_height=<optimized out>, new_width=<optimized out>, f=<optimized out>)
    at dispnew.c:6017
#7  init_display_interactive () at dispnew.c:6621
#8  init_display () at dispnew.c:6672
#9  0x00005555556d8996 in main1 (argc=<optimized out>, argv=0x7fffffffe4a8) at emacs.c:2473
#10 0x0000555555814211 in main ()
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant