View Issue Details

IDProjectCategoryView StatusLast Update
0019276MediaMonkey 5Extensions frameworkpublic2022-08-05 15:53
Reporterzvezdan Assigned To 
PrioritynoneSeverityminorReproducibilityalways
Status feedbackResolutionopen 
Summary0019276: "Read/Write lock not acquired!" error message is not very informative
DescriptionI don't have any use of this message showing that it happened in (D:\Delphi\MediaMonkeyCleanTrunk\HTML5Monkey\BaseShared.pas, line 4071). It would be useful if it shows at least in which script it happened, if not together with the line number.

And it is really frustrating that this error message could be terminated only by killing the program in Task Manager, because I have that thing very often.
TagsNo tags attached.
Fixed in build

Activities

Ludek

2022-07-26 14:11

developer   ~0068902

Last edited: 2022-07-26 14:12

This is kind of assertion when you try to access item in the list by its index and the list isn't locked for writing/reading
I think that in the crash log the accompanying JS code is shown unless this happens in a background tasks?

Do you have example crash log (or code) to analyze?

zvezdan

2022-07-26 15:07

updater   ~0068912

window.uitools.addToolButton('righttoolbuttons', 'remove', function () {
    var selTracks = window.uitools.getSelectedTracklist();
    selTracks.whenLoaded().then(function () {
        var oSelTrack = selTracks.getValue(0);
    });
}, 'Test');
MediaMonkeyEngine (Read lock not acquired!).el (67,928 bytes)   
��EurekaLog 7.9.2.0 update 2 95F78409B7627A4982562C0EDFD745D6 00000000000000000000000000000000 DA39A3EE5E6B4B0D3255BFEF95601890AFD80709 545349DE7E5A264DA7D818E3A67D1CA5



Application:

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  1.1 Start Date      : Tue, 26 Jul 2022 17:01:01 +0200

  1.2 Name/Description: MediaMonkeyEngine.exe - (MediaMonkey 5)

  1.3 Version Number  : 5.0.4.2657

  1.4 Parameters      : --type=renderer --locales-dir-path="F:\Virtual Machines\Shared Folder\Temp\Software\MediaMonkey\Portable MM5\chromium\98\locales" --log-severity=disable --uncaught-exception-stack-size=10 --user-data-dir="C:\Users\Zvezdan\AppData\Local\CEF\User Data" --no-sandbox --autoplay-policy=no-user-gesture-required --log-file="F:\Virtual Machines\Shared Folder\Temp\Software\MediaMonkey\Portable MM5\debug.log" --remote-debugging-port=9222 --js-flags="\"--expose-gc\"" --lang=en-US --device-scale-factor=1 --num-raster-threads=2 --enable-main-frame-before-activation --renderer-client-id=5 --launch-time-ticks=3699823289309 --mojo-platform-channel-handle=1956 --field-trial-handle=1772,14789184350231514938,17260196892120065228,131072 --disable-features=IsolateOrigins,site-per-process /prefetch:1

  1.5 Compilation Date: Thu, 14 Jul 2022 23:54:24 +0200

  1.6 Up Time         : 31 second(s)



Exception:

----------------------------------------------------------------------------------------------------------------------

  2.1 Date          : Tue, 26 Jul 2022 17:01:33 +0200

  2.2 Address       : 015CA8ED

  2.3 Module Name   : MediaMonkeyEngine.exe - (MediaMonkey 5)

  2.4 Module Version: 5.0.4.2657

  2.5 Type          : EAssertionFailed

  2.6 Message       : Read lock not acquired! (D:\Delphi\MediaMonkeyCleanTrunk\HTML5Monkey\BaseShared.pas, line 4077).

  2.7 ID            : AB1A0000

  2.8 Count         : 1

  2.9 Status        : New

  2.10 Note         :

  2.11 Sent         : 0



Active Controls:

------------------------------------------------

  4.1 Form Class   : TMediaMonkeyInstanceManager

  4.2 Form Text    : MediaMonkey5

  4.3 Control Class:

  4.4 Control Text :



Steps to reproduce:

------------

  8.1 Text:





Call Stack Information:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

