Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old May 24, 2020, 21:51   #1
Tibarius
Swordsman
 
Tibarius's Avatar
 
Join Date: Jun 2011
Location: Germany
Age: 51
Posts: 416
Tibarius is an unknown quantity at this point
Angband crash

I am working on a variant, based on Angband version 4.0.4 under Windows10.

I am experiencing an angband crash once a character has died and i try to 'press any key' after having created a new character.

I can choose new and create a character, save that character with CTRL-X and continue to play after opening the saved game without any problems if it is the 1st character.

The problem is caused by a change in either class.txt , object.txt or store.txt.

What i basically did is that i moved every mage spell into a single magic book object and increased the num_books in class.txt to 52. store.txt only was adjusted in the magic store to replace the four basic books with now other magic books.

I can supply a screenshot, i can supply the standard and changed text files.

The only thing that looks suspicious to me is the lore.txt file that contains
wrong 'flags' lines for dungeon level 1 monsters. For example:

name:4:Giant yellow centipede
counts:1:0:0:0:0:0:0
flags:UNIQUE | QUESTOR | MALE | FEMALE | GROUP_AI | HAS_LIGHT | INVISIBLE
flags:COLD_BLOOD | WEIRD_MIND | ANIMAL

With that monster being defined in monster.txt with:
name:4:Giant yellow centipede
base:centipede
color:y
info:110:7:8:14:30
power:1:1:16:2:3
blow:BITE:HURT:1d2
blow:STING:POISON:1d3
desc:It is about four feet long and carnivorous.

Anyone has any idea (or even knows or can check the 4.0.4 code) what could cause that crash?

Thanks!
__________________
Blondes are more fun!
Tibarius is offline   Reply With Quote
Old May 24, 2020, 23:05   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,344
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Tibarius View Post
I am working on a variant, based on Angband version 4.0.4 under Windows10.

I am experiencing an angband crash once a character has died and i try to 'press any key' after having created a new character.

I can choose new and create a character, save that character with CTRL-X and continue to play after opening the saved game without any problems if it is the 1st character.

The problem is caused by a change in either class.txt , object.txt or store.txt.

What i basically did is that i moved every mage spell into a single magic book object and increased the num_books in class.txt to 52. store.txt only was adjusted in the magic store to replace the four basic books with now other magic books.

I can supply a screenshot, i can supply the standard and changed text files.
You will also need to have 52 magic books in object.txt, and this may affect the other classes that use the arcane books (rogues and rangers in 4.0.4). If you post your changes I can give them a quick look.

Quote:
Originally Posted by Tibarius View Post
The only thing that looks suspicious to me is the lore.txt file that contains
wrong 'flags' lines for dungeon level 1 monsters. For example:

name:4:Giant yellow centipede
counts:1:0:0:0:0:0:0
flags:UNIQUE | QUESTOR | MALE | FEMALE | GROUP_AI | HAS_LIGHT | INVISIBLE
flags:COLD_BLOOD | WEIRD_MIND | ANIMAL
This is fine; lore.txt records which flags are known about, not what the monster has. So UNIQUE just means you know whether this monster is unique or not (in this case, not).
__________________
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 May 24, 2020, 23:20   #3
Tibarius
Swordsman
 
Tibarius's Avatar
 
Join Date: Jun 2011
Location: Germany
Age: 51
Posts: 416
Tibarius is an unknown quantity at this point
text file excerptions

object.txt:
===============================

Code:
# 460 to 463 basic magic books removed
# 468 to 472 special magic books removed

#####   MAGIC Books   600 to 699   #####

name:600:[Magic Missile]
graphics:?:V
type:magic book
properties:5:5:200
alloc:5:1 to 100
combat:0:1d1:0:0:0

name:601:[Detect Visible Monsters]
graphics:?:V
type:magic book
properties:5:5:200
alloc:5:1 to 100
combat:0:1d1:0:0:0

name:602:[Blink]
graphics:?:V
type:magic book
properties:5:5:200
alloc:5:1 to 100
combat:0:1d1:0:0:0

... *snip* ...

name:650:[Mass Banishment]
graphics:?:V
type:magic book
properties:85:5:25000
alloc:5:1 to 100
combat:0:1d1:0:0:0

name:651:[Mind Blast]
graphics:?:V
type:magic book
properties:85:5:25000
alloc:5:1 to 100
combat:0:1d1:0:0:0

#####   HOLY Books   700 to 799   #####

