Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old February 9, 2017, 13:41   #351
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,683
PowerWyrm is on a distinguished road
Quote:
Originally Posted by kandrc View Post
Here's another. Not a crash, but an infinite loop. Read an un-id'd scroll in town. Turned out to be create traps.
Create traps should be disabled in town anyway...
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old February 9, 2017, 16:36   #352
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,963
Derakon is on a distinguished road
How many of those "try infinitely until we find a match" loops are there in the game, anyway? Those seem like clear opportunities for bugs that lead to infinite loops. There should at least be a cap on how long we try for (like, 1000 attempts or something) and a graceful handling of failure.
Derakon is offline   Reply With Quote
Old February 10, 2017, 16:07   #353
kandrc
Swordsman
 
Join Date: Dec 2007
Posts: 299
kandrc is on a distinguished road
I've been frequently getting an error in which the save file is treated as if corrupt when the game fails to load an artifact for a dead character. The game aborts, forcing me to delete the save file and lose macros, inscriptions, etc. I haven't reported it before because I didn't want to dive into unknown code deeply enough to understand it. I decided to take a look this time.

My last game was randart (always randart). Load fails on the first call to lookup_artifact_name(), which fails to match the name of the randart. Peeking inside a_info[], I see that it's full of the standard artifacts.

In case it's apropos, I play with "use old set of randarts" false, and I literally never explicitly save or close the game; just keep it up on another virtual desktop.

This isn't a big deal when loading a dead file, but if the character were alive (don't know if this would occur then), it would be very annoying. Regardless, it might be beneficial to provide a fallback mechanism to keep settings while discarding the rest of the file, rather than simply aborting on any error.

Come to think of it, I'm pretty sure I've had this happen when loading an autosave after a crash. Not 100% certain on that, unfortunately.
kandrc is offline   Reply With Quote
Old February 10, 2017, 23:36   #354
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,910
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by kandrc View Post
I've been frequently getting an error in which the save file is treated as if corrupt when the game fails to load an artifact for a dead character. The game aborts, forcing me to delete the save file and lose macros, inscriptions, etc. I haven't reported it before because I didn't want to dive into unknown code deeply enough to understand it. I decided to take a look this time.

My last game was randart (always randart). Load fails on the first call to lookup_artifact_name(), which fails to match the name of the randart. Peeking inside a_info[], I see that it's full of the standard artifacts.
OK, thanks for that.

My plan to fix this is just not to save the dead player's gear and stores, which is where the problem seems to be arising. This should make reloading savefiles fairly robust; I will think about some more savefile restructuring to allow keeping setting on abort.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old February 10, 2017, 23:59   #355
PowerDiver
Prophet
 
Join Date: Mar 2008
Posts: 2,712
PowerDiver is on a distinguished road
Quote:
Originally Posted by Nick View Post
OK, thanks for that.

My plan to fix this is just not to save the dead player's gear and stores, which is where the problem seems to be arising. This should make reloading savefiles fairly robust; I will think about some more savefile restructuring to allow keeping setting on abort.
I like saving those things. I believe that the choice to cheat death should be done the next time the game is started, when the emotions of YASD have worn off.
PowerDiver is offline   Reply With Quote
Old February 11, 2017, 00:34   #356
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,910
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by PowerDiver View Post
I like saving those things. I believe that the choice to cheat death should be done the next time the game is started, when the emotions of YASD have worn off.
Yes, I take your point. I'll do this for now, but may revisit it later.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old February 11, 2017, 01:35   #357
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,910
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by PowerWyrm View Post
Clearly because of:

Code:
square_memorize(c, yy, xx);
square_mark(cave, yy, xx);
"cave" and "c" are not identical, one is the new level (c), the other is the old one (cave) which doesn't exist anymore.
Thank you, of course that's it. I'll have a look for others like that too.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old February 11, 2017, 02:25   #358
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,910
Donated: $60
Nick will become famous soon enough
New build is up, fixing
  • Power levels of clairvoyance and enlightenment
  • Hang on trap creation in town
  • Crash on trying to create a lit labyrinth
  • Error in update_mon()
  • Savefile not loading for dead randart characters

I forgot to change the default for keeping the randart set, will do that soon.

Thanks to kandrc and PowerWyrm (and others) for these ones.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old February 12, 2017, 21:35   #359
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,910
Donated: $60
Nick will become famous soon enough
New build on the nightlies page, with a big change to how randarts are handled. If you have a current character with randarts DO NOT update; this should be the last time I have to say that, though.

Randarts are now written to an 'artifact.txt' file in the user directory, which is then automatically loaded. The old "keep randarts" option is now a "keep arts" option, and works as follows:
  • if on, any existing 'artifact.txt' file in the user directory is used; in particular, if you just finished a randarts game, the same randarts will be used
  • if off, any existing 'artifact.txt' file in the user directory is archived into an 'archive' directory inside the user directory (as artifact_1.txt, etc), and then randarts are generated or not according to the randarts option

IMHO this simplifies everything massively, but let me know if there are any problems with it.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old February 14, 2017, 09:41   #360
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,683
PowerWyrm is on a distinguished road
Just a little memory leak: "msg" and "desc" from "struct obj_property" are not freed in cleanup_object_property().
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sil 1.1.1 no-artefacts, polearm master bron AAR 21 August 28, 2013 00:42
3x Breaking and Entering by Anaxe the Master Thief Thraalbee AAR 0 August 26, 2011 22:42
Artifacts in 3.2 (Master List) Tregonsee Vanilla 8 March 6, 2011 12:33
State of Angband master branch d_m Development 80 November 26, 2010 15:14
squelch comments/complaints ChodTheWacko Vanilla 2 July 28, 2007 18:50


All times are GMT +1. The time now is 15:07.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.