|Methods |Details|Stack   |Address |Module               |Offset  |Source               |Unit             |Class                                            |Procedure/Method            |Line      |

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

|*Exception Thread: ID=364; Parent=0; Priority=15                                                                                                                                                   |

|Class=; Name=MAIN                                                                                                                                                                                  |

|DeadLock=0; Wait Chain=                                                                                                                                                                            |

|Comment=                                                                                                                                                                                           |

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

|7FFFFFFE|04     |00000000|015CA8ED|MediaMonkeyEngine.exe|011CA8ED|BaseShared.pas       |BaseMedia        |{BaseShared}TSharedList<BaseMedia.ISongListData> |AssertReadLock              |4077[10]  |

|00000008|04     |0018EB4C|015CE51E|MediaMonkeyEngine.exe|011CE51E|BaseShared.pas       |BaseMedia        |{BaseShared}TSharedList<BaseMedia.ISongListData> |getValue                    |6294[1]   |

|00000008|04     |0018EB54|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018EB54|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018EB74|004BCE3D|MediaMonkeyEngine.exe|000BCE3D|System.Rtti.pas      |System.Rtti      |                                                 |RawInvoke                   |7021[46]  |

|00000008|04     |0018EB84|004BD213|MediaMonkeyEngine.exe|000BD213|System.Rtti.pas      |System.Rtti      |                                                 |Invoke                      |7216[57]  |

|00000008|04     |0018EB8C|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018EB8C|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018EBF4|004BCFD0|MediaMonkeyEngine.exe|000BCFD0|System.Rtti.pas      |System.Rtti      |                                                 |Invoke                      |7159[0]   |

|00000008|04     |0018EBF4|004B396F|MediaMonkeyEngine.exe|000B396F|System.Rtti.pas      |System.Rtti      |TRttiInstanceMethodEx                            |DispatchInvoke              |5344[97]  |

|00000008|04     |0018EC0C|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018EC0C|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018ECF0|004BD5A4|MediaMonkeyEngine.exe|000BD5A4|System.Rtti.pas      |System.Rtti      |TRttiMethod                                      |Invoke                      |7875[1]   |

|00000008|04     |0018ED00|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018ED00|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018ED30|004BD560|MediaMonkeyEngine.exe|000BD560|System.Rtti.pas      |System.Rtti      |TRttiMethod                                      |Invoke                      |7874[0]   |

|00000008|04     |0018ED30|01A19FBC|MediaMonkeyEngine.exe|01619FBC|ceflib.pas           |ceflib           |                                                 |DefaultExecute              |24690[301]|

|00000008|04     |0018ED4C|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018ED4C|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018EE1C|01A197C0|MediaMonkeyEngine.exe|016197C0|ceflib.pas           |ceflib           |                                                 |DefaultExecute              |24389[0]  |

|00000008|04     |0018EE1C|0191B395|MediaMonkeyEngine.exe|0151B395|BaseApp.pas          |BaseApp          |TSharedWindowHandler                             |Execute                     |8527[4]   |

|00000008|04     |0018EE3C|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018EE3C|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018EE58|01A0F4F4|MediaMonkeyEngine.exe|0160F4F4|ceflib.pas           |ceflib           |                                                 |cef_v8_handler_execute      |19987[5]  |

|00000008|04     |0018EE6C|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018EE6C|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018F4C4|0040BF58|MediaMonkeyEngine.exe|0000BF58|System.pas           |System           |                                                 |_FinalizeArray              |31051[0]  |

|00000008|04     |0018F4C4|0040BF2C|MediaMonkeyEngine.exe|0000BF2C|System.pas           |System           |                                                 |_FinalizeRecord             |30891[25] |

|00000008|04     |0018F5AC|01A12665|MediaMonkeyEngine.exe|01612665|ceflib.pas           |ceflib           |TCefv8ValueRef                                   |ExecuteFunction             |21840[17] |

|00000008|04     |0018F5C4|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018F5C4|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018F5D0|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018F5D0|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018F618|0197436D|MediaMonkeyEngine.exe|0157436D|BaseShared.pas       |BaseShared       |TPromise                                         |promiseLoop                 |10059[39] |