name:700:[Holy Handbook]
graphics:?:Y
type:prayer book
properties:5:5:200
alloc:5:1 to 100
combat:0:1d1:0:0:0


class.txt:
===============================
############### MAGE ###############
name:1:Mage
stats:-3:3:0:0:0
skill-disarm:30:7
skill-device:36:13
skill-save:30:9
skill-stealth:2:0
skill-search:16:0
skill-search-freq:20:0
skill-melee:34:15
skill-shoot:20:15
skill-throw:20:15
skill-dig:0:0
info:0:10:170000:5
attack:3:10:2
equip:food:Ration of Food:1:3
equip:light:Wooden Torch:1:3
equip:magic book:[Magic Missile]:1:1
equip:sword:Dagger:1:1
equip:scroll:Word of Recall:1:1
flags:CUMBER_GLOVE | ZERO_FAIL | BEAM | CHOOSE_SPELLS
title:Apprentice
title:Mage
title:Conjurer
title:Invoker
title:Sorcerer
title:Wizard
title:Warlock 
title:Battlemage
title:Arcane Lord
title:High Wizard

magic:1:300:1:52

book:magic book:[Magic Missile]:1:1
spell:Magic Missile:1:1:22:3
effect:BOLT_OR_BEAM:MISSILE:-50
dice:$Dd3
expr:D:PLAYER_LEVEL:+ 0
desc:Fires a magic missile that always hits its target and does
desc: unresistable damage.

book:magic book:[Detect Visible Monsters]:1:1
spell:Detect Visible Monsters:1:1:23:3
effect:DETECT_VISIBLE_MONSTERS
dice:22d40
desc:Detects visible monsters in the immediate area,
desc: for one turn only. 

book:magic book:[Blink]:1:1
spell:Blink:1:2:24:3
effect:TELEPORT
dice:10
desc:Teleports you randomly up to 10 squares away.

... *snip* ...

book:magic book:[Mass Banishment]:1:1
spell:Mass Banishment:30:30:75:1000
effect:MASS_BANISH
desc:Removes all monsters within 20 squares of you.
desc: Uniques are not affected.
desc: You take 1d3 points of damage for every monster removed.

book:magic book:[Mind Blast]:1:1
spell:Mind Blast:30:50:75:1000
effect:BOLT_AWARE:OLD_CONF
dice:$B
expr:B:PLAYER_LEVEL:* 2 + 10
desc:Attempts to confuse a single monster for a level-dependant duration.
desc: Monsters that resist confusion are not affected.


############### PRIEST ###############
name:2:Priest


store.txt
===============================
# Magic-user's
store:6:Magic Shop
owner:15000:Ariel the Sorceress (Half-Elf)
owner:20000:Buggerby the Great (Gnome)
owner:25000:Inglorian the Mage (Human)
owner:30000:Luthien Starshine (High-Elf)
slots:4:14
turnover:9
always:magic book:[Detect Visible Monsters]
always:magic book:[Blink]
always:magic book:[Shield]
normal:magic book:[Identify]
normal:magic book:[Light Area]
normal:magic book:[Enchant Armor]
normal:ring:Searching
normal:ring:Feather Falling

... *snip* ...


store:8:Home
owner:0:Your home
#owner:0:Your home
#owner:0:Your home
#owner:0:Your home
__________________
Blondes are more fun!

Last edited by Nick; May 25, 2020 at 00:34.
Tibarius is offline   Reply With Quote
Old May 24, 2020, 23:22   #4
Tibarius
Swordsman
 
Tibarius's Avatar
 
Join Date: Jun 2011
Location: Germany
Age: 51
Posts: 416
Tibarius is an unknown quantity at this point
emoticons

If i view my last post, i see some emoticons. My post contains only plain text, so some kind of parsing must cause that. Can that be turned off somewhere?

Rogue and ranger classes in class.txt have the same entries, except that i # commented out the 14 attack spells and reduced the num_books to 38.

This all works fine for the 1st character created after choosing 'New' from the file menu (tested with mage, rogue, ranger). The crash occurs after pressing any key after the 1st character has died and a 2nd character is in creation.
The message says "ESC to step back, S to start over, or any other key to continue" => I press any key and crash (that is endless loop and Application not responding, i press 'X' with mouse and then crash)
__________________
Blondes are more fun!

