Results 16 to 30 of 33
-
04-17-2012, 01:28 PM #16Member
- Join Date
- May 2006
- Location
- France
- Posts
- 3,442
Ok so we have a proof,
I have to test other scenes or different shading
until it crashes for me...
Denis.
-
04-18-2012, 06:57 AM #17Member
- Join Date
- May 2006
- Location
- France
- Posts
- 3,442
Still no clue, just my thoughts,
seems that the only difference between your config and mine
is multithreading, I wonder if you can test this scene
with VPR on a single thread, but don't know if it uses the
same Render settings than F9 render.
Denis.
-
04-18-2012, 03:27 PM #18Registered User
- Join Date
- Feb 2012
- Location
- Fance
- Posts
- 67
Hi,
It is a multi-core problem but the multithreading setting in the render panel has no effect on this, I had to activate only 1 proc in the msconfig util and reboot.
Now, with only 1 core, no crash...
Tchao
-
04-18-2012, 05:44 PM #19
-
04-18-2012, 11:42 PM #20Member
- Join Date
- May 2006
- Location
- France
- Posts
- 3,442
-
04-18-2012, 11:51 PM #21
I'll FBugz this and hope that they can replicate it. If it makes VPR even more stable (it's been pretty solid for me) then I'm all for that. Cheers Denis.
-
04-24-2012, 12:49 PM #22Newbie Member
- Join Date
- Feb 2006
- Location
- Placerville, CA USA
- Posts
- 74
This crash happens when the node editor sends a NewTime call to your shader while VPR is active. VPR is calling your shader from other threads at the time. You probably change some internal values during NewTime which are being used by the VPR threads. This is really a bug in Layout since we should not be trying to do a preview shade at the same time as we are rendering and that will be a pretty big feature to implement in a future release.
For now you may be able to work around this crash by handling calls to your shader's NewTime function differently such that critical data needed by the rendering threads is not modified in such a way that it causes a crash.
-Mark Granger
-
05-04-2012, 09:38 PM #23TrueArt Support
- Join Date
- Feb 2003
- Location
- Poland
- Posts
- 5,188
Denis - are you null checking the all function calls inside of LWNodalAccess such as nodalaccess->illuminate() etc. etc.. ?
Sometimes they are NULL..
-
05-07-2012, 06:11 AM #24
It would also help a lot if VPR evaluations would be flagged (shaders, nodes, procedurals). Since a more careful evaluation of data pre-generated during NewTime might require more mutex locks, this does in turn impact performance (heavily in some cases).
However, that is (currently) only required if VPR is evaluating the node/shader/procedural - a flag would allow for more streamlined code for the production renderer.
Cheers,
Mike
-
05-07-2012, 08:38 PM #25TrueArt Support
- Join Date
- Feb 2003
- Location
- Poland
- Posts
- 5,188
When LW v11.0.1 is opening Surface Editor it is executing functions:
node->Init( LWINIT_PREVIEW );
node->NewTime();
node->Evaluate(); nodalaccess->flags & LWRT_PREVIEW is true..
[optionally] node->Cleanup();
when there is also Node Editor with your node, it's called again in above order.
When LW is rendering F9/F10/VPR it is executing functions:
node->Init( LWINIT_RENDER );
node->NewTime();
node->Evaluate(); nodalaccess->flags & LWRT_PREVIEW is false..
node->Cleanup();
So, to not have problems, you just have to have 2 sets of initializations.
Different for previews, different for renders. And in Evaluate() use flag to check which one to use. And they won't interfere each other.
Like f.e.
int index = 0;
if( mode == LWINIT_PREVIEW ) index = 0;
else if( mode == LWINIT_RENDER ) index = 1;
data->Data[ index ] = [....]
then in Evaluate():
int index = 0;
if( nodalaccess->flags & LWRT_PREVIEW ) index = 0;
else index = 1;
using data->Data[ index ]
NewFrame() will initialize/free memory related to preview data->Data[ 0 ] and won't kill stuff used by full render..
The quickest possible thing to do is just to do nothing (return immediately from Init/NewTime/Cleanup/Evaluate) when mode == LWINIT_PREVIEW and ( flags & LWRT_PREVIEW ) != 0. It should immediately stop crashing.Last edited by Sensei; 05-07-2012 at 08:45 PM.
-
05-07-2012, 08:53 PM #26TrueArt Support
- Join Date
- Feb 2003
- Location
- Poland
- Posts
- 5,188
To Init() add
data->Mode = mode;
if( data->Mode != LWINIT_RENDER ) return;
[...]
To NewTime()/Cleanup() add
if( data->Mode != LWINIT_RENDER ) return;
[...]
To Evaluate() add
if( nodalaccess->flags & LWRT_PREVIEW ) return;
[...]
Should stop crashing if grangerfx correctly identified source.Last edited by Sensei; 05-07-2012 at 08:55 PM.
-
05-07-2012, 08:56 PM #27
-
05-07-2012, 09:04 PM #28TrueArt Support
- Join Date
- Feb 2003
- Location
- Poland
- Posts
- 5,188
Should not you sleep?

All of this is because it was not designed to work in interactive environment. And there should be just renderer index, and renderer pointer (this was added in some LW v9.x way too late and it's only available in Evaluate() - not enough). Send to any rendering function. Init/NewTime/Cleanup don't get them.. Surface Editor would have different renderer index, Node Editor different, VPR different, full render yet another. Plugin would have array of data, with 0 ... renderer_count - 1 entries. Each entry modified and read by different renderer.
-
05-07-2012, 09:11 PM #29
I tried to but that didn't work out...

Indeed, a render index would solve the problem elegantly as well.
The downside is duplicate memory use of big memory structures need to be handled in the respective calls... as they'd likely need to be duplicated.
Cheers,
Mike
-
05-07-2012, 09:15 PM #30TrueArt Support
- Join Date
- Feb 2003
- Location
- Poland
- Posts
- 5,188
I am going to play Counter-Strike, you can join me killing police CTI tried to but that didn't work out...
There will be called Cleanup() (with renderer index), and memory will be freed.. So, I don't see that as issue.The downside is duplicate memory use of big memory structures need to be handled in the respective calls... as they'd likely need to be duplicated.
If node really cares about memory, it can not use renderer index, and instead use mutex as last resort.
I prefer speed of rendering than memory usage.



Reply With Quote
set processor affinity to one core and it now works perfectly with VPR. Cheers a bunch for looking into this Denis & D-Lab. Much appreciated.

Bookmarks