|00000008|04     |0018F62C|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018F62C|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018F638|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018F638|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018F6B0|019741B0|MediaMonkeyEngine.exe|015741B0|BaseShared.pas       |BaseShared       |TPromise                                         |promiseLoop                 |10020[0]  |

|00000008|04     |0018F6B0|01974E28|MediaMonkeyEngine.exe|01574E28|BaseShared.pas       |BaseShared       |TPromise                                         |processLoops                |10229[55] |

|00000008|04     |0018F6C4|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018F6C4|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018F72C|01974BB0|MediaMonkeyEngine.exe|01574BB0|BaseShared.pas       |BaseShared       |TPromise                                         |processLoops                |10174[0]  |

|00000008|04     |0018F72C|01975525|MediaMonkeyEngine.exe|01575525|BaseShared.pas       |BaseShared       |TPromise                                         |handlePromise               |10299[27] |

|00000008|04     |0018F748|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018F748|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018F77C|01975380|MediaMonkeyEngine.exe|01575380|BaseShared.pas       |BaseShared       |TPromise                                         |handlePromise               |10272[0]  |

|00000008|04     |0018F77C|019752C0|MediaMonkeyEngine.exe|015752C0|BaseShared.pas       |BaseShared       |sync$12018$ActRec                                |$0$0$Body                   |10267[1]  |

|00000008|04     |0018F788|01971670|MediaMonkeyEngine.exe|01571670|BaseShared.pas       |BaseShared       |                                                 |processFastTaskRec          |9565[22]  |

|00000008|04     |0018F790|0040993B|MediaMonkeyEngine.exe|0000993B|System.pas           |System           |                                                 |_HandleFinally              |19169[74] |

|00000008|04     |0018F790|0040991E|MediaMonkeyEngine.exe|0000991E|System.pas           |System           |                                                 |_HandleFinally              |19153[58] |

|00000008|04     |0018F7C8|01971570|MediaMonkeyEngine.exe|01571570|BaseShared.pas       |BaseShared       |                                                 |processFastTaskRec          |9543[0]   |

|00000008|04     |0018F7C8|019719F9|MediaMonkeyEngine.exe|015719F9|BaseShared.pas       |BaseShared       |TFastTask                                        |Execute                     |9627[1]   |

|00000008|04     |0018F7D4|01A0F61D|MediaMonkeyEngine.exe|0160F61D|ceflib.pas           |ceflib           |                                                 |cef_task_execute            |20002[1]  |

|00000008|04     |0018FD30|0040E590|MediaMonkeyEngine.exe|0000E590|System.pas           |System           |TInterfacedObject                                |_AddRef                     |36161[0]  |

|00000008|04     |0018FD30|01A0F3CC|MediaMonkeyEngine.exe|0160F3CC|ceflib.pas           |ceflib           |                                                 |cef_base_add_ref            |19105[1]  |

|00000008|04     |0018FD9C|01A0D13E|MediaMonkeyEngine.exe|0160D13E|ceflib.pas           |ceflib           |                                                 |CefLoadLib                  |18573[630]|

|00000008|04     |0018FEFC|01A0BC2D|MediaMonkeyEngine.exe|0160BC2D|ceflib.pas           |ceflib           |                                                 |CefLoadLibDefault           |17913[2]  |

|00000008|04     |0018FF44|00F1EA39|MediaMonkeyEngine.exe|00B1EA39|AppInitCode.pas      |AppInitCode      |                                                 |doAppInitialize             |2016[135] |

|00000008|04     |0018FF74|01A9D070|MediaMonkeyEngine.exe|0169D070|MediaMonkeyEngine.dpr|MediaMonkeyEngine|                                                 |Initialization              |129[2]    |

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

|                                                                                                                                                                                                   |

|Running Thread: ID=10672; Parent=3340; Priority=-2                                                                                                                                                 |

|Class=TBQThread; Name= (GenThread.TGenThread.Execute)                                                                                                                                              |

|DeadLock=0; Wait Chain=thread: [ $29B0 / 10672 ] is blocked                                                                                                                                        |

|Comment=                                                                                                                                                                                           |

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

|7FFFFFFE|01     |00000000|7733FD31|ntdll.dll            |0001FD31|                     |                 |                                                 |                            |          |

