CoverArtDAO could probably use a DISALLOW_COPY_AND_ASSIGN to prevent
creating a local variable instead of a reference like that :).

On Fri, Sep 26, 2014 at 11:39 AM, RJ Ryan <russelljr...@gmail.com> wrote:

> Stack trace?
>
> m_CoverArtDAO is a local variable so it's destroyed at the end of the
> scope yet the pointer that is passed to CoverArtCache lasts as long as
> CoverArtCache lasts -- and CoverArtCache uses it when you call methods on
> the cache. So any method call to CAC that is done after the test completes
> will potentially dereference a junk pointer.
>
> Tests run in the same process so global state like the CoverArtCache will
> last across tests. I think you should call CoverArtCache::destroy() and
> create() in setUp and tearDown for each test.
>
> On Fri, Sep 26, 2014 at 11:25 AM, Max Linke <max_li...@gmx.de> wrote:
>
>> Hi
>>
>> I'm trying to write a new test for the new Cover feature but I get a
>> segfault.
>> The segfault happens in line 105 if coverartcache_test.cpp, see link
>>
>>
>> https://github.com/kain88-de/mixxx/blob/fix-reload-embedded-cover/src/test/coverartcache_test.cpp#L105
>>
>> I have no clue why this segfaults. The pointer I pass to the function is
>> valid.
>>
>> best Max
>>
>>
>> ------------------------------------------------------------------------------
>> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
>> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
>> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
>> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Get Mixxx, the #1 Free MP3 DJ Mixing software Today
>> http://mixxx.org
>>
>>
>> Mixxx-devel mailing list
>> Mixxx-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mixxx-devel
>>
>
>
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Get Mixxx, the #1 Free MP3 DJ Mixing software Today
http://mixxx.org


Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to