Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: collector freezes during characters’ spawning and doesn’t generate any data #29

Closed
AnatolyKruglov opened this issue Jul 5, 2023 · 5 comments

Comments

@AnatolyKruglov
Copy link
Contributor

AnatolyKruglov commented Jul 5, 2023

I have compiled GCC-Collector.asi, put all necessary files (such as SceneDirectorAnim.txt) in game’s root folder, and followed the instruction carefully (choosing level 3). When I restart and press ‘L’, the main character starts falling, camera moves to the selected scene and a set of characters is generated. But then the script freezes with no error. It just stops generating new characters and only 1 file is created (with no images or meta)

The exact structure of my data folder is below:

data 
    part_1_0 
        1688582167  // for some reason such a folder was generated only for part 1_0
            pedInfo.xml  // and only 1 file has been generated here anyway, with no images\meta 
        areaInfo.log 
        eyeInfo.log 
        levelInfo.log 
        Zheight.log 
    part_1_1 
        areaInfo.log 
        eyeInfo.log 
        levelInfo.log 
        Zheight.log 
    part_1_2 
        areaInfo.log 
        eyeInfo.log 
        levelInfo.log 
        Zheight.log 
    part_1_3 
        areaInfo.log 
        eyeInfo.log 
        levelInfo.log 
        Zheight.log 

I have also tried using the pre-compiled GCC-CL.asi from gcc tools, but always got error when pressing ‘L’ like in issues #24 and #5, so I had to recompile it.

Could it be a limitation of my machine, such as not enough memory for the game and the script to work properly?

I would really appreciate your help with repairing the script. My logs will be posted below

@AnatolyKruglov
Copy link
Contributor Author

GCC-CL.log

[1688581843087] : create new fold = data
[1688581843090] : create new fold = data
[1688581843127] : create new fold = data
[1688581843129] : create new fold = data
[1688581845419] : heading : 184.027206
[1688581845421] : actor location (-13.528101, -1450.975220, 30.542469)
[1688581845441] : Camera offset (-0.000000, -10.000000, 6.400000)
[1688581845458] : Camera location (-14.230401, -1440.999878, 36.942471)
[1688581856325] : set points No.0
[1688581876032] : set points No.1
[1688581884251] : set points No.2
[1688581893080] : set points No.3
[1688581901938] : set points No.4
[1688581904583] : data\part_1_0\areaInfo.log
[1688581904587] : data\part_1_1\areaInfo.log
[1688581904656] : data\part_1_2\areaInfo.log
[1688581904658] : data\part_1_3\areaInfo.log
[1688581904672] : Points write into file done.
[1688581905233] : data\part_1_0\eyeInfo.log
[1688581905236] : data\part_1_0\areaInfo.log
[1688581905237] : -14.604225 -1457.534912
[1688581905242] : data\part_1_0\eyeInfo.log
[1688581905242] : get eye info done.
[1688581905243] : -14.123400 -1442.689941 36.095699
[1688581905244] : -22.264799 0.000001 -175.656998
[1688581905245] : 40.000000
[1688581905364] : finished keep camera...
[1688581910059] : data\part_1_1\eyeInfo.log
[1688581910077] : get eye info done.
[1688581910079] : -29.449200 -1457.050049 36.095699
[1688581910090] : -22.264799 0.000001 -85.656998
[1688581910091] : 40.000000
[1688581910211] : finished keep camera...
[1688581912884] : data\part_1_2\eyeInfo.log
[1688581912909] : get eye info done.
[1688581912910] : -15.085100 -1472.380005 36.095699
[1688581912915] : -22.264799 0.000001 4.343000
[1688581912916] : 40.000000
[1688581913036] : finished keep camera...
[1688581920197] : data\part_1_3\eyeInfo.log
[1688581920200] : get eye info done.
[1688581920226] : 0.240746 -1458.020020 36.095699
[1688581920229] : -22.264799 0.000001 94.343002
[1688581920230] : 40.000000
[1688581920345] : finished keep camera...
[1688581926587] : end defineArea
[1688582120989] : subFold = .\data\part_1_0
[1688582121007] : .\data\part_1_0\areaInfo.log
[1688582121007] : .\data\part_1_0\eyeInfo.log
[1688582121008] : .\data\part_1_0\levelInfo.log
[1688582121009] : .\data\part_1_0\Zheight.log
[1688582121010] : 1_0 0 0
[1688582121011] : subFold = .\data\part_1_1
[1688582121012] : .\data\part_1_1\areaInfo.log
[1688582121012] : .\data\part_1_1\eyeInfo.log
[1688582121013] : .\data\part_1_1\levelInfo.log
[1688582121013] : .\data\part_1_1\Zheight.log
[1688582121014] : 1_1 1 0
[1688582121015] : subFold = .\data\part_1_2
[1688582121015] : .\data\part_1_2\areaInfo.log
[1688582121016] : .\data\part_1_2\eyeInfo.log
[1688582121017] : .\data\part_1_2\levelInfo.log
[1688582121018] : .\data\part_1_2\Zheight.log
[1688582121018] : 1_2 2 0
[1688582121019] : subFold = .\data\part_1_3
[1688582121020] : .\data\part_1_3\areaInfo.log
[1688582121020] : .\data\part_1_3\eyeInfo.log
[1688582121021] : .\data\part_1_3\levelInfo.log
[1688582121021] : .\data\part_1_3\Zheight.log
[1688582121022] : 1_3 3 0
[1688582135422] : deault fold is part_1_0
[1688582135424] : now have = 0
[1688582135445] : let's create one scene.
[1688582135446] : data\part_1_0\areaInfo.log
[1688582135448] : data\part_1_0\eyeInfo.log
[1688582155450] : -19.535601 -9.672850 -1462.359985 -1452.709961
[1688582155492] : data\part_1_0\eyeInfo.log
[1688582157655] : finished keep camera...
[1688582157673] : start time: 1688582157
[1688582157677] : m = 5
[1688582157692] : selected hour in timeSeg[7]
[1688582158921] : hour = 23
[1688582160962] : hour = 23, THUNDER
[1688582160964] : avg2 = 50
[1688582160982] : the pedestrian number of the scene: 23
[1688582160986] : average height = 31.159800
[1688582160991] : no anims : false
[1688582160998] : finished create 23 Points ...
[1688582167728] : reset pedestrian positions done.
[1688582167732] : fold path : data\part_1_0\1688582167
[1688582167733] : pedInfo path: data\part_1_0\1688582167\pedInfo.xml
[1688582167737] : create (23 - 0) pedestrians.
[1688582172592] : out create pedestrian
[1688582172596] : perform animation : 333