|00000008|04     |0B33FD54|019FB692|MediaMonkeyEngine.exe|015FB692|AppManager.pas       |AppManager       |TCallBacks.ProcessEventDoneCallbacks$11356$ActRec|$0$Body                     |1154[94]  |

|00000008|04     |0B33FDB8|007EA7D2|MediaMonkeyEngine.exe|003EA7D2|Workers.pas          |Workers          |TAnonProcTask                                    |execute                     |963[3]    |

|00000008|04     |0B33FDC0|007EA819|MediaMonkeyEngine.exe|003EA819|Workers.pas          |Workers          |TAnonProcTask                                    |execute                     |972[12]   |

|00000008|04     |0B33FDC0|007EA7DD|MediaMonkeyEngine.exe|003EA7DD|Workers.pas          |Workers          |TAnonProcTask                                    |execute                     |963[3]    |

|00000008|04     |0B33FDD8|007E9B7E|MediaMonkeyEngine.exe|003E9B7E|Workers.pas          |Workers          |TBackgroundQueue                                 |ProcessTasks                |779[111]  |

|00000008|04     |0B33FE74|007EB43F|MediaMonkeyEngine.exe|003EB43F|Workers.pas          |Workers          |TBQThread                                        |GenExecute                  |1192[2]   |

|00000008|04     |0B33FE90|01A253F1|MediaMonkeyEngine.exe|016253F1|GenThread.pas        |GenThread        |TGenThread                                       |Execute                     |893[33]   |

|00000008|04     |0B33FE98|01A25417|MediaMonkeyEngine.exe|01625417|GenThread.pas        |GenThread        |TGenThread                                       |Execute                     |899[39]   |

|00000008|04     |0B33FE98|01A253FF|MediaMonkeyEngine.exe|016253FF|GenThread.pas        |GenThread        |TGenThread                                       |Execute                     |893[33]   |

|00000008|04     |0B33FEF8|00522ADD|MediaMonkeyEngine.exe|00122ADD|System.Classes.pas   |System.Classes   |                                                 |ThreadProc                  |14561[16] |

|00000008|04     |0B33FF00|00522AFA|MediaMonkeyEngine.exe|00122AFA|System.Classes.pas   |System.Classes   |                                                 |ThreadProc                  |14563[18] |

|00000008|04     |0B33FF00|00522AE8|MediaMonkeyEngine.exe|00122AE8|System.Classes.pas   |System.Classes   |                                                 |ThreadProc                  |14561[16] |

|00000008|04     |0B33FF28|005DE0CC|MediaMonkeyEngine.exe|001DE0CC|EThreadsManager.pas  |EThreadsManager  |                                                 |NakedBeginThreadWrapper     |1353[5]   |

|00000008|04     |0B33FF38|007B6D5B|MediaMonkeyEngine.exe|003B6D5B|EExceptionManager.pas|EExceptionManager|                                                 |DefaultThreadHandleException|5777[8]   |

|00000008|04     |0B33FF44|007B6D94|MediaMonkeyEngine.exe|003B6D94|EExceptionManager.pas|EExceptionManager|                                                 |DefaultThreadHandleException|5782[13]  |

|00000008|04     |0B33FF44|007B6D6F|MediaMonkeyEngine.exe|003B6D6F|EExceptionManager.pas|EExceptionManager|                                                 |DefaultThreadHandleException|5779[10]  |

|00000008|04     |0B33FF5C|005DFE86|MediaMonkeyEngine.exe|001DFE86|EThreadsManager.pas  |EThreadsManager  |                                                 |ThreadWrapperCT             |2278[22]  |

|7FFFFFFE|04     |00000000|01A24BF3|MediaMonkeyEngine.exe|01624BF3|GenThread.pas        |GenThread        |TGenThread                                       |Create                      |660[38]   |

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

|                                                                                                                                                                                                   |

|Running Thread: ID=3460; Parent=364; Priority=-2                                                                                                                                                   |

|Class=TBQThread; Name= (GenThread.TGenThread.Execute)                                                                                                                                              |

|DeadLock=0; Wait Chain=thread: [ $0D84 / 3460 ] is blocked                                                                                                                                         |

