[odb-users] collection mapping error

c.sell at byterefinery.de c.sell at byterefinery.de
Mon Mar 6 10:19:43 EST 2017


Hi Boris,

it seems my assumptions were wrong. If I adapt the example to the  
exact same sequence of operations as the productive code (first a  
select, then an insert), it shows the exact same state at the  
respective points. bind() seems to be only executed once even across  
statements, and the data_binding_test_version() check always fails  
afterwards (in both my testcases, that is)

This leads me to the assumption that the issue lies not in binding,  
but rather in writing to the once bound memory area. I am back at  
point 0. Appreciate any guidance

Christian

Zitat von Boris Kolpackov <boris at codesynthesis.com>:

> Hi Christian,
>
> c.sell at byterefinery.de <c.sell at byterefinery.de> writes:
>
>> It appears that the binding code is not executed because in function
>> insert(), the data_binding_test_version () check fails:
>>
>>     if (sts.data_binding_test_version ())
>>     {
>>       const binding& id (sts.id_binding ());
>>       bind (sts.data_bind (), id.bind, id.count, di);
>>       sts.data_binding_update_version ();
>>     }
>>
>>
>> in my test case program, the if branch is entered once for the collection
>> object. With my target app, it isn't ever
>
> Yeah, that's fishy. Smells like memory corruption. You can try two things:
>
> 1. Try to plug your QImage implementation into the test case. The idea is
>    basically to try to "bring" the test case a step at a time closer to
>    your application and see what triggers the change.
>
> 2. Try to run something like valgrind on your application (or the test
>    case if you manage to make it fail).
>
> Boris





More information about the odb-users mailing list