@Elin24
Copy link
Collaborator

Elin24 commented Jul 6, 2023

Hi Anatolii,

I'm not sure what happened to your device, but the following things you can do to figure out the reason:

  1. The pedInfo.xml is obtained so that the error may happen after Write_ped_info and before screenStencilCap;
  2. There is no information like "catch stencil and screen, ...", so the error may happen before this line;
  3. Accordingly, there may be something happening in the function screenStencilCap;
  4. You can use the function log_to_file() to write some log in the function screenStencilCap, and figure out which part leads to your problem.

@AnatolyKruglov
Copy link
Contributor Author

Thank you, I will try it

@AnatolyKruglov
Copy link
Contributor Author

AnatolyKruglov commented Jul 15, 2023

Hello, I've tried logging to file as you recommended, here is the update on the problem

In createcrowd.cpp, the function screenStencilCap contains an infinite cycle, because the rawpath file is never created. Further investigation showed that in main.cpp, in function clear_depth_stencil_view_hook, the program never enters this if-clause, inside of which that rawpath file should have been written. Turns out, desc.Format returns 44, while DXGI_FORMAT_R32G8X24_TYPELESS is 19, so the if-statement turns false.

Could you please help me find out why desc.Format != DXGI_FORMAT_R32G8X24_TYPELESS? Could it be because of hardware problems (such as my laptop's GPU specifics) or the directX version\initialization flags?

@AnatolyKruglov
Copy link
Contributor Author

AnatolyKruglov commented Jul 18, 2023

Turns out, the problem was indeed caused by my GPU specifics. Some GPUs have a different z-buffer \ stencil format (umautobots/GTAVisionExport#2)

Solution: in all scripts I found all (2 in total) mentions of DXGI_FORMAT_R32G8X24_TYPELESS and deleted them. After that, the plugin started working fine

Elin24 added a commit that referenced this issue Jul 24, 2023
Solve the problem in [issue 29](#29) caused by GPU specifics.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants