Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MS Visual C++ Runtime Error at Timecode LUT Generation #5181

Closed
mixxxbot opened this issue Aug 22, 2022 · 4 comments
Closed

MS Visual C++ Runtime Error at Timecode LUT Generation #5181

mixxxbot opened this issue Aug 22, 2022 · 4 comments
Labels

Comments

@mixxxbot
Copy link
Collaborator

Reported by: asantoni
Date: 2009-05-31T20:12:37Z
Status: Fix Released
Importance: High
Launchpad Issue: lp382228


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.

@mixxxbot mixxxbot added the bug label Aug 22, 2022
@mixxxbot
Copy link
Collaborator Author

Commented by: asantoni
Date: 2009-05-31T20:44:04Z


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...

@mixxxbot
Copy link
Collaborator Author

Commented by: asantoni
Date: 2009-06-29T00:04:46Z


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: Pegasus-RPG
Date: 2009-06-29T01:07:31Z


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

@mixxxbot
Copy link
Collaborator Author

Issue closed with status Fix Released.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant