Recent

Author Topic: PaslibVLC crash by open iconcache files?  (Read 645 times)

Eleazar

  • New Member
  • *
  • Posts: 23
PaslibVLC crash by open iconcache files?
« on: November 15, 2020, 01:35:37 am »
Strange hanging problem with VLC player

In short: Executing a Fileopendialog, and closing it, seems to leave about 8 iconcache files open in a Windows application, and this causes hanging of VLCPlayer in that application.

I am using the VLCPlayer in an application written in Lazarus. Love the VLC player, but I get hanging and access violations now and then. I have already spent many many hours to circumvent these errors, and today I dived into this problem again.

I noticed more errors with a particular set of GoPro files and I examined if I could play them without error in \PasLibVlc_3.0.7\DemoPasLibVlcMediaListPlayer. This worked fine. You can switch and scroll through the files easily without crashing. Then I ported this exct code to my own application but still got hanging...But then, I found out that it only happened after a Fileopendialog had been executed...

After placing an Opendialog in \PasLibVlc_3.0.7\DemoPasLibVlcMediaListPlayer the effect can be noticed. After just opening the dialog, and just pressing cancel, you can see with the Nirsoft tool 'OpenedFilesView'* that several files are still opened by the demoapplication. When now scrolling through the MP4 files, a crash is imminent.

By the way: I have also checked if a standard application leaves these iconcache files opened, and yes Notepad also show this behavior. 

Questions are: where to go with this question, does this sound logical and how to solve the problem...

Regards! Hope someone can shed some light on this.

*Tool used to see opened files: https://www.nirsoft.net/utils/opened_files_view.html

Eleazar

  • New Member
  • *
  • Posts: 23
