aap / skygfx

Bringing the PS2 graphics of GTA San Andreas to PC
210 stars 18 forks source link

Crash when entering "You've had your Chips" mission cutscene #18

Open Firmeteran opened 4 years ago

Firmeteran commented 4 years ago

Can't skip the cutscene, the game always freeze first. then crash. Always conflicting with Modloader (cause the message down below always appear on modloader.log).

Game version: GTA SA 1.0 US Unhandled exception at 0x6A0E96E5 in d3d9.dll (+0x696e5): 0xC0000005: Access violation reading location 0x00000000. Register dump: EAX: 0x05CCE9C0 EBX: 0x00000004 ECX: 0x01984CA0 EDX: 0x00000000
EDI: 0x05CCE9C0 ESI: 0x00000000 EBP: 0x0177F270 EIP: 0x6A0E96E5
ESP: 0x0177F238 EFL: 0x00210206 CS: 0x00000023 SS: 0x0000002B
GS: 0x0000002B FS: 0x00000053 ES: 0x0000002B DS: 0x0000002B

Stack dump:
    0x0177F238:  0B2382A4 21BBDA90 1005FDE0 00000000 00000001 1A39972C
    0x0177F250:  1A173EF0 00000000 24FC2308 24FC36A0 0177F238 0177F4C0
    0x0177F268:  6A10021E FFFFFFFF 0177F388 007FACBD 01984CA0 00000020
    0x0177F280:  00000000 00000004 65541B82 00000020 00000000 00000004
    0x0177F298:  21BBDA00 0177F2C0 0177F2B0 219B5560 1005FD40 2196D548
    0x0177F2B0:  00000000 42700000 41700000 1005FD58 00000000 3F800000
    0x0177F2C8:  00000000 00000000 6A0E2953 00000000 3F800000 00000000
    0x0177F2E0:  65542839 00000000 00000000 3F800000 6554284B 00000000
    0x0177F2F8:  00000000 00000000 21881B50 3F800000 00000000 00000000
    0x0177F310:  44FC5B00 80000000 3F800000 00000000 447E6700 00000000
    base: 0x01580000   top: 0x0177F238   bottom: 0x01780000

Backtrace (may be wrong):
    =>0x6A0E96E5 Direct3DCreate9Ex+0x46b5 in d3d9.dll (+0x696e5) (0x0177F270) 
      0x007FACBD in gta_sa.exe (+0x3facbd) (0x0177F388) 
      0x65541C3D in skygfx.asi (+0x1c3d) (0x0177F3A0) 
      0x00757877 in gta_sa.exe (+0x357877) (0x0177F3CC) 
      0x6A0D4D25 in d3d9.dll (+0x54d25) (0x0177F408) 
      0x0053439A in gta_sa.exe (+0x13439a) (0x0177F418) 
      0x00553308 in gta_sa.exe (+0x153308) 

Shutting down Mod Loader... Shutting down filesystem watcher... Shutting down menu... Unloading plugin "gta3.std.fx" Unloading plugin "gta3.std.asi" Unloading plugin "gta3.std.bank" Unloading plugin "gta3.std.data" Unloading plugin "gta3.std.movies" Unloading plugin "gta3.std.scm" Unloading plugin "gta3.std.text" Unloading plugin "gta3.std.tracks" Unloading plugin "gta3.std.sprites" Unloading plugin "gta3.std.stream" Mod Loader has been shutdown.

dbozan99 commented 4 years ago

I believe that I've figured this out. Just because a material says it uses rpMATFXEFFECTUVTRANSFORM doesn't mean that it actually does. RpMatFXMaterialGetUVTransformMatrices will return NULL matrices in this case which leads to the crash.

I've submitted PR #20 as my first Pull Request ever ( be gentle :P ) which is a workaround to this issue.