|Comment=                                                                                                                                                                                           |

|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

|7FFFFFFE|01     |00000000|773400FD|ntdll.dll            |000200FD|                     |                 |                                                 |                            |          |

|00000008|04     |0AE3FD30|004091B8|MediaMonkeyEngine.exe|000091B8|System.pas           |System           |TMonitor                                         |GetFieldAddress             |17258[0]  |

|00000008|04     |0AE3FD30|00408E80|MediaMonkeyEngine.exe|00008E80|System.pas           |System           |TMonitor                                         |Destroy                     |17035[0]  |

|00000008|04     |0AE3FD34|004085A3|MediaMonkeyEngine.exe|000085A3|System.pas           |System           |TObject                                          |CleanupInstance             |15668[24] |

|00000008|04     |0AE3FD3C|0040578C|MediaMonkeyEngine.exe|0000578C|GETMEM.INC           |System           |                                                 |SysFreeMem                  |2900[0]   |

|00000008|04     |0AE3FD3C|00406B84|MediaMonkeyEngine.exe|00006B84|System.pas           |System           |                                                 |_FreeMem                    |4364[20]  |

|00000008|04     |0AE3FD40|00408350|MediaMonkeyEngine.exe|00008350|System.pas           |System           |TObject                                          |FreeInstance                |15456[2]  |

|00000008|04     |0AE3FD50|007B6C91|MediaMonkeyEngine.exe|003B6C91|EExceptionManager.pas|EExceptionManager|                                                 |DestroyHook                 |5750[11]  |

|00000008|04     |0AE3FD60|0040E5C6|MediaMonkeyEngine.exe|0000E5C6|System.pas           |System           |TInterfacedObject                                |_Release                    |36174[4]  |

|00000008|04     |0AE3FDA4|0040578C|MediaMonkeyEngine.exe|0000578C|GETMEM.INC           |System           |                                                 |SysFreeMem                  |2900[0]   |

|00000008|04     |0AE3FDA4|00406B84|MediaMonkeyEngine.exe|00006B84|System.pas           |System           |                                                 |_FreeMem                    |4364[20]  |

|00000008|04     |0AE3FDA8|00408350|MediaMonkeyEngine.exe|00008350|System.pas           |System           |TObject                                          |FreeInstance                |15456[2]  |

|00000008|04     |0AE3FDB0|00408BDA|MediaMonkeyEngine.exe|00008BDA|System.pas           |System           |                                                 |_ClassDestroy               |16799[0]  |

|00000008|04     |0AE3FDB4|01A22776|MediaMonkeyEngine.exe|01622776|BaseClasses.pas      |BaseClasses      |TCancellableTask                                 |Destroy                     |1339[3]   |

|00000008|04     |0AE3FDC0|00499FEA|MediaMonkeyEngine.exe|00099FEA|System.SyncObjs.pas  |System.SyncObjs  |THandleObject                                    |WaitFor                     |707[13]   |

|00000008|04     |0AE3FDE4|007E9A02|MediaMonkeyEngine.exe|003E9A02|Workers.pas          |Workers          |TBackgroundQueue                                 |ProcessTasks                |739[71]   |

|00000008|04     |0AE3FE74|007EB43F|MediaMonkeyEngine.exe|003EB43F|Workers.pas          |Workers          |TBQThread                                        |GenExecute                  |1192[2]   |

|00000008|04     |0AE3FE90|01A253F1|MediaMonkeyEngine.exe|016253F1|GenThread.pas        |GenThread        |TGenThread                                       |Execute                     |893[33]   |

|00000008|04     |0AE3FE98|01A25417|MediaMonkeyEngine.exe|01625417|GenThread.pas        |GenThread        |TGenThread                                       |Execute                     |899[39]   |

|00000008|04     |0AE3FE98|01A253FF|MediaMonkeyEngine.exe|016253FF|GenThread.pas        |GenThread        |TGenThread                                       |Execute                     |893[33]   |

|00000008|04     |0AE3FEF8|00522ADD|MediaMonkeyEngine.exe|00122ADD|System.Classes.pas   |System.Classes   |                                                 |ThreadProc                  |14561[16] |

