View Issue Details

IDProjectCategoryView StatusLast Update
0006611The Dark ModCodingpublic23.03.2025 20:05
Reporterwesp5 Assigned Tostgatilov  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
OSWindows 10 
Product VersionTDM 2.12 
Target VersionTDM 2.14Fixed in VersionTDM 2.14 
Summary0006611: Game can crash when too many pk4s are installed
DescriptionIf you select a mission but don't start it, then select another mission the game will crash with a "mission.pk4 can't be reopened" error.
Steps To Reproduce1. Select mission and let the game restart.
2. Select another mission and let the game restart
3. Crash!
Additional InformationIt seems as if the crash only happens when there are more than 200 pk4 files in the fms folder.
TagsNo tags attached.

Activities

stgatilov

stgatilov

23.03.2025 18:07

administrator   ~0016989

I took "Swing" mission and clone it 1000 times (with darkmod.txt patched to make names different).
Now I have 1000 missions installed.
I can switch between them without any crash.
stgatilov

stgatilov

23.03.2025 18:09

administrator   ~0016990

Maybe you could record a crash dump at least?
stgatilov

stgatilov

23.03.2025 18:18

administrator   ~0016991

Which OS do you use?
stgatilov

stgatilov

23.03.2025 19:11

administrator   ~0016992

It seems that the issue happens only when "fopen" fails.
Unless there is some antivirus/locking stuff going on, I think what else can happen is number of open FILES in a process is limited.
And I see some file handle leaks in the code.

I think the crash can be reproduce easily only when _l10n.pk4 files are present.
I suppose you get +1 file handle leaked per such archive, and the default limit is 512.
stgatilov

stgatilov

23.03.2025 19:21

administrator   ~0016993

Last edited: 23.03.2025 19:21

YEaaaaaah!
I cloned 1000 "l10n" packages, and got a crash on start on about 500 file handles =)
I guess in your case you can survive until restart once or twice because you have about 100-200 l10n packs.
stgatilov

stgatilov

23.03.2025 20:05

administrator   ~0016994

Fixed this in svn rev 10951.

Issue History

Date Modified Username Field Change
23.03.2025 08:39 wesp5 New Issue
23.03.2025 18:07 stgatilov Note Added: 0016989
23.03.2025 18:09 stgatilov Note Added: 0016990
23.03.2025 18:18 stgatilov Note Added: 0016991
23.03.2025 18:38 nbohr1more OS => Windows 10
23.03.2025 19:11 stgatilov Note Added: 0016992
23.03.2025 19:21 stgatilov Note Added: 0016993
23.03.2025 19:21 stgatilov Note Edited: 0016993
23.03.2025 20:05 stgatilov Note Added: 0016994
23.03.2025 20:05 stgatilov Assigned To => stgatilov
23.03.2025 20:05 stgatilov Status new => resolved
23.03.2025 20:05 stgatilov Resolution open => fixed
23.03.2025 20:05 stgatilov Fixed in Version => TDM 2.14
23.03.2025 20:05 stgatilov Target Version => TDM 2.14