Attnam / ivan

Iter Vehemens ad Necem - a continuation of the graphical roguelike by members of http://attnam.com
GNU General Public License v2.0
301 stars 43 forks source link

(ready) Go thru route (mini-map) and re-apply previous #460

Closed AquariusPower closed 5 years ago

AquariusPower commented 6 years ago

made some basic tests and fixed all crashes, seems good now.

ryfactor commented 5 years ago

From some cursory testing, so far on Windows, when I pull up the map and press "l" for look mode, I get a crash.

ryfactor commented 5 years ago

In the item menu, if I press "F1", I get a crash.

AquariusPower commented 5 years ago

I will test both thx!

AquariusPower commented 5 years ago

I am not being able to simulate these crashes. could you drop your config file contents? the crash may be due to some interaction with other options I guess.

Obs.: the item menu 'i' has a useless F1 behavior of showing info about the first item, but should not crash at all (and doesnt here)

Btw.: the minimap help thru F1 only shows info after any next key event, that's a current engine limitation that was too complex for me til now to figure out a workaround for this minor bug, but considering how key events should work, it is not perfected yet.

here mine :)

DefaultName = "";
FantasyNamePattern = "!ss !sV";
DefaultPetName = "Kenny";
AutoSaveInterval = 25;
AltAdentureInfo = 1;
BeNice = 1;
HoldPosMaxDist = 1;
MemorizeEquipmentMode = 2;
WarnAboutVeryDangerousMonsters = 1;
AutoDropLeftOvers = 0;
SmartOpenCloseApply = 1;
CenterOnPlayerAfterLook = 1;
ShowGodInfo = 1;
ShowMapAtDetectMaterial = 1;
GoOnStopMode = 3;
WaitNeutralsMoveAway = 1;
AllWeightIsRelevant = 1;
ShowVolume = 1;
EnhancedLights = 1;
DistLimitMagicMushrooms = 8;
AutoPickupThrownItems = 1;
Contrast = 100;
WindowWidth = 1920;
WindowHeight = 1025;
GraphicsScale = 1;
FullScreenMode = 0;
ScalingQuality = 1;
LookZoom = 1;
XBRZScale = 1;
XBRZSquaresAroundPlayer = 3;
SilhouetteScale = 6;
AltSilhouette = 3;
AltSilhouettePreventColorGlitch = 2;
AltListItemPos = 2;
AltListItemWidth = 1000;
StackListPageLength = 40;
DungeonGfxScale = 5;
FontGfx = 3;
OutlinedGfx = 0;
FrameSkip = -1;
ShowItemsAtPlayerSquare = 10;
RotateTimesPerSquare = 5;
HitIndicator = 4;
ShowMap = 4;
TransparentMapLM = 1;
PlaySounds = 1;
Volume = 37;
MIDIOutputDevice = 2;
DirectionKeyMap = 0;
SaveGameSortMode = 1;
ShowTurn = 1;
ShowFullDungeonName = 1;
SelectedBkgColor = "8,8,75";
AllowMouseOnFelist = 1;
AllowImportOldSavegame = 1;
HideWeirdHitAnimationsThatLookLikeMiss = 0;
ryfactor commented 5 years ago

My config was just default plus the dungeon scale x2.

Might be Windows specific. I can try your config file within 48 hours.

I can't really identify all the other bugs, so when we merge and generate the next build we will leave it to others to test for bugs. If it's serious, we will find out soon :)

AquariusPower commented 5 years ago

F1 seems to not be working at all with default config (I deleted the file and let the game create a new one), I will try to understand what is happening.

Btw, the default config also now has the resolution as 640x480, but should be 800x600 as vanilla... anyway in both cases, it didnt show the map on my first run (as it wont work with dungeon scale x1 that required game app restart). It is showing now (with x2), and still w/o crashes in mapLookMode.

obs.: due to the huge amount of new features, I suggest name it alpha release :>

and if someone manage to test/implement this for windows, would help a huge lot! https://github.com/Attnam/ivan/issues/386

AquariusPower commented 5 years ago

now I think that may be you got a special/unique/rare condition/testCase, and that map look crash may only happen on your savegame (randomly in new game too), so I wonder if you could upload your savegame files? if possible in .7z.zip (github doesnt accept just .7z) so I spend just a little of my 100MB/day connection xD

btw, I always test only on my fully merged branch: THE_MERGED_BRANCHES_I_AM_PLAYING, to avoid other full branches compilation time, but it may not be related to stability.

ryfactor commented 5 years ago

Here's an example. This is as small as I could get it :D

ryfactor commented 5 years ago

Teleporting the player instead of Jenny, works well but it is possibly slow for some reason? Not urgent for now.

AquariusPower commented 5 years ago

in my save, in wizard mode, I moved to UT1, WorldMap and then over vesana, 3 time, and all were instantaneous, I will wizard your save and try again :)

AquariusPower commented 5 years ago

your save is a special case! in the ContinueMenu to show the saves list, during your save file, while reading it's info, it created a huge memory leak here during the SkipGameScript() call, at

