[Bf-cycles] Cycles standalone questions

haggi krey haggi at haggi.de
Sun Nov 1 19:41:22 CET 2015

Okay, I solved the problem by replacing the
/ss->register_closure(name, id, params, prepare, NULL, 16);
/ss->register_closure(name, id, params, prepare, NULL);
/what seems to work. But now I have a different problem. My application 
crashes with:

f:\dd\vctools\crt\crtw32\stdcpp\thr\mutex.c(40): mutex destroyed while busy

It seems that I forgot to destroy anything. If anyone could have a look, 
it would be great. I could not find out what's missing.
The program cancels correctly but something seems not to be deleted 
correctly because the error occurs if the program exits.

My code looks like this:

#include <stdio.h>
#include <fstream>
#include <iostream>
#include <tchar.h>

#include "buffers.h"
#include "camera.h"
#include "device.h"
#include "scene.h"
#include "session.h"
#include "integrator.h"

ccl::Session *session;
ccl::Scene *scene;
string filepath;
ccl::SceneParams scene_params;
ccl::SessionParams session_params;
ccl::BufferParams buffer_params;

static void session_print_status()
     int sample, tile;
     double total_time, sample_time, render_time;
     string status, substatus;

     sample = session->progress.get_sample();
     session->progress.get_tile(tile, total_time, sample_time, render_time);
     session->progress.get_status(status, substatus);

     std::cout << "Sample " << sample << " Status:" << status << " 
Substatus: " << substatus << "\n";

     if (sample > 300)
         std::cout << "Finish session.\n";

void doit()
     buffer_params.width = 640;
     buffer_params.height = 480;
     buffer_params.full_width = 640;
     buffer_params.full_height = 480;

     session_params.output_path = 
     scene = new Scene(scene_params, session_params.device);
     session_params.samples = 10;
     session_params.progressive = true;
     session = new Session(session_params);
     session->reset(buffer_params, session_params.samples);
     session->scene = scene;


void main(int argc, const char **argv)
     std::cout << "Done.\n";

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20151101/b9a49526/attachment.htm 

More information about the Bf-cycles mailing list