I am experiencing an intermittent crash when using the current playlist automation interface to reset the nowplaying list. My code uses the interface to first clear nowplaying, by calling RemoveAllFiles, then
adding a sequence of files using AddFileByKey, adding the files at the last position in every case. This code often works correctly, but if invoked enough times, eventually causes a crash. The automation calls are made from a separate thread, and the the crash never occurs until my thread is finished processing. I'm running MC 11.1.200. Any help would be greatly appreciated - this is the last holdup keeping me from sending out my application to an anxious client for early testing. The other automation interfaces work very well for me, BTW.
The error reported in the VC++ debugger is:
HEAP[Media Center.exe]: Invalid Address specified to RtlFreeHeap( 003B0000, 00F34110 )
Windows has triggered a breakpoint in Media Center.exe.
This may be due to a corruption of the heap, and indicates a bug in Media Center.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information
The program '[1148] Media Center.exe: Native' has exited with code 0 (0x0).
The call stack in VC++ is identical each time, as follows:
ntdll.dll!7c901230()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!7c96c943()
ntdll.dll!7c96cd80()
ntdll.dll!7c96df66()
ntdll.dll!7c926abe()
ntdll.dll!7c94a5d0()
ntdll.dll!7c94a5d0()
ntdll.dll!7c96e0d4()
ntdll.dll!7c94a5d0()
ntdll.dll!7c926abe()
JRTools.dll!0147de0c()
ntdll.dll!7c9268ad()
user32.dll!77d4882a()
user32.dll!77d4b4c0()
user32.dll!77d4b4cb()
Media Center.exe!0072cdcc()
Media Center.exe!0075a79b()
Media Center.exe!0043a68c()
Media Center.exe!006c1af8()
Media Center.exe!006069ad()
Media Center.exe!00435ae0()
Media Center.exe!00435a98()
Media Center.exe!00430ec0()
Media Center.exe!0043186c()
Media Center.exe!00775926()
Media Center.exe!0043288f()
Media Center.exe!00548c5f()
Media Center.exe!0054aa9e()
Media Center.exe!00546798()
Media Center.exe!00554411()
Media Center.exe!005470e3()
Media Center.exe!00546daa()
Media Center.exe!0075f3bb()
Media Center.exe!0075df2d()
Media Center.exe!0075bfe7()
Media Center.exe!0066b5d5()
Media Center.exe!0054a54d()
Media Center.exe!0075de9d()
Media Center.exe!0075df2d()
user32.dll!77d48734()
user32.dll!77d48816()
user32.dll!77d4c63f()
user32.dll!77d4c665()
JRTools.dll!014711ec()
user32.dll!77d4882a()
user32.dll!77d4c63f()
user32.dll!77d4b6a3()
gdi32.dll!77f15a1e()
user32.dll!77d484b2()
user32.dll!77d486be()
Media Center.exe!004084f2()
Media Center.exe!0075f3bb()
Media Center.exe!005f6ea5()
Media Center.exe!0075f3bb()
user32.dll!77d4882a()
user32.dll!77d4c63f()
Media Center.exe!0075bfe7()
Media Center.exe!004e53bc()
Media Center.exe!0075bfe7()
Media Center.exe!0075de9d()
JRTools.dll!0147de0c()
JRTools.dll!01473858()
user32.dll!77d48734()
user32.dll!77d48816()
user32.dll!77d4b4c0()
user32.dll!77d4b50c()
ntdll.dll!7c90eae3()
user32.dll!77d494be()
user32.dll!77d4d890()
user32.dll!77d4b903()
Media Center.exe!005837c0()
Media Center.exe!004ac016()
Media Center.exe!00527c83()
Media Center.exe!0075f3bb()
Media Center.exe!0075bfe7()
Media Center.exe!0075de9d()
Media Center.exe!0075bfe7()
Media Center.exe!0075de9d()
Media Center.exe!0075df2d()
user32.dll!77d48734()
user32.dll!77d48816()
user32.dll!77d489cd()
user32.dll!77d491f1()
user32.dll!77d48a10()
Media Center.exe!004ac1c8()
Media Center.exe!0075b3ff()
Media Center.exe!00762e5c()
Media Center.exe!0072c3e8()
Media Center.exe!0072c27d()
kernel32.dll!7c816fd7()
Media Center.exe!0072006f()
Media Center.exe!0074002c()
Media Center.exe!00640047()
Media Center.exe!00640047()
Media Center.exe!00630072()
Media Center.exe!00540079()
Media Center.exe!006e006f()
Media Center.exe!00640047()
Media Center.exe!005f0073()
Media Center.exe!00640047()
Media Center.exe!005f0073()
Media Center.exe!0072006f()
Media Center.exe!0072006f()
Media Center.exe!00740072()
Media Center.exe!00630072()
Media Center.exe!00540079()
Media Center.exe!006e006f()
Media Center.exe!0072006f()
Media Center.exe!0072006f()
Media Center.exe!0072006f()
Media Center.exe!0072006f()
Media Center.exe!00630072()
Media Center.exe!00540079()
Media Center.exe!006e006f()
Media Center.exe!0072006f()
Media Center.exe!0072006f()
Media Center.exe!0072006f()
Media Center.exe!0072006f()
Media Center.exe!00630072()
Media Center.exe!00540079()
Media Center.exe!006e006f()
Media Center.exe!0072006f()
Media Center.exe!005f0073()
Media Center.exe!0072006f()
Media Center.exe!005f0073()
Media Center.exe!00650000()
Media Center.exe!00640047()
Media Center.exe!00640047()
Media Center.exe!00700074()
Media Center.exe!00700074()
Media Center.exe!00740072()
Media Center.exe!00740072()
Media Center.exe!00740072()
Media Center.exe!00740072()
Media Center.exe!00740072()
Media Center.exe!00740072()
Media Center.exe!00700074()
Media Center.exe!00740072()
Media Center.exe!00700074()
Media Center.exe!00740072()
Media Center.exe!00700074()
Media Center.exe!00740072()
Media Center.exe!00700074()
Media Center.exe!00740072()
Media Center.exe!00700074()
Media Center.exe!00740072()
Media Center.exe!00700074()
Maybe a clue - I notice when building the app from scratch, I get warnings emitted when processing the media center Type Library, as follows: (note that one of these functions is part of CurPlaylistAutomation)
c:\documents and settings\scott borduin\my documents\visual studio 2005\projects\jrmcserver\jrmcserver\stdafx.h(39) : warning C4278: 'DeleteFile': identifier in type library '\Program Files\J River\Media Center 11\Media Center.tlb' is already a macro; use the 'rename' qualifier
1>c:\documents and settings\scott borduin\my documents\visual studio 2005\projects\jrmcserver\jrmcserver\stdafx.h(39) : warning C4278: 'MoveFile': identifier in type library '\Program Files\J River\Media Center 11\Media Center.tlb' is already a macro; use the 'rename' qualifier
1>c:\documents and settings\scott borduin\my documents\visual studio 2005\projects\jrmcserver\jrmcserver\stdafx.h(39) : warning C4278: 'ReportEvent': identifier in type library '\Program Files\J River\Media Center 11\Media Center.tlb' is already a macro; use the 'rename' qualifier