Re: [AD] 4.0.2 releasei/CVS |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2002-06-13, Evert <eglebbk@xxxxxxxxxx> wrote:
> Running remotely and using the close button crashes the tests/test program,
> though. I don't recall having this problem with 4.0.1 running locally,
> but I didn't test it extensively.
I know what you're referring to, and it's not only a remote problem.
Technically, it's a "regression" from 4.0.1, but the only reason it
didn't appear with previous versions is that it would deadlock instead.
What's going on: When you press the close button, an auxiliary thread
starts the shutdown process (with `exit'). Meanwhile, the main thread
is still running concurrently, and not expecting the rug to be pulled
out from under its feet. e.g. it might try writing to `screen', right
after it is freed, causing a segfault.
Note this won't happen if you hook the close request and shutdown
gracefully from the main thread. All "real life" programs should be
doing this anyway... but probably don't. (*ahem*)
P.S. I don't think the default handling of close requests by forceful
killing is right. But that's fodder for post-4.0.2.
--
王浩禎