|00000008|04     |0AE3FF00|00522AFA|MediaMonkeyEngine.exe|00122AFA|System.Classes.pas   |System.Classes   |                                                 |ThreadProc                  |14563[18] |

|00000008|04     |0AE3FF00|00522AE8|MediaMonkeyEngine.exe|00122AE8|System.Classes.pas   |System.Classes   |                                                 |ThreadProc                  |14561[16] |

|00000008|04     |0AE3FF28|005DE0CC|MediaMonkeyEngine.exe|001DE0CC|EThreadsManager.pas  |EThreadsManager  |                                                 |NakedBeginThreadWrapper     |1353[5]   |

|00000008|04     |0AE3FF38|007B6D5B|MediaMonkeyEngine.exe|003B6D5B|EExceptionManager.pas|EExceptionManager|                                                 |DefaultThreadHandleException|5777[8]   |

|00000008|04     |0AE3FF44|007B6D94|MediaMonkeyEngine.exe|003B6D94|EExceptionManager.pas|EExceptionManager|                                                 |DefaultThreadHandleException|5782[13]  |

|00000008|04     |0AE3FF44|007B6D6F|MediaMonkeyEngine.exe|003B6D6F|EExceptionManager.pas|EExceptionManager|                                                 |DefaultThreadHandleException|5779[10]  |

|00000008|04     |0AE3FF5C|005DFE86|MediaMonkeyEngine.exe|001DFE86|EThreadsManager.pas  |EThreadsManager  |                                                 |ThreadWrapperCT             |2278[22]  |

|7FFFFFFE|04     |00000000|01A24BF3|MediaMonkeyEngine.exe|01624BF3|GenThread.pas        |GenThread        |TGenThread                                       |Create                      |660[38]   |

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



Assembler Information:

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

; Base Address: $15CA000, Allocation Base: $400000, Region Size: 5062656

; Allocation Protect: PAGE_EXECUTE_WRITECOPY, Protect: PAGE_EXECUTE_READ

; State: MEM_COMMIT, Type: MEM_IMAGE

;

;

; BaseMedia.{BaseShared}TSharedList<BaseMedia.ISongListData>.AssertReadLock (Line=4070 - Offset=18)

; -------------------------------------------------------------------------------------------------

015CA8A2  8B8308010000    MOV  EAX, [EBX+$00000108]

015CA8A8  40              INC  EAX

015CA8A9  83E001          AND  EAX, 1

015CA8AC  6BC00B          IMUL EAX, EAX, $0B

015CA8AF  8D448368        LEA  EAX, [EBX+EAX*4+$68]

015CA8B3  8945FC          MOV  [EBP-4], EAX

015CA8B6  EB3A            JMP  +$3A                       ; ($015CA8F2) BaseMedia.{BaseShared}TSharedList<BaseMedia.ISongListData>.AssertReadLock (Line=4079)

;

; Line=4074 - Offset=40

; ---------------------

015CA8B8  E8E3BF4500      CALL +$45BFE3                   ; ($01A268A0) GenThread.getThreadIndex

;

; Line=4075 - Offset=45

; ---------------------

015CA8BD  8B94830C010000  MOV  EDX, [EBX+EAX*4+$0000010C]

;

; Line=4076 - Offset=52

; ---------------------

015CA8C4  6BCA0B          IMUL ECX, EDX, $0B

015CA8C7  8D4C8B68        LEA  ECX, [EBX+ECX*4+$68]

015CA8CB  894DFC          MOV  [EBP-4], ECX

;

; Line=4077 - Offset=62

; ---------------------

015CA8CE  C1E205          SHL  EDX, 5

015CA8D1  8D94D30C020000  LEA  EDX, [EBX+EDX*8+$0000020C]

015CA8D8  833C8200        CMP  DWORD PTR [EDX+EAX*4], 0

015CA8DC  7F14            JG   +$14                       ; ($015CA8F2) BaseMedia.{BaseShared}TSharedList<BaseMedia.ISongListData>.AssertReadLock (Line=4079)

015CA8DE  B9ED0F0000      MOV  ECX, $00000FED

