MS Visual C++ Runtime Error at Timecode LUT Generation

Bug #382228 reported by Albert Santoni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
High
Albert Santoni
1.7
Fix Released
High
Albert Santoni

Bug Description

We've definitely seen this bug come up before. There's some sort of race condition or something that can cause Mixxx to bomb at the following point, but I've had this magically disappear on me before:

Paste from Monstamash on IRC:

Debug: [Main]: Setting up plugin paths...
Debug: [Main]: ...done.
Debug: [Main]: Mixxx 1.7.0-beta1 "(svn 2412; built on: May 12 2009 @ 08:22:57) " is starting...
Debug: [Main]: Creating new settings directory "C:/Users/Dixon/Local Settings/Application Data/Mixxx/"
Debug: [Main]: No version number in configuration file. Setting to 1.7.0-beta1
Debug: [Main]: ControlObject::getControl returning NULL for ( "[Mixer Profile]" , "LoEQFrequency" )
Debug: [Main]: SampleRate 44100
Debug: [Main]: Latency 49
Debug: [Main]: createWaveformViewer()
Debug: [Main]: WaveformViewerFactory :: Creating new visual waveform
Debug: [Main]: WaveformViewerFactory :: Making new GL context.
Debug: [Main]: WaveformRenderer::setupControlObjects - VisualResample: 400
Debug: [Main]: Got bgColor QColor(ARGB 1, 0.101961, 0.101961, 0.101961)
Debug: [Main]: Got signalColor QColor(ARGB 1, 0.819608, 0.819608, 0.819608)
Debug: [Main]: createWaveformViewer()
Debug: [Main]: WaveformViewerFactory :: Creating new visual waveform
Debug: [Main]: WaveformViewerFactory :: Sharing existing GL context.
Debug: [Main]: WaveformRenderer::setupControlObjects - VisualResample: 400
Debug: [Main]: Got bgColor QColor(ARGB 1, 0.101961, 0.101961, 0.101961)
Debug: [Main]: Got signalColor QColor(ARGB 1, 0.819608, 0.819608, 0.819608)
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/."
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/.."
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/compressor.xml"
Debug: [Main]: LADSPA: Plugin "Compress" not found (required by preset "Compressor" )
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/delay5s.xml"
Debug: [Main]: LADSPA: Plugin "delay_5s" not found (required by preset "Delay5s" )
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/djflanger.xml"
Debug: [Main]: LADSPA: Plugin "djFlanger" not found (required by preset "DJFlanger" )
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/karaoke.xml"
Debug: [Main]: LADSPA: Plugin "karaoke" not found (required by preset "Karaoke" )
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/null.xml"
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/plate.xml"
Debug: [Main]: LADSPA: Plugin "Plate2x2" not found (required by preset "PlateReverb" )
Debug: [Main]: Setting up LADSPA EnableEffect "0"
Debug: [Main]: Key string: "EnableEffect0"
Debug: [Main]: Setting up LADSPA EnableEffect "1"
Debug: [Main]: Key string: "EnableEffect1"
Debug: [Main]: Setting up LADSPA EnableEffect "2"
Debug: [Main]: Key string: "EnableEffect2"
Debug: [Main]: Loading playlists and library tracks from XML...
Debug: [Main]: Track::readXML "C:/Users/Dixon/Local Settings/Application Data/Mixxx/mixxxtrack.xml"
Debug: [Main]: playlist name "Default 2"
Debug: [Main]: playlist name "Default 1"
Debug: [Main]: Promo track directory does not exist: "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/promo"
Debug: [Main]: Constructed LibraryScanner!!!
Debug: [Main]: FIXME: Need to tell the m_pPlaylistListModel to refresh in src\track.cpp on line: 1361
Debug: [Main]: Starting Library Scanner...
Debug: [Main]: Trying to add 1112 songs to the library playlist
Debug: [Main]: Adjusting column widths: tracktable width = 100 1% of that is: 1 FIXME: this should be done when initalizing the skin.
Debug: [Main]: Shrinking Title/Comment for small screen...
Debug: [Main]: FIXME: repaintEverything switches table model and shouldn't do that when viewing the playlist model in src\wtracktableview.cpp: 227
Debug: [Main]: selectedAPI is: "Windows DirectSound"
Debug: [Main]: loadSettings: 9 100 "FastCut"
Debug: [Main]: slotApply crossfader: 9 "FastCut"
Debug: [Main]: BPM Scheme File ConfigKey not set or file missing... setting to "C:/Users/Dixon/Local Settings/Application Data/Mixxx/mixxxbpmscheme.xml"
Debug: [Main]: BpmSchemes::readXML "C:/Users/Dixon/Local Settings/Application Data/Mixxx/mixxxbpmscheme.xml"
Debug: [Main]: getting midi device list, size 0 and: ""
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/."
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/.."
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/compressor.xml"
Debug: [Main]: LADSPA: Plugin "Compress" not found (required by preset "Compressor" )
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/delay5s.xml"
Debug: [Main]: LADSPA: Plugin "delay_5s" not found (required by preset "Delay5s" )
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/djflanger.xml"
Debug: [Main]: LADSPA: Plugin "djFlanger" not found (required by preset "DJFlanger" )
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/karaoke.xml"
Debug: [Main]: LADSPA: Plugin "karaoke" not found (required by preset "Karaoke" )
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/null.xml"
Debug: [Main]: LADSPA: file "C:/Users/Dixon/Downloads/Mixxx-1.7.0~beta1-Qt4.5.0-win32/skins/Collusion (1280-WS)/../../ladspa_presets/plate.xml"
Debug: [Main]: LADSPA: Plugin "Plate2x2" not found (required by preset "PlateReverb" )
Debug: [Main]: Setting up LADSPA EnableEffect "0"
Debug: [Main]: Key string: "EnableEffect0"
Debug: [Main]: Setting up LADSPA EnableEffect "1"
Debug: [Main]: Key string: "EnableEffect1"
Debug: [Main]: Setting up LADSPA EnableEffect "2"
Debug: [Main]: Key string: "EnableEffect2"
Debug: [Main]: SoundManager::setupDevices()
Debug: [Main]: Building timecode lookup tables...
Debug: [Main]: Building timecode lookup tables...

This is fairly important to try and fix, since this could be making up a fair number of our crash-on-startup and even crash-on-second-startup bugs.

Revision history for this message
Albert Santoni (gamegod) wrote :

So Adam cracked this one:

<adam_d> i just had a quick look at this build_lookup_tables thing
<adam_d> it accesses this static list of definitions
                    def = &timecode_def[0]
<adam_d> and then does a load of stuff
 which modifies that pointer
 like it mallocs the table
<adam_d> and sets def->lookup to be a pointer to something
 and then modifies def->lookup[i]
 if you run two of these at once, they're both going to be fighting over the same lookup table

Looking back, the problem's pretty clear now. It's going to be a decent amount of coding to fix it up though. I'll get on this before the next beta...

Changed in mixxx:
assignee: nobody → Albert Santoni (gamegod)
Revision history for this message
Albert Santoni (gamegod) wrote :

For the record, I wasn't a complete idiot when I wrote this code originally. The code _never_ gets executed in parallel, so the worst that can happen is a double free, which was an honest mistake. I can confirm that my fix (in r2439) does fix the memory leak I was aware of before though.

Albert Santoni (gamegod)
Changed in mixxx:
status: Confirmed → Fix Committed
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Targeting to the 1.7 release branch, unless you committed to trunk too.

Changed in mixxx:
milestone: 1.7.0 → none
status: Fix Committed → Confirmed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Confirmed → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5181

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.