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

Interpreter crashes when in focus and cmd-q is pressed (macOS) #3824

Closed
dyfer opened this issue Jun 28, 2018 · 5 comments
Closed

Interpreter crashes when in focus and cmd-q is pressed (macOS) #3824

dyfer opened this issue Jun 28, 2018 · 5 comments
Assignees
Labels
comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" crash things which cause a crash in the interpreter, servers, or IDE. do not use for PRs os: macOS

Comments

@dyfer
Copy link
Member

dyfer commented Jun 28, 2018

Does this happen to anyone else?
Reproducer:

Window.new.front;
//now press Cmd-q (or Ctrl-q?)
//result:
//Interpreter has crashed or stopped forcefully. [Exit code: 11]

This will also happen without a gui window, as long as the interpreter (as opposed to the ide) is in focus.

Tested on recent develop, built against QT 5.9.1 on macOS. Some info from the console:

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000078
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]
Thread 2 Crashed:
0   sclang                        	0x000000010d034e68 boost::asio::detail::kqueue_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) + 40 (conditionally_enabled_mutex.hpp:53)
1   sclang                        	0x000000010d034c59 boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) + 313 (scheduler.ipp:36)
2   sclang                        	0x000000010d034969 boost::asio::detail::scheduler::run(boost::system::error_code&) + 201 (scheduler.ipp:154)
3   sclang                        	0x000000010cfb4739 asioFunction() + 73 (error_code.hpp:494)
4   sclang                        	0x000000010cfa2298 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)()> >(void*) + 40 (memory:2600)
5   libsystem_pthread.dylib       	0x00007fffd534993b _pthread_body + 180
6   libsystem_pthread.dylib       	0x00007fffd5349887 _pthread_start + 286
7   libsystem_pthread.dylib       	0x00007fffd534908d thread_start + 13
@mossheim mossheim added comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead crash things which cause a crash in the interpreter, servers, or IDE. do not use for PRs labels Jun 28, 2018
@mossheim
Copy link
Contributor

mossheim commented Jun 28, 2018

I can also reproduce this (macOS 10.13.6, Qt 5.11.1)

@patrickdupuis
Copy link
Contributor

I can't reproduce on Linux (Qt 5.10, Gnome 3.28).

@jamshark70
Copy link
Contributor

Cmd-Q on Apple is "Quit," so, something is not being cleaned up properly when exiting this way.

Valid issue to prevent the crash, but users should close windows with Cmd-W instead.

There's no ctrl-q shortcut in sclang for Windows and Linux, so I'm quite sure it will not happen outside of MacOS. (Unless there's some Linux window manager that provides a global quit shortcut for all GUI apps -- not the case in any WM I've used.)

@adcxyz
Copy link
Contributor

adcxyz commented Mar 17, 2019

Still does that in 3.10.2, and actually you don't even need the window for it:

WHEN you bring the interpreter app icon to the front (with Cmd-Tab),
and do Cmd-Q then,the interpreter dutifully quits as told.

Proposal 1 - quick fix:
I think the Cmd-Q shortcut in the interpreter app should be disabled.

Proposal 2 - preferred longterm fix:
The IDE should start the interpreter invisibly, not as a separate visible "app",
which has only a single SuperCollider Menu, with only a single shortcut - Cmd-Q...
This is a common source of confusion for beginners ...

@dyfer dyfer changed the title Window: interpreter crashes on closing the window using keyboard shortcut (new QT) Interpreter crashes when in focus and cmd-q is pressed (macOS) Aug 9, 2019
@dyfer dyfer added os: macOS comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" labels Aug 9, 2019
@geoffroymontel geoffroymontel self-assigned this Aug 10, 2019
@nhthn nhthn added this to General in Future Release Aug 10, 2019
geoffroymontel added a commit to geoffroymontel/supercollider that referenced this issue Aug 11, 2019
@nhthn nhthn removed this from General in Future Release Aug 18, 2019
@nhthn nhthn added this to To do in 3.10.4 Release Aug 18, 2019
@nhthn nhthn moved this from To do to In progress in 3.10.4 Release Aug 30, 2019
@nhthn nhthn removed this from In progress in 3.10.4 Release Aug 30, 2019
mossheim added a commit that referenced this issue Nov 7, 2019
…preter-window

On macOS, register cmd+q on sclang interpreter main menu, solves #3824
@nhthn
Copy link
Contributor

nhthn commented Nov 17, 2019

fixed #4533! :)

@nhthn nhthn closed this as completed Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: Qt GUI sclang Qt components -- for IDE tickets, use "env: SCIDE" instead comp: sclang sclang C++ implementation (primitives, etc.). for changes to class lib use "comp: class library" crash things which cause a crash in the interpreter, servers, or IDE. do not use for PRs os: macOS
Projects
None yet
Development

No branches or pull requests

7 participants