Last edited by Tibarius; May 24, 2020 at 23:37.
Tibarius is offline   Reply With Quote
Old May 25, 2020, 00:33   #5
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 55
Posts: 8,344
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by Tibarius View Post
If i view my last post, i see some emoticons. My post contains only plain text, so some kind of parsing must cause that. Can that be turned off somewhere?
The simplest thing to do is put 'CODE' tags around the stuff you're quoting (use the # button above); I've done that for your text files.

Quote:
Originally Posted by Tibarius View Post
Rogue and ranger classes in class.txt have the same entries, except that i # commented out the 14 attack spells and reduced the num_books to 38.

This all works fine for the 1st character created after choosing 'New' from the file menu (tested with mage, rogue, ranger). The crash occurs after pressing any key after the 1st character has died and a 2nd character is in creation.
The message says "ESC to step back, S to start over, or any other key to continue" => I press any key and crash (that is endless loop and Application not responding, i press 'X' with mouse and then crash)
OK, I'll have a think.
__________________
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 May 25, 2020, 11:45   #6
Tibarius
Swordsman
 
Tibarius's Avatar
 
Join Date: Jun 2011
Location: Germany
Age: 51
Posts: 416
Tibarius is an unknown quantity at this point
problem located & fixed

Thanks Nick,
i was able to track down the problem finally with narrowing down the possible changes made.

The problem is caused by store.txt:
store:8:Home
owner:0:Your home
owner:0:Your home
owner:0:Your home
owner:0:Your home

It is required to have the 4 identical lines at the end of the store.txt file.
If you comment out 3 of them (or delete them) then the game crashes once you try to start a 2nd character.

It is hard to imagine, why that would happen. Somehow it seems to me
like town generation has something to do with it (because that is likely the only place where store.txt is relevant for).

But why wouldn't it crash playing the 1st char? Can't say ...

My problem seems to be fixed for now. I recommend to insert a comment line in store.txt that these lines are required from Angband to work properly because that is not obvious for someone trying to modify the .txt files only.
__________________
Blondes are more fun!
Tibarius is offline   Reply With Quote
Old May 25, 2020, 12:43   #7
tangar
Knight
 
tangar's Avatar
 
Join Date: Mar 2015
Posts: 684
tangar is on a distinguished road
Quote:
Originally Posted by Tibarius View Post
Thanks Nick,
i was able to track down the problem finally with narrowing down the possible changes made.

The problem is caused by store.txt:
store:8:Home
owner:0:Your home
owner:0:Your home
owner:0:Your home
owner:0:Your home

It is required to have the 4 identical lines at the end of the store.txt file.
If you comment out 3 of them (or delete them) then the game crashes once you try to start a 2nd character.

It is hard to imagine, why that would happen. Somehow it seems to me
like town generation has something to do with it (because that is likely the only place where store.txt is relevant for).

But why wouldn't it crash playing the 1st char? Can't say ...

My problem seems to be fixed for now. I recommend to insert a comment line in store.txt that these lines are required from Angband to work properly because that is not obvious for someone trying to modify the .txt files only.
Every store has to have 4 entries for owners, eg
Quote:
store:1:General Store
owner:5000:Bilbo the Friendly (Hobbit)
owner:10000:Rincewind the Chicken (Human)
owner:20000:Snafu the Midget (Gnome)
owner:30000:Lyar-el the Comely (Elf)
player's house also considered as 'store' so it has to have these lines
__________________
https://tangaria.com - persistent online multiplayer roguelike game
tangar.info - my website ⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽⍽ My chars @ angband.oook.cz
youtube.com/GlazGame — streams in English ⍽ youtube.com/StreamGuild — streams in Russian
tangar is offline   Reply With Quote
Old May 25, 2020, 16:46   #8
Tibarius
Swordsman
 
Tibarius's Avatar
 
Join Date: Jun 2011
Location: Germany
Age: 51
Posts: 416
Tibarius is an unknown quantity at this point
stores

Thanks for the hint Tangar.

But what surprises me, is the fact, that it didn't crash at once then ...
i was able to create a 1st char and run around in town normally ... odd!
__________________
Blondes are more fun!
Tibarius 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
Solution for Angband crash on startup when compiled with Visual Studio Gordon Development 5 January 4, 2020 03:44
ToME crash on angband.live HugoTheGreat2011 ToME 0 November 28, 2018 07:52
Crash AngelicPenguin Development 4 June 28, 2017 21:22
[3.3] crash in angband-win-3.3RC-b822465 Timo Pietilš Development 5 July 30, 2011 11:14
Crash - angband: Too many macros! Kav Vanilla 16 June 15, 2007 14:38


All times are GMT +1. The time now is 18:31.


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