Blender Git Loki

Git Commits -> Revision 02213b8

Revision 02213b8 by Sergey Sharybin (master)
April 20, 2016, 14:19 (GMT)
Cycles: Stop rendering when bad_alloc happens

This is an attempt to gracefully handle out-of-memory events
and stop rendering with an error message instead of a crash.

It uses bad_alloc exception, and usually i'm not really fond
of exceptions, but for such limited use for errors from which
we can't recover it should be fine.

Ideally we'll need to stop full Cycles Session, so viewport
render and persistent images frees all the memory, but that
we can support later, since it'll mainly related on telling
Blender what to do.

General rules are:

- Use as less exception handles as possible, try to find a
most geenric pace where to handle those.

For example, ccl::Session.

- Threads needs own handling, exception trap from one thread
will not catch exceptions from other threads.

That's why BVH build needs own thing.

Reviewers: brecht, juicyfruit, dingto, lukasstockner97

Differential Revision: https://developer.blender.org/D1898

Commit Details:

Full Hash: 02213b867ed68a00683fa931ebce12a23ed3e77b
Parent Commit: e3544c9
Lines Changed: +22, -2

3 Modified Paths:

/intern/cycles/render/mesh.cpp (+1, -1) (Diff)
/intern/cycles/render/session.cpp (+1, -1) (Diff)
/intern/cycles/util/util_guarded_allocator.h (+20, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021