Re: PaslibVLC crash by open iconcache files?
« Reply #1 on: November 16, 2020, 01:56:20 am »
Reply to myself, and as an update
As idotic as I am, I am trying to solve this problem....My idea was simply close these files, if they cause the problem.
Destroying or freeing, or whatever on the TOpendialog does not work.. And more experiments definitely leads me to the standpoint that after opening a filedialog, the VLCPlayer crashes at certain unknown moments....
So, how to find the still remaining open files?
Based on the code of RRUZ (https://stackoverflow.com/questions/1575286/delphi-get-what-files-are-opened-by-an-application) I wrote a simple application with an opendialog that can be executed or not.
This is the difference of open handles between:
Situation 1: before opening the openfiledialog
Situation 2: after opening the openfiledialog, and closing by selecting Cancel

Next step will be to try to close some of these handles (at least the file handles) and see if that stabilises the crashing of the VLCPlayer...No time more now, too tired after so many hours behind the screen....
Regards!


So here are the results:
Situation 1:
Handle: 320  Name: \Sessions\1\BaseNamedObjects   typenum: 3   typename: Directory
Handle: 352  Name: \Sessions\1\Windows\WindowStations\WinSta0   typenum: 24   typename: WindowStation
Handle: 356  Name: \Default   typenum: 25   typename: Desktop
Handle: 360  Name: \Sessions\1\Windows\WindowStations\WinSta0   typenum: 24   typename: WindowStation
Handle: 568  Name: \Sessions\1\BaseNamedObjects\SM0:1344:168:WilStaging_02   typenum: 17   typename: Mutant
Handle: 580  Name: \Sessions\1\BaseNamedObjects\SM0:1344:168:WilStaging_02_p0   typenum: 19   typename: Semaphore
Handle: 768  Name: \BaseNamedObjects\[CoreUI]-PID(1344)-TID(13500) 44a697c9-5e40-4b76-b16a-5646c69ca68e   typenum: 46   typename: ALPC Port
Handle: 796  Name: \Sessions\1\BaseNamedObjects\SM0:1344:64:WilError_02_p0   typenum: 19   typename: Semaphore
Handle: 800  Name: \Sessions\1\BaseNamedObjects\SM0:1344:64:WilError_02   typenum: 17   typename: Mutant
Handle: 808  Name: \REGISTRY\USER\S-1-5-21-2833322198-1803575783-859837003-1001   typenum: 44   typename: Key


Situation 2:

Handle: 320  Name: \Sessions\1\BaseNamedObjects   typenum: 3   typename: Directory
Handle: 352  Name: \Sessions\1\Windows\WindowStations\WinSta0   typenum: 24   typename: WindowStation
Handle: 356  Name: \Default   typenum: 25   typename: Desktop
Handle: 360  Name: \Sessions\1\Windows\WindowStations\WinSta0   typenum: 24   typename: WindowStation
Handle: 568  Name: \Sessions\1\BaseNamedObjects\SM0:1344:168:WilStaging_02   typenum: 17   typename: Mutant
Handle: 580  Name: \Sessions\1\BaseNamedObjects\SM0:1344:168:WilStaging_02_p0   typenum: 19   typename: Semaphore
Handle: 768  Name: \BaseNamedObjects\[CoreUI]-PID(1344)-TID(13500) 44a697c9-5e40-4b76-b16a-5646c69ca68e   typenum: 46   typename: ALPC Port
Handle: 796  Name: \Sessions\1\BaseNamedObjects\SM0:1344:64:WilError_02_p0   typenum: 19   typename: Semaphore
Handle: 800  Name: \Sessions\1\BaseNamedObjects\SM0:1344:64:WilError_02   typenum: 17   typename: Mutant
Handle: 1052  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_idx.db!rwWriterMutex   typenum: 17   typename: Mutant
Handle: 1056  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_idx.db!rwWriterEvent   typenum: 16   typename: Event
Handle: 1060  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_16.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1064  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_32.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1068  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_48.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1072  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_96.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1076  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_256.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1080  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_768.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1084  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_1280.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1088  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_1920.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1092  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_2560.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1096  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_sr.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1100  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_wide.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1104  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_exif.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1108  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_wide_alternate.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1112  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_custom_stream.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 1116  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:iconcache_idx.db!IconCacheInit   typenum: 17   typename: Mutant
Handle: 1172  Name: \RPC Control\OLE34A3AEBD4A2297DA124780908B97   typenum: 46   typename: ALPC Port
Handle: 1280  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*{6AF0698E-D558-4F6E-9B3C-3716689AF493}.2.ver0x0000000000000088.db   typenum: 42   typename: Section
Handle: 1292  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*cversions.2.ro   typenum: 42   typename: Section
Handle: 1296  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*cversions.2.ro   typenum: 42   typename: Section
Handle: 1300  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*{DDF571F2-BE98-426D-8288-1A9A39C3FDA2}.2.ver0x0000000000000002.db   typenum: 42   typename: Section
Handle: 1528  Name: \Sessions\1\BaseNamedObjects\SessionImmersiveColorMutex   typenum: 17   typename: Mutant
Handle: 1548  Name: \Sessions\1\BaseNamedObjects\SessionImmersiveColorPreference   typenum: 42   typename: Section
Handle: 2004  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*cversions.2.ro   typenum: 42   typename: Section
Handle: 2008  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*{35110C4C-B7CC-48AB-82BC-C3BCE3B2FE0A}.2.ver0x000000000000000c.db   typenum: 42   typename: Section
Handle: 2012  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*cversions.2.ro   typenum: 42   typename: Section
Handle: 2016  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*{1ED0D0E7-D3E1-4BBC-98D7-5A499B9189B8}.2.ver0x0000000000000004.db   typenum: 42   typename: Section
Handle: 2020  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*cversions.2.ro   typenum: 42   typename: Section
Handle: 2024  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*{1DB7E2D3-A609-4F4F-A495-895906301FE6}.2.ver0x0000000000000004.db   typenum: 42   typename: Section
Handle: 2028  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*cversions.2.ro   typenum: 42   typename: Section
Handle: 2032  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*{E6E930E6-CD21-4CAD-B337-6EC94CA8259E}.2.ver0x0000000000000004.db   typenum: 42   typename: Section
Handle: 2036  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*cversions.2.ro   typenum: 42   typename: Section
Handle: 2040  Name: \Sessions\1\BaseNamedObjects\C:*ProgramData*Microsoft*Windows*Caches*{B0BA7EBE-6391-4064-A999-AE6EFD5E974A}.2.ver0x0000000000000002.db   typenum: 42   typename: Section
Handle: 2284  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_idx.db!rwWriterMutex   typenum: 17   typename: Mutant
Handle: 2288  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_idx.db!rwWriterEvent   typenum: 16   typename: Event
Handle: 2292  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_16.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2296  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_32.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2300  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_48.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2304  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_96.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2308  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_256.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2312  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_768.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2316  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_1280.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2320  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_1920.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2324  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_2560.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2328  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_sr.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2332  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_wide.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2336  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_exif.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2340  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_wide_alternate.db!dfMaintainer   typenum: 17   typename: Mutant
Handle: 2344  Name: \BaseNamedObjects\C::Users:johnz:AppData:Local:Microsoft:Windows:Explorer:thumbcache_custom_stream.db!dfMaintainer   typenum: 17   typename: Mutant



« Last Edit: November 16, 2020, 02:27:46 am by Eleazar »

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 890
Re: PaslibVLC crash by open iconcache files?
« Reply #2 on: November 16, 2020, 02:13:46 am »
hello,
what is your O.S ? Windows7 or Windows 10 or other ?
have you .db cache files in your folder ? have you tried to delete them (they can be corrupted) ?
have you try to disable icon and thumbnail display ?

Friendly, J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

Eleazar

  • New Member
  • *
  • Posts: 23
Re: PaslibVLC crash by open iconcache files?
« Reply #3 on: November 16, 2020, 02:39:39 am »
Hi J.P.,
OS is Windows 10.
The iconcache is created newly every time, I can see by the datetime stamp. As regards trying to disable icon and thumbnail display: I'm trying to write a stable application that uses VLCPlayer. I don't want to have hassle for the end-user to change options in Windows. It is a strange hanging error that really seems related to stuff being left opened after the TOpenfiledialog...
I have tried a lot with many different MP4 files from various sources. Always looks the same: before opening a TOpenfiledialog you can switch quickly and many times between the source files and the VLCPlayer has no problems...After opening the dialog, a crash is imminent after switching 10-20 times....
Thanks for your interest! Hope I have time to send updates.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 890
Re: PaslibVLC crash by open iconcache files?
« Reply #4 on: November 16, 2020, 02:56:14 am »
Quote
After placing an Opendialog in \PasLibVlc_3.0.7\DemoPasLibVlcMediaListPlayer the effect can be noticed. After just opening the dialog, and just pressing cancel, you can see with the Nirsoft tool 'OpenedFilesView'* that several files are still opened by the demoapplication. When now scrolling through the MP4 files, a crash is imminent.

no crash here with :
Windows 10 - Lazarus 2.0.10 fpc 3.2 - Debugger fpdebug internal dwarf 
PasLibVLC 3.0.6

have you tried to run your program without debugger ?

Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

Eleazar

  • New Member
  • *
  • Posts: 23
Re: PaslibVLC crash by open iconcache files?
« Reply #5 on: November 16, 2020, 01:06:50 pm »
Thanks for testing. I'm on Win 10, fpc 3.0.4, lazarus 2.0.6 and building 32 bit app.
The VLC installed is 3.0.11 both 32 and 64 bit. I will now try to update lazarus and fpc.
Hope I can also get the 64 bit building to work and that I can keep my currently installed seconds party components....
Oh yes, I run it without the debugger, because it gets really unresponsive in the debugger.
Greetings, Leo
« Last Edit: November 16, 2020, 02:11:03 pm by Eleazar »

Eleazar

  • New Member
  • *
  • Posts: 23
Re: PaslibVLC crash by open iconcache files?
« Reply #6 on: November 16, 2020, 06:02:45 pm »
 OK, good news! :D. Updating to the latest version of Lazarus and fpc really seems to have solved the problem. Thanks again for testing.
BTW: Still building 32-bit.
Greetings, Leo

 

TinyPortal © 2005-2018