015CA8E3  BA08A95C01      MOV  EDX, $015CA908             ; ($015CA908) BaseMedia.{BaseShared}TSharedList<BaseMedia.ISongListData>.AssertReadLock (Line=4079) UNICODE: 'D:\Delphi\MediaMonkeyCleanTrunk\HTML5Monkey\BaseShared.pas' BaseMedia.{BaseShared}TSharedList<BaseMedia.ISongListData>.AssertReadLock (Line=4079)

015CA8E8  B88CA95C01      MOV  EAX, $015CA98C             ; ($015CA98C) BaseMedia.{BaseShared}TSharedList<BaseMedia.ISongListData>.AssertReadLock (Line=4079) UNICODE: 'Read lock not acquired!' BaseMedia.{BaseShared}TSharedList<BaseMedia.ISongListData>.AssertReadLock (Line=4079)

;

; Line=4077 - Offset=93

; ---------------------

015CA8ED  E812F9E3FE      CALL -$011C06EE                 ; ($0040A204) System._Assert  ; <-- EXCEPTION

;

; Line=4079 - Offset=98

; ---------------------

015CA8F2  8B45FC          MOV  EAX, [EBP-4]

015CA8F5  5B              POP  EBX

015CA8F6  59              POP  ECX

015CA8F7  5D              POP  EBP



Registers:

-----------------------------

EAX: 0018EA60   EDI: 00000FED

EBX: 015CA98C   ESI: 015CA908

ECX: 00000007   EBP: 0018EAB0

EDX: 00000000   ESP: 0018EA60

EIP: 7505B727   FLG: 00000216

EXP: 015CA8ED   STK: 0018EA60



Stack:               Memory Dump:

------------------   ---------------------------------------------------------------------------

0018EA9C: CCCCCCCC   015CA8ED: E8 12 F9 E3 FE 8B 45 FC 5B 59 5D C3 00 00 00 B0  ......E.[Y].....

0018EA98: CCCCCCCC   015CA8FD: 04 02 00 FF FF FF FF 3A 00 00 00 44 00 3A 00 5C  .......:...D.:.\

0018EA94: CCCCCCCC   015CA90D: 00 44 00 65 00 6C 00 70 00 68 00 69 00 5C 00 4D  .D.e.l.p.h.i.\.M

0018EA90: CCCCCCCC   015CA91D: 00 65 00 64 00 69 00 61 00 4D 00 6F 00 6E 00 6B  .e.d.i.a.M.o.n.k

0018EA8C: 0018EAE4   015CA92D: 00 65 00 79 00 43 00 6C 00 65 00 61 00 6E 00 54  .e.y.C.l.e.a.n.T

0018EA88: 0018EB20   015CA93D: 00 72 00 75 00 6E 00 6B 00 5C 00 48 00 54 00 4D  .r.u.n.k.\.H.T.M

0018EA84: 00000FED   015CA94D: 00 4C 00 35 00 4D 00 6F 00 6E 00 6B 00 65 00 79  .L.5.M.o.n.k.e.y

0018EA80: 015CA908   015CA95D: 00 5C 00 42 00 61 00 73 00 65 00 53 00 68 00 61  .\.B.a.s.e.S.h.a

0018EA7C: 015CA98C   015CA96D: 00 72 00 65 00 64 00 2E 00 70 00 61 00 73 00 00  .r.e.d...p.a.s..

0018EA78: 09BE9E50   015CA97D: 00 00 00 B0 04 02 00 FF FF FF FF 17 00 00 00 52  ...............R

0018EA74: 015CA8F2   015CA98D: 00 65 00 61 00 64 00 20 00 6C 00 6F 00 63 00 6B  .e.a.d. .l.o.c.k

0018EA70: 00000007   015CA99D: 00 20 00 6E 00 6F 00 74 00 20 00 61 00 63 00 71  . .n.o.t. .a.c.q

0018EA6C: 7505B727   015CA9AD: 00 75 00 69 00 72 00 65 00 64 00 21 00 00 00 66  .u.i.r.e.d.!...f

0018EA68: 00000000   015CA9BD: 8D 40 00 55 8B EC E8 A8 F7 FF FF 5D C3 8D 80 00  .@.U.......]....

