View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004110 | The Dark Mod | AI | public | 01.03.2015 17:46 | 14.08.2015 19:45 |
Reporter | sotha_sil | Assigned To | taaaki | ||
Priority | normal | Severity | normal | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | TDM 2.03 | ||||
Target Version | TDM 2.04 | Fixed in Version | TDM 2.04 | ||
Summary | 0004110: textures/darkmod/stone/brick/blocks_sepia_grey broken | ||||
Description | I opened my WIP, which I last edited with 2.02. Now, with 2.03 one of my textures appears black (black in color, but with clearly visible bump mapping) in the game, but seems okay in DR. The game complains about missing texture textures/darkmod/stone/brick/blocks_sepia_grey_d The texture in question is called: textures/darkmod/stone/brick/blocks_sepia_grey | ||||
Tags | No tags attached. | ||||
Attached Files | date_check.py (994 bytes)
"""Check the modified dates of files in the TDM pk4s. Look out for 1980 dates and 2088 dates.""" import os, fnmatch, zipfile PATH = r"C:\darkmod" results = { 'ok' : 0 } pk4counter = 0 filecounter = 0 for root, dirnames, filenames in os.walk(PATH): for filename in fnmatch.filter(filenames, '*.pk4'): pk4counter += 1 fpath = os.path.join(root, filename) f = zipfile.ZipFile(fpath, 'r') for member in f.infolist(): filecounter += 1 year = member.date_time[0] if year < 2000 or year > 2015: results[fpath + ' --> ' + member.filename] = member.date_time else: results['ok'] += 1 print "Results: Checked %d pk4s, found %d files" % ( pk4counter, filecounter ) print "Found %d ok files, %d problem dates\n" % ( results['ok'], len(results)-1 ) results.pop('ok') for k in sorted(results.keys()): print k, "%04d-%02d-%02d %02d:%02d:%02d" % results[k] | ||||
I will fix the material def for this texture. | |
I'm using that texture and it's been working fine on SVN. Was something not added to 2.03. | |
blocks_sepia_grey_d.dds in the .pk4 has the same impossible last modified date as in http://bugs.thedarkmod.com/view.php?id=4098 | |
http://forums.thedarkmod.com/topic/17151-a-house-of-locked-secrets-full-campaign-moonbo/page-4#entry372023 Some people with up-to-date TDM 2.03 installations have pk4s with occasional textures with 2088 dates, others don't. Work out why (1) the messed-up date stops the texture being loaded, and (2) whether there's something in the game that buggers up the date in the pk4, or whether it's just a single faulty pk4 on one of the mirrors. |
|
While testing Moonbo's latest mission, 2 of us ran into exactly the same issue. Looks like I found some interesting facts on that topic. Compare the 2 version of that dds file included here. http://www.gnartsch.de/Thief-FM/beta/Moonbo2/Mission2/block_sepia_grey_d.zip Both are identical on the binary level. See the screenshot here or use a comparison tool: http://www.gnartsch.de/Thief-FM/beta/Moonbo2/Mission2/blocks_sepia_grey_d_good_bad.png The only difference is that the 'bad' version has that weird date. If you use the 'bad one' then you will certainly see the issue, while the other one looks fine. The only conclusion I can take from that is that there must be some checking done in the tdm engine which rejects that bad date or some other meta-file-property. Also, take my word that the tdm_updater is not able to spot that issue! We ran the tdm_updater, but it did not check the date and did not find anything worth downloading on its own. In case you experiment with the files included in the zip above, note that after messing with tdm_textures_stone_brick01.pk4 the file will be deemed as changed and tdm_updater would download the entire 250MB for you. Anyway, either the updater needs to check the validity of the date as well... or that checking in the texture loading algorithm needs to skip checking those kind of meta-properties. Don't know where that sort of code might be located, though. At any rate the actual texture is fine as is. |
|
Hi SteveL, glad to see you here ! Some more details which may eventually shed some light into this. Here are all the files from my current 2.03 install having that odd date: D:\temp\tdm\tdm_models01\models\darkmod\architecture\balconies 01.04.2088 08:04 20.784 balcony_wood1-1.lwo D:\temp\tdm\tdm_models02\dds\models\darkmod\props\textures 01.04.2088 08:04 699.192 chair_d.dds D:\temp\tdm\tdm_sound_sfx01\sound\sfx\movement\impacts 01.04.2088 08:04 44.776 spike_ball_fall_1.ogg D:\temp\tdm\tdm_sound_vocals04\sound\voices\commander 01.04.2088 08:04 45.789 haggle_offer01.ogg D:\temp\tdm\tdm_textures_base01\materials 01.04.2088 08:04 4.956 tdm_ghouse_decorative.mtr D:\temp\tdm\tdm_textures_door01\textures\darkmod\door\wood 01.04.2088 08:04 393.260 old_2panels_local.tga D:\temp\tdm\tdm_textures_stone_sculpted01\dds\textures\darkmod\stone\sculpted 01.04.2088 08:04 349.712 grey_block_trim_d.dds D:\temp\tdm\tdm_textures_window01\textures\darkmod\window 01.04.2088 08:04 786.476 wooden_frame01_base.tga Now, for comparision let me show you something from my backup of my TDM 2.02 installation. Here I was searching for all files having the date 01.04.1980. Search "1980" (14 hits) D:\Games\-BACKUPS-\TDM\TDM202\darkmod (14 hits) Line 2710: 01.04.1980 08:04 67.926 tdm_ai_base.script Line 4860: 01.04.1980 08:04 87.536 statuette_folding_hands_black.dds Line 5980: 01.04.1980 08:04 20.784 balcony_wood1-1.lwo Line 8619: 01.04.1980 08:04 699.192 chair_d.dds Line 10718: 01.04.1980 08:04 6.532 standing townsfolk playing dice.pfb Line 11800: 01.04.1980 08:04 545.872 loop_lava_01.ogg Line 12771: 01.04.1980 08:04 44.776 spike_ball_fall_1.ogg Line 16307: 01.04.1980 08:04 45.789 haggle_offer01.ogg Line 21282: 01.04.1980 08:04 4.956 tdm_ghouse_decorative.mtr Line 21761: 01.04.1980 08:04 699.216 manor_house01.dds Line 22471: 01.04.1980 08:04 393.260 old_2panels_local.tga Line 24124: 01.04.1980 08:04 5.592.560 blocks_sepia_grey_d.dds Line 25411: 01.04.1980 08:04 349.712 grey_block_trim_d.dds Line 26002: 01.04.1980 08:04 786.476 wooden_frame01_base.tga Can you see the correlation? The list is *almost* the same. At any rate a fairly good match. Seems like that during an upgrade, the date changes from 01.04.1980 08:04 to 01.04.2088 08:04 Even hours, minutes, day and month match. Only the year changes. Odd enough, if you check for BRAND NEW files in 2.03, you will see a few that didn't exist in 2.02 and which have a date like 1980. tdm_textures_stone_brick01.pk4\dds\textures\darkmod\stone\brick\blocks_greenishbrown.dds tdm_textures_stone_brick01.pk4\dds\textures\darkmod\stone\brick\large_dark_wall.dds In case there is a correlation, then these might be candidates to break on the next TDM update to v2.04. |
|
http://bugs.thedarkmod.com/view.php?id=4125 can be marked related as well. | |
Thanks for all the detective work. The files in my TDM installation don't have any 2088 dates so I might have trouble catching it in action. I do have 1980 files: Running E:\dm-dev\py\date_check.py Results: Checked 166 pk4s, found 30539 files Found 30509 ok files, 30 problem dates C:\darkmod\tdm_gui01.pk4 --> dds/guis/assets/hud/spyglass_overlay_16x10.dds 1980-04-01 08:04:02 C:\darkmod\tdm_gui01.pk4 --> guis/mainmenu_loadsave.gui 1980-04-01 08:04:02 C:\darkmod\tdm_models_decls01.pk4 --> materials/tdm_models_signs.mtr 1980-04-01 08:04:02 C:\darkmod\tdm_sound_ambient01.pk4 --> sound/ambient/environmental/bubbling_cauldron.ogg 1980-04-01 08:04:02 C:\darkmod\tdm_sound_ambient02.pk4 --> sound/ambient/ambience/mansion_tense02a.ogg 1980-04-01 08:04:02 C:\darkmod\tdm_sound_sfx01.pk4 --> sound/sfx/lights/gaslight.ogg 1980-04-01 08:04:02 C:\darkmod\tdm_sound_vocals02.pk4 --> sound/voices/builders/builder2/give_order01.ogg 1980-04-01 08:04:02 C:\darkmod\tdm_sound_vocals03.pk4 --> sound/voices/lord/lord_give_order01.ogg 1980-04-01 08:04:02 C:\darkmod\tdm_sound_vocals04.pk4 --> sound/voices/commander/give_order01.ogg 1980-04-01 08:04:02 C:\darkmod\tdm_sound_vocals06.pk4 --> sound/voices/critic/give_order01.ogg 1980-04-01 08:04:02 C:\darkmod\tdm_sound_vocals07.pk4 --> sound/voices/lady/give_order01.ogg 1980-04-01 08:04:02 C:\darkmod\tdm_textures_carpet01.pk4 --> dds/textures/darkmod/carpet/rugs/mat_shaggy.dds 1980-04-01 08:04:02 C:\darkmod\tdm_textures_door01.pk4 --> dds/textures/darkmod/door/metal/iron_door_cross.dds 1980-04-01 08:04:02 C:\darkmod\tdm_textures_door01.pk4 --> textures/darkmod/door/metal/iron_square_ed.jpg 1980-04-01 08:04:02 C:\darkmod\tdm_textures_door01.pk4 --> textures/darkmod/door/metal/iron_square_local.tga 1980-04-01 08:04:02 C:\darkmod\tdm_textures_door01.pk4 --> textures/darkmod/door/wood/old_smooth_reinforced_ed.jpg 1980-04-01 08:04:02 C:\darkmod\tdm_textures_door01.pk4 --> textures/darkmod/door/wood/old_smooth_reinforced_local.tga 1980-04-01 08:04:02 C:\darkmod\tdm_textures_metal01.pk4 --> dds/textures/darkmod/metal/detailed/bars_rivets_iron02.dds 1980-04-01 08:04:02 C:\darkmod\tdm_textures_nature01.pk4 --> dds/textures/darkmod/nature/bones/bones_stacked_femurs.dds 1980-04-01 08:04:02 C:\darkmod\tdm_textures_plaster01.pk4 --> dds/textures/darkmod/plaster/mortar_sloppy_dark2.dds 1980-04-01 08:04:02 C:\darkmod\tdm_textures_plaster01.pk4 --> dds/textures/darkmod/plaster/plaster_wall_blue.dds 1980-04-01 08:04:02 C:\darkmod\tdm_textures_stone_brick01.pk4 --> dds/textures/darkmod/stone/brick/blocks_greenishbrown.dds 1980-04-01 08:04:02 C:\darkmod\tdm_textures_stone_brick01.pk4 --> dds/textures/darkmod/stone/brick/large_dark_wall.dds 1980-04-01 08:04:02 C:\darkmod\tdm_textures_stone_brick01.pk4 --> textures/darkmod/stone/brick/blocks_flat_ochre_smoky_local.tga 1980-04-01 08:04:02 C:\darkmod\tdm_textures_stone_brick01.pk4 --> textures/darkmod/stone/brick/dark_brick_old_local.tga 1980-04-01 08:04:02 C:\darkmod\tdm_textures_stone_cobblestones01.pk4 --> dds/textures/darkmod/stone/cobblestones/cobblestones_rounded_blue2.dds 1980-04-01 08:04:02 C:\darkmod\tdm_textures_stone_flat01.pk4 --> dds/textures/darkmod/stone/flat/ceramic_jug01.dds 1980-04-01 08:04:02 C:\darkmod\tdm_textures_stone_natural01.pk4 --> dds/textures/darkmod/stone/natural/coal_floor.dds 1980-04-01 08:04:02 C:\darkmod\tdm_textures_stone_sculpted01.pk4 --> dds/textures/darkmod/stone/sculpted/gothic_frame_lime_four.dds 1980-04-01 08:04:02 C:\darkmod\tdm_textures_stone_sculpted01.pk4 --> dds/textures/darkmod/stone/sculpted/ornament_relief_lime_vases.dds 1980-04-01 09:04:02 |
|
I've attached my python script in case anyone else wants to have a go. I guess we have 2 bugs to find. One is, how are the dates getting changed to 2088? The second is, why won't the game load a future-dated resource file? |
|
The scenario for the first question is clearly the update process from TDM 2.02 to 2.03. I just restored my TDM 2.02 backup. It didn't have any 2088 dates, but it had all the 1980 dates I listed previously. Then I ran the updater and the 2088 dates are showing up again. No error messages or anything. My TDM install has quite a long update-history. I think the last install from scratch might have been with 1.08. What the updater does is a differential update - at least as long as your pk4's have the expected checksum to start with. Then it only adds modified files into the pk4's instead of downloading the entire pk4 alltogether. So one would need to have a valid TDM 2.02 for properly testing it. I could provide a couple of such pk4's but would need to find a proper host to upload them to, since my own site is a bit limited. Checking the source code you will find a bunch of files related to zipping/unzipping and transforming timestamps. Scan all code for "1980". Somewhere there the issue must be located. |
|
Just checked the update log. Basicly it downloaded this file only: http://waffles.za.net/tdm/darkmodredist/tdm_update_2.02_to_2.03.zip If you check that file, then there are no 2088 dates inside either. (blocks_sepia_grey isn't to be found within there at all, but obviously it is affected by the update nonetheless). But there are a bunch of files not having a modification date at all. Those are the ones that will be reading 1980. (This is just a detail, but I believe those are the ones that have the potential to turn to 2088 in a future update.) |
|
I've not found the updater code (yet), but I'm not really expecting to see a mention of 1980... The zip file format has only 16 bits for file dates and the same for the time of day. Not all times are representable. The absolute minimum timestamp that zip files can hold is 1 Jan 1980, so you could probably get that year just by zeroing out some bits. | |
Do you know where we keep the updater code? I'll ask grayman and taaaki if not | |
From what I can tell the majority of the tdm_update code is located in thedarkmod.2.03.src\tdm_update. I have never seen it in action though. And the 'trial period' for my Visual Studio Community Edition has expired as well. There are actually a bunch of references to the year 1980, but I do not know what variant is actually used in the update scenario. D:\Games\-BACKUPS-\TDM\TDM-Base-Install\Source\thedarkmod.2.03.src\framework\Unzip.cpp (1 hit) Line 1446: ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; D:\Games\-BACKUPS-\TDM\TDM-Base-Install\Source\thedarkmod.2.03.src\framework\Unzip.h (1 hit) Line 41: unsigned int tm_year; /* years - [1980..2044] */ D:\Games\-BACKUPS-\TDM\TDM-Base-Install\Source\thedarkmod.2.03.src\include\minizip\unzip.h (1 hit) Line 87: uInt tm_year; /* years - [1980..2044] */ D:\Games\-BACKUPS-\TDM\TDM-Base-Install\Source\thedarkmod.2.03.src\include\minizip\zip.h (1 hit) Line 94: uInt tm_year; /* years - [1980..2044] */ D:\Games\-BACKUPS-\TDM\TDM-Base-Install\Source\thedarkmod.2.03.src\lib\minizip\unzip.c (1 hit) Line 556: ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; D:\Games\-BACKUPS-\TDM\TDM-Base-Install\Source\thedarkmod.2.03.src\lib\minizip\zip.c (2 hits) Line 323: if (year>1980) Line 324: year-=1980; D:\Games\-BACKUPS-\TDM\TDM-Base-Install\Source\thedarkmod.2.03.src\sys\posix\posix_main.cpp (1 hit) Line 435: year = (year >> 9) + 1980; D:\Games\-BACKUPS-\TDM\TDM-Base-Install\Source\thedarkmod.2.03.src\sys\win32\win_main.cpp (1 hit) Line 492: year = (year >> 9) + 1980; Following these, you can find out how the timestamp gets *stuffed* into these tiny 16 bit values. |
|
Are you ready for some more detective work? Then here is a new episode of 'Numbers' :-) I am now going to show you how that initial date is created, which should help to solve the issue one way or another. You recall that a good PK4 shows no date for new files, right? E.g. http://waffles.za.net/tdm/darkmodredist/tdm_update_2.02_to_2.03.zip But when opening an updated PK4 you can see dates like this: April 1. 1980, 08:04:02 Now where the 2088 comes into play is still a mystery, but hopefully we do not get that far anyway. Now some little maths. Lets assume the 'modification date' is empty (= invalid). And lets assume the API returns -1 for both the date and time, which would be my expectation anyway. Then, where does that get us? Let's see what algorithm is used e.g. in unzip.c: { uLong uDate; uDate = (uLong)(ulDosDate>>16); ptm->tm_mday = (uInt)(uDate&0x1f) ; ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800); ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ; ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ; } So, date and time are both 16 bit and the value is -1 (0xffff) for each. If you apply the formulas, then you get this: ptm->tm_mday = 31 ptm->tm_mon = 14 ptm->tm_year = 2107 ptm->tm_hour = 31 ptm->tm_min = 63 ptm->tm_sec = 62 We are not there yet, are we? Wait a minute !!! There are invalid numbers with respect to our time conventions! 62 seconds makes 2 seconds plus a minute 63+1 minutes makes 4 minutes plus 1 hour 31+1 hours makes 8 hours plus 1 day 31+1 days makes 1 day plus 1 month 14+1 months makes 3 month and a year. But wait, the months are counted with 0=January, so 3 is actually April! 2107+1 is 2018. But we probably have an overflow here, since 2107 is the biggest year supported by that format, so we are back to 1980! So we end up with April 1. 1980, 08:04:02 To wrap it all up: the timestamp should be checked to be non-equal to -1. If it is -1 then that logic makes no sense. Ideally one would not deal with that date in that case and leave it as -1, but depending on what other code is dealing with it already in TDM, one might simply want to set it to the creation date instead. As I said: no idea how 1980 turns into 2088, though. |
|
Fantastic! That's some impressive deduction. That code is pretty obscure. > You recall that a good PK4 shows no date for new files, right? I didn't know that but it makes sense. I still don't have any 2088 dates in my pk4s. I'm not sure whether I updated to 2.03 or did a fresh downbload. I won't be able to catch it in the act of changing a date to 2088 if I can't make it do it. On the other hand, if we fix the bug that you describe above, that'll probably make the problem go away. I've been working on renderer stuff this eve but I'll try stepping through this code tomorrow. Also to see whether I can work out if it's restricted to one place or whether the same logic is repeated elsewhere. |
|
Do you have an old TDM to start with? Like 2.01 or earlier? Then the differential update should get you these files and dates. If not, then you won't see any 2088 dates, because it seems like 2 upgrades are required. The first will produce these fishy 1980 dates, which you won't see if your packages got downloaded as a whole with a clean install. And the second one then turns them to 2088 somehow. |
|
No I don't have an old TDM installation. My first was 2.00, but since 2.02 (the first one I worked on) I've always downloaded a fresh full install of a new release, because I like to keep the old one around for a month or two, for comparison when new bug reports come in. Looks like we don't provide old version downloads on the website either. I guess they're not needed by anyone except devs, and then only very rarely. We do have all the release tags in the source code archives of course, but that doesn't help. What we need to rep this problem is an old *packaged* version. I've opened up the tdm_update solution but I've not yet found the code you quote above. It's not in the external dependencies as far as I can see either. I'm obviously missing something... I'll try manually tweaking one file in a 2.03 pk4 and then take a step through the updater code to see what it does to repair it. |
|
Ugh, I hate trying to debug windowed dialogs in unfamiliar code. You can't just step through the code in the debugger to see where the trail leads. | |
SteveL: We have all the packaged releases going back to 1.03 on the server still. Just shout if you need to get hold of one or more versions (for this or other issues). Is it only the differential update that causes the date issue or does a fresh download also run into this? |
|
I just checked the pristine release files all the versions currently stored on the server with SteveL's python script and they all checked out with correct dates. Just some examples of the output from the last 3 releases: 2.01: Results: Checked 62 pk4s, found 19188 files Found 19188 ok files, 0 problem dates 2.02: Results: Checked 62 pk4s, found 19619 files Found 19619 ok files, 0 problem dates 2.03: Results: Checked 63 pk4s, found 20875 files Found 20875 ok files, 0 problem dates I still have a copy of 2.02 on my PC and the following files were flagged: > pypy date_check.py Results: Checked 64 pk4s, found 19693 files Found 19679 ok files, 14 problem dates E:\Gamdir\darkmod\tdm_base01.pk4 --> script/tdm_ai_base.script 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_gui01.pk4 --> dds/guis/assets/hud/inventory_icons/statuette_folding_hands_black.dds 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_models01.pk4 --> models/darkmod/architecture/balconies/balcony_wood1-1.lwo 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_models02.pk4 --> dds/models/darkmod/props/textures/chair_d.dds 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_prefabs01.pk4 --> prefabs/ai/standing townsfolk playing dice.pfb 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_sound_ambient01.pk4 --> sound/ambient/environmental/loop_lava_01.ogg 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_sound_sfx01.pk4 --> sound/sfx/movement/impacts/spike_ball_fall_1.ogg 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_sound_vocals04.pk4 --> sound/voices/commander/haggle_offer01.ogg 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_textures_base01.pk4 --> materials/tdm_ghouse_decorative.mtr 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_textures_decals01.pk4 --> dds/textures/darkmod/decals/building_facades/manor_house01.dds 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_textures_door01.pk4 --> textures/darkmod/door/wood/old_2panels_local.tga 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_textures_stone_brick01.pk4 --> dds/textures/darkmod/stone/brick/blocks_sepia_grey_d.dds 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_textures_stone_sculpted01.pk4 --> dds/textures/darkmod/stone/sculpted/grey_block_trim_d.dds 1980-04-01 08:04:02 E:\Gamdir\darkmod\tdm_textures_window01.pk4 --> textures/darkmod/window/wooden_frame01_base.tga 1980-04-01 08:04:02 Now I can't remember if this instance of 2.02 on my PC was from a full download or an incremental update, but I'm suspecting that it was an incremental update. Scanning the incremental update files yielded these results: Results: Checked 14 pk4s, found 13653 files Found 13594 ok files, 59 problem dates /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> dds/guis/assets/hud/inventory_icons/statuette_folding_hands_black.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> dds/models/darkmod/props/textures/chair_d.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> dds/textures/darkmod/decals/building_facades/manor_house01.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> dds/textures/darkmod/stone/brick/blocks_sepia_grey_d.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> dds/textures/darkmod/stone/sculpted/grey_block_trim_d.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> materials/tdm_ghouse_decorative.mtr 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> models/darkmod/architecture/balconies/balcony_wood1-1.lwo 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> prefabs/ai/standing townsfolk playing dice.pfb 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> script/tdm_ai_base.script 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> sound/ambient/environmental/loop_lava_01.ogg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> sound/sfx/movement/impacts/spike_ball_fall_1.ogg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> sound/voices/commander/haggle_offer01.ogg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> textures/darkmod/door/wood/old_2panels_local.tga 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.01_to_2.02.zip --> textures/darkmod/window/wooden_frame01_base.tga 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/guis/assets/hud/spyglass_overlay_16x10.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/models/darkmod/nature/hedge_round01.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/models/darkmod/props/textures/armchair4_d.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/models/md5/chars/guards/cityguard_helmet.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/models/md5/chars/guards/proguard3_d.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/carpet/rugs/mat_shaggy.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/decals/building_facades/skyline_01.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/door/metal/iron_door_cross.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/door/wood/old_smooth_reinforced.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/glass/dull_opaque01.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/metal/detailed/bars_rivets_iron02.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/nature/bones/bones_stacked_femurs.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/plaster/mortar_sloppy_dark2.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/stone/brick/blocks_greenishbrown.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/stone/brick/large_dark_wall.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/stone/cobblestones/cobblestones_rounded_blue2.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/stone/flat/ceramic_jug01.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/stone/natural/coal_floor.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/stone/sculpted/gothic_frame_lime_four.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/stone/sculpted/trim_dark_joinedwave.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/window/diamond_pattern03_unlit.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/darkmod/wood/boards/wood_brown_dull01.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> dds/textures/particles/candle_flame2.dds 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> materials/tdm_models_signs.mtr 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> models/darkmod/misc/lod/nature/hedge01_arch_low.lwo 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> models/darkmod/misc/lod/nature/hedge01_round_large_low.lwo 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> models/darkmod/misc/lod/nature/hedge01_square_long_low.lwo 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> models/darkmod/nature/hedge01_arch.lwo 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> models/md5/chars/builders/guard/builderguardmesh_low.md5mesh 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> models/md5/chars/guards/proguard/pain.md5anim 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> prefabs/Kitchen/wine_bottle01.pfb 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> sound/ambient/ambience/mansion_tense02a.ogg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> sound/ambient/environmental/bubbling_cauldron.ogg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> sound/sfx/lights/gaslight.ogg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> sound/voices/builders/builder2/give_order01.ogg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> sound/voices/commander/give_order01.ogg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> sound/voices/critic/give_order01.ogg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> sound/voices/lady/give_order01.ogg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> sound/voices/lord/lord_give_order01.ogg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> textures/darkmod/door/frame/arched_heavy01_frame_dark_ed.jpg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> textures/darkmod/door/metal/iron_door_cross_ed.jpg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> textures/darkmod/door/metal/iron_square_ed.jpg 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> textures/darkmod/stone/brick/blocks_flat_ochre_smoky_local.tga 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> textures/darkmod/stone/brick/dark_brick_old_local.tga 2107-15-31 31:63:62 /usr/local/tdm_releases/2.03/tdm_update_2.02_to_2.03.zip --> textures/darkmod/window/ornate/stained_colourful_dirty2_local.tga 2107-15-31 31:63:62 When I found these files in the .zip file using WinRAR, the dates show up as empty (like gnartsch mentioned previously), but unlike his case, the TDM server interprets these dates as 2107 instead of 2088 (which is maybe why other people can't find 2088 - it might just be an implementation detail of whatever zip libraries they are using). I took a look at the checkout that was performed on the server (the one that was used to build the 2.03 release) and the dates seem fine there, so it's likely an issue in the TDM release packager. I'll dig around and see what I can find, but I think I'm also going to implement a sanity check in the updater that checks if the file timestamp is < year 2000 or greater than the current date-time, then use the current date-time as the file modification value. As to why the texture loader doesn't accept these future dated files, it's likely some kind of precautionary measure. Whether we disable it or not will depend on how we plan to tackle fixing "broken" installs. Unless those files get touched/updated again in the future, it is likely that for a number of users, these files will remain future-dated and will not load correctly in-game. Requesting that users perform a full re-install seems a bit harsh, so it might be worthwhile modifying the texture-loader. Thoughts? |
|
I just restored my old TDM 1.02 install and updated it all the way up to 2.03. And ran an adjusted version of SteveL's script. (see the results at the bottom) In the TDM code I noticed that the existance of files is verified by checking the modification date to be other than -1. That might explain why those files are deemed missing and are not loaded. However this is probably done this way for perfomance reasons (!) and probably better not to be changed. (That's just a guess, though.) Anyway, the issue is in the updater. And yes, the issue exists on the Upgrade path only. On a fresh install you won't see an issue, but you may run into these issues again on future updates. In order to fix everyones install, one might simply touch these files and make sure they get included in TDM 2.05. Like that everyone would have a good install again. And the amount of data is just like 17 MB. So, not a biggie. Results: Checked 63 pk4s, found 20875 files Found 20818 ok files, 57 problem dates (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_ai_humanoid_builders01.pk4 --> models/md5/chars/builders/guard/builderguardmesh_low.md5mesh (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_ai_humanoid_guards01.pk4 --> dds/models/md5/chars/guards/cityguard_helmet.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_ai_humanoid_guards01.pk4 --> dds/models/md5/chars/guards/proguard3_d.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_ai_humanoid_guards01.pk4 --> models/md5/chars/guards/proguard/pain.md5anim (2088, 4, 1, 9, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_gui01.pk4 --> dds/guis/assets/hud/inventory_icons/statuette_folding_hands_black.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_gui01.pk4 --> dds/guis/assets/hud/spyglass_overlay_16x10.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_models01.pk4 --> dds/models/darkmod/nature/hedge_round01.dds (2088, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_models01.pk4 --> models/darkmod/architecture/balconies/balcony_wood1-1.lwo (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_models01.pk4 --> models/darkmod/misc/lod/nature/hedge01_arch_low.lwo (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_models01.pk4 --> models/darkmod/misc/lod/nature/hedge01_round_large_low.lwo (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_models01.pk4 --> models/darkmod/misc/lod/nature/hedge01_square_long_low.lwo (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_models01.pk4 --> models/darkmod/nature/hedge01_arch.lwo (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_models02.pk4 --> dds/models/darkmod/props/textures/armchair4_d.dds (2088, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_models02.pk4 --> dds/models/darkmod/props/textures/chair_d.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_models_decls01.pk4 --> materials/tdm_models_signs.mtr (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_prefabs01.pk4 --> prefabs/Kitchen/wine_bottle01.pfb (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_sound_ambient01.pk4 --> sound/ambient/environmental/bubbling_cauldron.ogg (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_sound_ambient01.pk4 --> sound/ambient/environmental/loop_lava_01.ogg (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_sound_ambient02.pk4 --> sound/ambient/ambience/mansion_tense02a.ogg (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_sound_sfx01.pk4 --> sound/sfx/lights/gaslight.ogg (2088, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_sound_sfx01.pk4 --> sound/sfx/movement/impacts/spike_ball_fall_1.ogg (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_sound_vocals02.pk4 --> sound/voices/builders/builder2/give_order01.ogg (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_sound_vocals03.pk4 --> sound/voices/lord/lord_give_order01.ogg (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_sound_vocals04.pk4 --> sound/voices/commander/give_order01.ogg (2088, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_sound_vocals04.pk4 --> sound/voices/commander/haggle_offer01.ogg (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_sound_vocals06.pk4 --> sound/voices/critic/give_order01.ogg (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_sound_vocals07.pk4 --> sound/voices/lady/give_order01.ogg (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_base01.pk4 --> dds/textures/particles/candle_flame2.dds (2088, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_base01.pk4 --> materials/tdm_ghouse_decorative.mtr (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_carpet01.pk4 --> dds/textures/darkmod/carpet/rugs/mat_shaggy.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_decals01.pk4 --> dds/textures/darkmod/decals/building_facades/manor_house01.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_decals01.pk4 --> dds/textures/darkmod/decals/building_facades/skyline_01.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_door01.pk4 --> dds/textures/darkmod/door/metal/iron_door_cross.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_door01.pk4 --> dds/textures/darkmod/door/wood/old_smooth_reinforced.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_door01.pk4 --> textures/darkmod/door/frame/arched_heavy01_frame_dark_ed.jpg (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_door01.pk4 --> textures/darkmod/door/metal/iron_door_cross_ed.jpg (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_door01.pk4 --> textures/darkmod/door/metal/iron_square_ed.jpg (2088, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_door01.pk4 --> textures/darkmod/door/wood/old_2panels_local.tga (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_glass01.pk4 --> dds/textures/darkmod/glass/dull_opaque01.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_metal01.pk4 --> dds/textures/darkmod/metal/detailed/bars_rivets_iron02.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_nature01.pk4 --> dds/textures/darkmod/nature/bones/bones_stacked_femurs.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_plaster01.pk4 --> dds/textures/darkmod/plaster/mortar_sloppy_dark2.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_stone_brick01.pk4 --> dds/textures/darkmod/stone/brick/blocks_greenishbrown.dds (2088, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_stone_brick01.pk4 --> dds/textures/darkmod/stone/brick/blocks_sepia_grey_d.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_stone_brick01.pk4 --> dds/textures/darkmod/stone/brick/large_dark_wall.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_stone_brick01.pk4 --> textures/darkmod/stone/brick/blocks_flat_ochre_smoky_local.tga (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_stone_brick01.pk4 --> textures/darkmod/stone/brick/dark_brick_old_local.tga (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_stone_cobblestones01.pk4 --> dds/textures/darkmod/stone/cobblestones/cobblestones_rounded_blue2.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_stone_flat01.pk4 --> dds/textures/darkmod/stone/flat/ceramic_jug01.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_stone_natural01.pk4 --> dds/textures/darkmod/stone/natural/coal_floor.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_stone_sculpted01.pk4 --> dds/textures/darkmod/stone/sculpted/gothic_frame_lime_four.dds (2088, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_stone_sculpted01.pk4 --> dds/textures/darkmod/stone/sculpted/grey_block_trim_d.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_stone_sculpted01.pk4 --> dds/textures/darkmod/stone/sculpted/trim_dark_joinedwave.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_window01.pk4 --> dds/textures/darkmod/window/diamond_pattern03_unlit.dds (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_window01.pk4 --> textures/darkmod/window/ornate/stained_colourful_dirty2_local.tga (2088, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_window01.pk4 --> textures/darkmod/window/wooden_frame01_base.tga (1980, 4, 1, 8, 4, 2) D:\Games\-BACKUPS-\TDM\TDM102\darkmod\tdm_textures_wood01.pk4 --> dds/textures/darkmod/wood/boards/wood_brown_dull01.dds |
|
Will simply touching the files be enough? Will the updater overwrite a file dated 2088 or 2107 with one dated 2015? If not, then (@taaaki) if you put in the sanity check it should act when checking the current install as well as after updating the pk4 with new files. If it sees a future date on a current file, it could automatically overwrite that file with the version from the incoming pk4 regardless of date. If future-dated files are simply not loaded right now, we lose nothing by always replacing them. |
|
Touching the files (in the *nix sense) ought to work since it will set the modified date to the current date. The complication is that these files are in a zipped archive - see the paragraph below on how we would implement it. Regarding the updater, it doesn't appear to do any date comparisons when overwriting files (it takes its cue to add/remove/replace a file from tdm_update_info.txt). With the sanity check enabled, all we would need to do is modify at least one file in each of the affected pk4s to correct all the bad modification dates. This is because the updater modifies a pk4 by removing and re-adding the modified file, but the method it uses to remove files from a pk4 involves creating a new pk4 and copying over all the files that weren't listed for removal. The sanity check would trigger on this copy action, leaving only valid dates in the "new" file. The sanity check wouldn't trigger when the updater checks the current installation (it just looks for CRCs if I remember correctly) and it wouldn't be making any changes to the files at this stage anyway. So I think we would just need to take note of which pk4s need correcting and just make sure that they get the appropriate treatment when the next update swings around. |
|
Just tested my sanity check code and it seems to do the trick. I'll commit the changes tomorrow after work. I still need to investigate why the release packager is having these hiccups though. Another task for tomorrow. |
|
Does the packager have a problem at all? A fresh install always has good dates, like you showed above. I thought it was the updater that first loses some date info then when run again on the next release cycle, it moves some dates into the future. | |
I'm fairly certain that the packager introduced the problem in the first place. If you look above at comment http://bugs.thedarkmod.com/view.php?id=4110#c7570 you can see the list of files in my 2.02 install with date issues. These correspond exactly with the files in the tdm_update_2.01_to_2.02.zip differential update that had date issues. While you are correct that the fresh install doesn't have this issue, the packager is also responsible for building the differential update file. What is happening is that the updater performs a differential update and encounters files with invalid dates in the diff update .zip file. When it copies these over to the existing .pk4, the zip library doesn't know what to do with the invalid/missing date (it only caters for years 1980 - 2044) so I'm assuming that it defaults to the 1980 date. I'm still not entirely sure why future dates stick around since every step-through I've done has shown them go back to 1980 and stay that way. |
|
Thanks for looking into this and fixing it, taaki! That ZIP would care only about dates between 1980-2044 (64 = 6bit) seems to be a common misinterpretation in the TDM code. Looking up the docu on the web - and also looking into the formulas in the TDM code itself it appears that actually 7 bit are reserved for the year, thus ranging up to the year 2107. quote: ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) But yeah, when and where in the update process 1980 turns into 2088 is still beyond even my wildest imaginations. The 1980 date is not a default, though. See my explanation here; http://bugs.thedarkmod.com/view.php?id=4110#c7543 'April 1. 1980, 08:04:02' is nothing else but -1 (0xFFFF...FFFF) being interpreted as a 'valid date' plus a few 'reasonable corrections' applied. I am sure that if it would default to a reasonable date (like 0 = Jan 1. 1980, 00:00:00) the problem would be gone as well. |
|
Oh, if you want me to test the tdm_update.exe on Windows, just send the modified code my way. I should be able to compile it again, but havn't installed SVN to grab the 'latest' branch, yet. I have the 2.04 code present, though. |
|
Impressive work, both! Surprising how complicated a "simple" update procedure can get when it has to deal with crappy archive formats. | |
I think the misconception regarding the max year for zip dates actually stems from the 'minizip' library that we use. Regardless, the code seems to use 7 bits for the year as you stated (gnartsch). And yes, I did read your explanation regarding the April 1980 date. I was just being lazy and used the word "default". Anyway, code checked in - r6507. I've attached the new Zip.cpp file (from darkmod_src\tdm_update\libtdm_update\Zip) to this bug. |
|
I just had a look at the packager code and it seems that my sanity check automatically applies to it as well, so the packager should no longer introduce these issues into the differential update zip file. I'll just do a double-check of this the next time we release a TDM update. | |
I just compiled tdm_update.exe on Windows and updated all the way from 1.02 to 2.03. All dates got corrected and I verified that a particular mission where this issue used to show up is now giving no trouble any more. Thanks for the fix ! |
|
During the next release packaging process, we need to ensure that each of the affected pk4s have at least 1 file modified to fix the bad dates. | |
Great work! We should open a new tracker and peg it to the 2.04 roadmap to make sure all affected pk4s get touched. How do we find out which pk4s need it? |
|
Date Modified | Username | Field | Change |
---|---|---|---|
01.03.2015 17:46 | sotha_sil | New Issue | |
01.03.2015 18:15 |
|
Note Added: 0007447 | |
02.03.2015 16:20 | Springheel | Note Added: 0007448 | |
02.03.2015 19:14 | VanishedOne | Note Added: 0007449 | |
24.05.2015 21:27 | SteveL | Assigned To | => SteveL |
24.05.2015 21:27 | SteveL | Status | new => assigned |
24.05.2015 21:27 | SteveL | Note Added: 0007529 | |
24.05.2015 21:28 | SteveL | Relationship added | related to 0004098 |
24.05.2015 21:30 | SteveL | Note Edited: 0007529 | |
24.05.2015 21:33 | gnartsch | Note Added: 0007531 | |
25.05.2015 09:20 | gnartsch | Note Added: 0007533 | |
25.05.2015 12:43 | VanishedOne | Note Added: 0007534 | |
25.05.2015 15:04 | SteveL | Note Added: 0007535 | |
25.05.2015 15:06 | SteveL | Note Added: 0007536 | |
25.05.2015 15:11 | SteveL | Relationship added | related to 0004125 |
25.05.2015 15:18 | SteveL | File Added: date_check.py | |
26.05.2015 04:10 | gnartsch | Note Added: 0007538 | |
26.05.2015 04:34 | gnartsch | Note Added: 0007539 | |
26.05.2015 11:43 | SteveL | Note Added: 0007540 | |
26.05.2015 11:44 | SteveL | Note Added: 0007541 | |
26.05.2015 16:43 | gnartsch | Note Added: 0007542 | |
26.05.2015 20:18 | gnartsch | Note Added: 0007543 | |
26.05.2015 23:44 | SteveL | Note Added: 0007544 | |
27.05.2015 07:15 | gnartsch | Note Added: 0007545 | |
27.05.2015 19:01 | SteveL | Note Added: 0007546 | |
27.05.2015 19:19 | SteveL | Note Added: 0007547 | |
15.06.2015 17:50 | taaaki | Note Added: 0007569 | |
16.06.2015 00:40 | taaaki | Note Added: 0007570 | |
16.06.2015 00:40 | taaaki | Note Edited: 0007570 | |
16.06.2015 07:17 | gnartsch | Note Added: 0007571 | |
16.06.2015 18:54 | SteveL | Note Added: 0007572 | |
16.06.2015 18:54 | SteveL | Note Edited: 0007572 | |
16.06.2015 19:38 | taaaki | Note Added: 0007573 | |
16.06.2015 19:39 | taaaki | Note Edited: 0007573 | |
16.06.2015 21:09 | taaaki | Note Added: 0007574 | |
16.06.2015 21:09 | taaaki | Assigned To | SteveL => taaaki |
17.06.2015 17:12 | SteveL | Note Added: 0007575 | |
17.06.2015 19:12 | taaaki | Note Added: 0007576 | |
17.06.2015 19:32 | gnartsch | Note Added: 0007577 | |
17.06.2015 19:38 | gnartsch | Note Added: 0007578 | |
17.06.2015 19:41 | SteveL | Note Added: 0007579 | |
17.06.2015 20:29 | taaaki | File Added: Zip.cpp | |
17.06.2015 20:30 | taaaki | Note Added: 0007580 | |
17.06.2015 20:53 | taaaki | Note Added: 0007581 | |
18.06.2015 06:53 | gnartsch | Note Added: 0007582 | |
21.06.2015 17:03 | taaaki | Note Added: 0007591 | |
21.06.2015 17:03 | taaaki | Status | assigned => resolved |
21.06.2015 17:03 | taaaki | Fixed in Version | => TDM 2.04 |
21.06.2015 17:03 | taaaki | Resolution | open => fixed |
21.06.2015 17:37 | SteveL | Note Added: 0007592 | |
21.06.2015 17:47 | taaaki | Relationship added | related to 0004167 |
14.08.2015 19:45 | tels | Target Version | => TDM 2.04 |