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

Windows: sclang crashes on executing menu-item "Quit interpreter"/freezes on evaluating 0.exit #1578

Closed
bagong opened this issue Jun 29, 2015 · 8 comments
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. crash things which cause a crash in the interpreter, servers, or IDE. do not use for PRs os: Windows severe
Milestone

Comments

@bagong
Copy link
Contributor

bagong commented Jun 29, 2015

Studied on current scwin3.7 alpha01, Visual Studio build, the problem has been around since the rebirth of the 3.7 Windows version.
When running "Quit Interpreter" from the IDE-Language menu, sclang will quit, but it actually crashes, Postwindow:

Interpreter has crashed or stopped forcefully. [Exit code: 62097]

The menu point calls stopLanguage() in sc_process.cpp which in turn evaluates 0.exit. When that fails (not succeeded after 200 ms) it kills sclang (according to Google, Exit code: 62097 indicates that that happened).

Running 0.exit in the editor gets stuck on main: waiting for input thread to join...

SURPRISE: if I press the key Enter in this state, the shutdown continues and I get this post:

main: quitting...
empty
cleaning up OSC

And when the server is running while this happens, the server is shut down:

main: quitting...
/quit sent

empty
cleaning up OSC

So server not quitting on IDE-exit a side-effect of of sclang getting stuck during shutdown before the server is quit, and then getting killed.

When closing sclang with 0.exit and kicking off the process by hitting Enter, as said, the server is quit as expected, but after that a(nother) sclang-crash still occures, in this case the exit code is -1073740791

There are various issues of sclang borking on close. In Linux currently sclang also crashes on exit, but in a less severe way, the server is closed and the two main-steps and the server-shutdown occure before the crash happens, could be the same as the second crash on Windows.

@bagong bagong added bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. os: Windows crash things which cause a crash in the interpreter, servers, or IDE. do not use for PRs severe labels Jun 29, 2015
@bagong
Copy link
Contributor Author

bagong commented Jun 29, 2015

#1449

@bagong
Copy link
Contributor Author

bagong commented Jun 29, 2015

#1422 #939 #1438

@bagong
Copy link
Contributor Author

bagong commented Jun 29, 2015

In the mingw/msys2 32-bit build there are subtle differences.

0.exit also requires a Enter to complete, but then it doesn't crash, it posts:

Interpreter has quit. [Exit code: 3]

If the server is running, it will be shut down by this procedure, but then the IDE goes in a frozen state and the sclang shutdown doesn succeed. No return message after "cleaning up OSC". So that second sclang crash seems to have severe consequences in the mingw build

@bagong bagong changed the title Windows: sclang crashes on menu: "Quit interpreter" Windows: sclang crashes on executing menu-item "Quit interpreter" Jun 29, 2015
@bagong
Copy link
Contributor Author

bagong commented Jun 29, 2015

If I run 0.exit in the IDE in a debug build, nothing happens until I press enter. Then this message window pops up:
Debug Error! Program .....\sclang.exe
R6010

  • abort() has been called
    Press retry to debug application

Then it is offered to create a breakpoint in a window headed DiskIO_UGens/std::thread/~thread() at
~thread() _NOEXCEPT
{ // cleanup
if (joinable()) _XSTD terminate()}
}

If I continue, the interpreter quits with exit code 3

The server cannot be started in debug mode, so I cannot produce any output with a running server.

I'll have to leave it at that, unfortunately I cannot interpret these informations.

@bagong bagong changed the title Windows: sclang crashes on executing menu-item "Quit interpreter" Windows: sclang freezes on executing menu-item "Quit interpreter" Jun 29, 2015
@bagong bagong changed the title Windows: sclang freezes on executing menu-item "Quit interpreter" Windows: sclang freezes/crashes on executing menu-item "Quit interpreter" Jun 29, 2015
@bagong bagong changed the title Windows: sclang freezes/crashes on executing menu-item "Quit interpreter" Windows: sclang crashes on executing menu-item "Quit interpreter"/freezes on evaluating 0.exit Jun 29, 2015
@scztt scztt added this to the 3.7 milestone Jul 10, 2015
@crucialfelix crucialfelix modified the milestones: 3.7.0, 3.7.x Aug 17, 2015
@timblechmann
Copy link
Contributor

306c417?

btw, these crash data re not helpful: install a debugger (e.g. windows platform sdk), attach to the sclang or scsynth process, crash the program, post the stack trace

@telephon telephon modified the milestones: 3.7.x, 3.7.0 Nov 16, 2015
@telephon
Copy link
Member

Added a note in known issues

@llloret
Copy link
Member

llloret commented Jun 8, 2016

I think this is fixed with 3.7.2.

@bagong
Copy link
Contributor Author

bagong commented Oct 10, 2016

works in 3.8 too, thank you Luis!

@bagong bagong closed this as completed Oct 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. crash things which cause a crash in the interpreter, servers, or IDE. do not use for PRs os: Windows severe
Projects
None yet
Development

No branches or pull requests

6 participants