0018EA64: 00000001   015CA9CD: 00 00 00 55 8B EC E8 A8 F7 FF FF 5D C3 8D 80 00  ...U.......]....

0018EA60: 0EEDFADE   015CA9DD: 00 00 00 C3 66 8D 80 00 00 00 00 64 66 8D 80 00  ....f......df...







zvezdan

2022-07-26 15:11

updater   ~0068913

Yes, I know where I should put the locked method, but with so many tracklists in my scripts and their reading/writing, it is quite easily to forget that silly locking thing.

zvezdan

2022-08-05 15:53

updater   ~0068979

Here is an example when your error message is not only uninformative, but it is misleading. I don't know how many days, if not weeks, I spent chasing this bug. And guess what, the Write lock error message is generated by the line that is executed within the modifyAsync method, so it should be locked for writing.

The steps to execute:
1. start DebugView;
2. install the attached script;
3. create 'ZDTest' playlist and add several tracks to it;
4. click on the script's toolbar button and wait 10-30 seconds -> Write lock not acquired!

Here is the code of init.js:
var goQueueListPlaylist;
var goQueueListTracks;

window.uitools.addToolButton('righttoolbuttons', 'remove', function () {
    var progress = app.backgroundTasks.createNew();
    var iQueueListTimeout = undefined;
    app.listen(app, 'playlistChange', (playlist, changeType, newValue, oldValue) => {
        if (playlist !== undefined && (changeType === undefined || changeType === 'tracklist') && goQueueListPlaylist && playlist.id === goQueueListPlaylist.id) {
            if (iQueueListTimeout) {
                clearTimeout(iQueueListTimeout);
                iQueueListTimeout = undefined;
            }
            iQueueListTimeout = window.requestTimeout(function () {
                goQueueListTracks = goQueueListPlaylist.getTracklist();
                // goQueueListTracks.whenLoaded().then(() => {
                // goQueueListTracks.locked(function () {
                // // if (goQueueListTracks.count > 0) {
                // var oQueueTrack = goQueueListTracks.getFastObject(0, oQueueTrack);
                // ODS('ZDTest5 - playlistChange - oQueueTrack.id: ' + oQueueTrack.id);
                // // }
                // });
                // });
            }, 100);
        }
    });
    app.playlists.getByTitleAsync('ZDTest').then(function(oCurPlaylist) {
        if (!oCurPlaylist) {
            ODS("ZDTest playlist doesn't exist");
            return;
        }
        goQueueListPlaylist = oCurPlaylist;
        (function loop() {
            setTimeout(function() {
                var oQueueList = goQueueListPlaylist.getTracklist();
                oQueueList.whenLoaded().then(function () {
                    goQueueListPlaylist.clearTracksAsync().then(() => {
                        goQueueListPlaylist.addTracksAsync(oQueueList).then(() => {
                            ODS('ZDTest5 - oQueueList.count: ' + oQueueList.count);
                            if (!progress.terminated && !window._cleanUpCalled) {
                                loop();
                            }
                        });
                    });
                });
            }, 250);
        })();
        (function loop() {
            setTimeout(function() {
                if (goQueueListTracks) {
                    goQueueListTracks.modifyAsync(() => {
                        if (goQueueListTracks.count > 0) {
                            // goQueueListTracks.beginUpdate();
                            goQueueListTracks.clearSelection();
                            ODS('ZDTest5 - before setSelected - goQueueListTracks.count: ' + goQueueListTracks.count);
                            goQueueListTracks.setSelected(0, true);
                            ODS('ZDTest5 - after setSelected');
                            // goQueueListTracks.endUpdate();
                        }
                        if (!progress.terminated && !window._cleanUpCalled) {
                            loop();
                        }
                    });
                } else if (!progress.terminated && !window._cleanUpCalled) {
                    loop();
                }
            }, 250);
        })();
    });
}, 'ZDTest5');

This is just a test example and I don't need your advice how to resolve this thing since I already resolved it. I just want to make a point how your error messages are often not very useful. MM4 error handling was a way much better.
ZDTest5.mmip (1,089 bytes)
screenshot.31.png (8,765 bytes)   
screenshot.31.png (8,765 bytes)