void gamescript::Load(inputfile& SaveFile)
{
  script::Load(SaveFile);
  SaveFile >> Team >> Dungeon;

while loading the Team data :o

w/o your save on the list: resident 135mb, virtual 393mb with it: 274mb 2131mb!

here the stack. I dont know if it may help if someone reads this, I am not used to memory leaks, allocator, malloc etc, so if someone have any idea?

#0  _int_malloc(av = 0x7ffff6618b20 <main_arena>, av@entry = 0x7ffff6618b20 <main_arena>, bytes = 72, bytes@entry = 72) at malloc.c:3802
#1  __GI___libc_malloc(bytes = 72) at malloc.c:2913
#2  operator new(unsigned long)() at :0
#3  __gnu_cxx::new_allocator<std::_List_node<std::pair<int, teamscript> > >::allocate(this = 0x7ffffffc5490, __n = 1) at /usr/include/c++/5/ext/new_allocator.h:104
#4  std::__cxx11::_List_base<std::pair<int, teamscript>, std::allocator<std::pair<int, teamscript> > >::_M_get_node(this = 0x7ffffffc5490) at /usr/include/c++/5/bits/stl_list.h:392
#5  std::__cxx11::list<std::pair<int, teamscript>, std::allocator<std::pair<int, teamscript> > >::_M_create_node<std::pair<int, teamscript> const&>(this = 0x7ffffffc5490) at /usr/include/c++/5/bits/stl_list.h:571
#6  std::__cxx11::list<std::pair<int, teamscript>, std::allocator<std::pair<int, teamscript> > >::_M_insert<std::pair<int, teamscript> const&>(this = 0x7ffffffc5490, __position = ) at /usr/include/c++/5/bits/stl_list.h:1763
#7  std::__cxx11::list<std::pair<int, teamscript>, std::allocator<std::pair<int, teamscript> > >::push_back(this = 0x7ffffffc5490, __x = ) at /usr/include/c++/5/bits/stl_list.h:1089
#8  std::__cxx11::list<std::pair<int, teamscript>, std::allocator<std::pair<int, teamscript> > >::_M_fill_initialize(this = 0x7ffffffc5490, __n = 8567009676, __x = ) at /usr/include/c++/5/bits/stl_list.h:1704
#9  std::__cxx11::list<std::pair<int, teamscript>, std::allocator<std::pair<int, teamscript> > >::list(this = 0x7ffffffc5490, __n = 8589934605, __value = , __a = ) at /usr/include/c++/5/bits/stl_list.h:631
#10  std::__cxx11::list<std::pair<int, teamscript>, std::allocator<std::pair<int, teamscript> > >::insert(this = 0xfc8318, __position = , __n = 8589934605, __x = ) at /usr/include/c++/5/bits/list.tcc:120
#11  std::__cxx11::list<std::pair<int, teamscript>, std::allocator<std::pair<int, teamscript> > >::resize(this = 0xfc8318, __new_size = 8589934605, __x = ) at /usr/include/c++/5/bits/list.tcc:207
#12  operator>><std::pair<int, teamscript> >(SaveFile = , List = ) at FeLib/Include/save.h:326
#13  gamescript::Load(this = 0xfc8310, SaveFile = ) at Main/Source/script.cpp:1221
#14  operator>>(SaveFile = , Script = @0x7ffffffc5670: 0xfc8310) at Main/Source/script.cpp:1233
#15  SkipGameScript(pSaveFile = 0x7ffffffc5db0) at Main/Source/main.cpp:58
#16  iosystem::ContinueMenu(TopicColor = 65535, ListColor = 38066, DirectoryName = , iSaveFileVersion = 133, bAllowImportOldSavegame = true) at FeLib/Source/feio.cpp:1114
#17  main(argc = 1, argv = 0x7ffffffc62a8) at Main/Source/main.cpp:152

the file version is correct, 133, so my guess is which branch you compiled, this or my fully merged one? (I actually only make tests and compile the merged one, takes some time using all cores and memory and even does mem swap hehe)

also, this line at feio.cpp ContinueMenu() skipSeek(&SaveFile); (actually SkipGameScript()) could be removed if we re-arranged the saved data order by moving the game script after what is required during the games listing better info like "dungeon and wizard mode", but that would make importing old saves impossible despite I guess it is not that crucial.

AquariusPower commented 5 years ago

jus for this test (already reverted) I commented these lines in feio.cpp

//      skipSeek(&SaveFile); //DUMMY (for here) binary data skipper
//      SaveFile >> rfi.CurrentDungeonIndex >> rfi.CurrentLevelIndex; DBG2(rfi.CurrentDungeonIndex,rfi.CurrentLevelIndex);
//      SaveFile >> rfi.Camera; //skipper
//      SaveFile >> rfi.WizardMode;

but I knew the problem would happen again during load, despite the save is showing on the list now just w/o the extra info, did it just to be sure...

so in short, I am unable to load that game

the new list size 8589934605 here is quite suspicious, like the save file was created expecting something else to be in that data place, my guess is such list size should be a little number like 2 or 3. std::__cxx11::list<std::pair<int, teamscript>, std::allocator<std::pair<int, teamscript> > >::resize(this = 0xfc8318, __new_size = 8589934605, __x = ) at /usr/include/c++/5/bits/list.tcc:207