Ok, something weird is going on. Neither Sean nor I can figure this  
one, so we'd appreciate a second pair of eyes on this.

Somehow this timecode char* is getting passed along as 0x0 (ie. NULL).  
Here is an excerpt of the relevant code:

(vinylcontrolproxy.cpp)
  14     QList<QString> xwax_timecodes;
  15     QList<QString> scratchlib_timecodes;
  16
  17     xwax_timecodes.push_back(MIXXX_VINYL_SERATOCV02VINYLSIDEA);
  18     xwax_timecodes.push_back(MIXXX_VINYL_SERATOCV02VINYLSIDEB);
  19     xwax_timecodes.push_back(MIXXX_VINYL_SERATOCD);
  20     xwax_timecodes.push_back(MIXXX_VINYL_TRAKTORSCRATCHSIDEA);
  21     xwax_timecodes.push_back(MIXXX_VINYL_TRAKTORSCRATCHSIDEB);
  22     scratchlib_timecodes.push_back(MIXXX_VINYL_FINALSCRATCH);
  23     scratchlib_timecodes.push_back(MIXXX_VINYL_MIXVIBESDVSCD);
  24
  25     //Figure out which type of timecoded vinyl we're using.
  26     strVinylType = m_pConfig- 
 >getValueString(ConfigKey("[VinylControl]","strVinylType"));
  27
  28     qDebug() << "Xwax timecodes:";
  29     for (int i = 0; i < xwax_timecodes.count(); i++)
  30     {
  31         qDebug() << xwax_timecodes[i];
  32     }
  33
  34     //Create the VinylControl object that matches the type of  
vinyl selected in the prefs...
  35     if (scratchlib_timecodes.contains(strVinylType))
  36     {
  37         m_pVinylControl = new VinylControlScratchlib(pConfig,  
_group);
  38     }
  39     else if (xwax_timecodes.contains(strVinylType))
  40     {
  41         m_pVinylControl = new VinylControlXwax(pConfig, _group);
  42     }


When VinylControlXwax is constructed, the code jumps to:

  35 VinylControlXwax::VinylControlXwax(ConfigObject<ConfigValue> *  
pConfig, const char * _group) : VinylControl(pConfig, _group)
  36 {
  37     dOldPos                 = 0.0f;
  38     dOldDiff                = 0.0f;
  39     bNeedleDown             = true;
  40     m_samples               = NULL;
  41     char * timecode  =  NULL;
  42     bShouldClose    = false;
  43     m_bCDMode               = false;
  44
  45     if (strVinylType == MIXXX_VINYL_SERATOCV02VINYLSIDEA)
  46         timecode = "serato_2a";
  47     else if (strVinylType == MIXXX_VINYL_SERATOCV02VINYLSIDEB)
  48         timecode = "serato_2b";
  49     else if (strVinylType == MIXXX_VINYL_SERATOCD) {
  50         timecode = "serato_cd";
  51         m_bCDMode = true;
  52     }
  53     else if (strVinylType == MIXXX_VINYL_TRAKTORSCRATCHSIDEA)
  54         timecode = "traktor_a";
  55     else if (strVinylType == MIXXX_VINYL_TRAKTORSCRATCHSIDEB)
  56         timecode = "traktor_b";
  57     else {
  58         qDebug() << "Unknown vinyl type, defaulting to serato_2a";
  59         timecode = "serato_2a";
  60     }
  61
  62     //qDebug() << "Xwax Vinyl control starting with a sample rate  
of:" << iSampleRate;
  63     qDebug() << "Building timecode lookup tables...";
  64
  65     //Build the timecode lookup table.
  66     if(timecoder_build_lookup(timecode) == -1)
  67     {
  68         qDebug() << "ERROR: Failed to build the timecode table!";
  69         return;
  70     }

=======

I should point out that in the VinylControlXwax code above, the  
variable strVinylType gets initialized in the VinylControl constructor.

Anyways, the backtrace we have shows that the "timecode" char* above  
is NULL, and I'm having trouble spotting the error in the logic above.  
The fact that this problem only seems to happen intermittently makes  
me worried that "something bad" is going on.

Thanks,
Albert



On 12-Jan-09, at 8:14 AM, Albert Santoni wrote:

> Did you run SVN update? I swear I fixed this in r2457...
>
> Thanks,
> Albert
>
> On 12-Jan-09, at 7:00 AM, Sean M. Pappalardo wrote:
>
>>
>>> Albert Santoni wrote:
>>>> past, I wonder if it's some uninitialized variable somewhere.
>>
>> It is:
>>
>> Debug: Defaulting to Serato...
>> Debug: Building timecode lookup tables...
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> [Switching to Thread 0xb546b910 (LWP 5182)]
>> 0xb63bc9ca in strcmp () from /lib/libc.so.6
>> (gdb) bt
>> #0  0xb63bc9ca in strcmp () from /lib/libc.so.6
>> #1  0x081fa496 in timecoder_build_lookup (timecode_name=0x0) at
>> lib/xwax/timecoder.c:188
>> #2  0x081edca3 in VinylControlXwax (this=0x8ab9418,  
>> pConfig=0x8448ff8,
>> _group=0x8225b22 "[Channel1]") at src/vinylcontrolxwax.cpp:62
>> #3  0x081eb82f in VinylControlProxy (this=0x8b42f30,
>> pConfig=0x8448ff8,
>> _group=0x8225b22 "[Channel1]") at src/vinylcontrolproxy.cpp:43
>> #4  0x081a0c7a in SoundManager::setupDevices (this=0xb4303080) at
>> src/soundmanager.cpp:382
>> #5  0x0810bd65 in MixxxApp (this=0x8436620, a=0x83b0e10, args=
>>     {qlMusicFiles = {{p = {d = 0xbf9d2690}, d = 0xbf9d2690}},
>> qLogFileName = {d = 0x0}, bStartInFullscreen = 108}, pSplash=0x0) at
>> src/mixxx.cpp:327
>> #6  0x080f968f in main (argc=1, argv=0xbf9d2754) at src/main.cpp:210
>>
>>
>> As can be seen from #1, the timecode_name argument is 0. Check around
>> line 40 in vinylcontrolproxy.cpp.
>>
>> Sean
>>
>> <
>> <
>> --------------------------------------------------------------------------------->
>>>
>> This E-Mail message has been scanned for viruses
>> and cleared by >>SmartMail<< from Smarter Technology, Inc.
>> <
>> <
>> --------------------------------------------------------------------------------->
>>>
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Mixxx-devel mailing list
> Mixxx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mixxx-devel


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Mixxx-devel mailing list
Mixxx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to