Chaosforge Forum

  • December 12, 2024, 10:08
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: Got error (crash on startup). Can anyone help? (random music related) [SOLVED]  (Read 14804 times)

Brewtal Legend

  • Second Lieutenant
  • *
  • Offline Offline
  • Posts: 162
  • I am Hellbound
    • View Profile

Just tried playing 997 for the first time but I got this error:

Code: [Select]
----------------------------------------------------------------------
Timestamp   : 4/24/2014 16:53:30
Error level : FATAL EXCEPTION
Message     : Fatal exception encountered

An unhandled exception occurred at $004B1748 :
ELuaException : F:\Stuff\Roguelike\doomrl\config.lua:9: require "F:\Stuff\Roguelike\doomrl\musichq.lua" failed!
  $004B1748  TLUACONFIG__LOAD,  line 140 of e:/Projects/fpcvalkyrie/src/vluaconfig.pas
  $004B181F  TLUACONFIG__LOADMAIN,  line 149 of e:/Projects/fpcvalkyrie/src/vluac----------------------------------------------------------------------
Timestamp   : 4/24/2014 16:55:19
Error level : FATAL EXCEPTION
Message     : Fatal exception encountered

An unhandled exception occurred at $004B1748 :
ELuaException : F:\Stuff\Roguelike\doomrl\config.lua:9: require "F:\Stuff\Roguelike\doomrl\musichq.lua" failed!
  $004B1748  TLUACONFIG__LOAD,  line 140 of e:/Projects/fpcvalkyrie/src/vluaconfig.pas
  $004B181F  TLUACONFIG__LOADMAIN,  line 149 of e:/Projects/fpcvalkyrie/src/vluaconfig.pas
  $004AEE7A  TDOOMCONFIG__CREATE,  line 107 of src/doomconfig.pas
  $0041EE23  TDOOM__CREATE,  line 221 of src/doombase.pas
  $00401BCE  main,  line 86 of src/doomrl.pas

----------------------------------------------------------------------

----------------------------------------------------------------------
Timestamp   : 4/24/2014 16:56:10
Error level : FATAL EXCEPTION
Message     : Fatal exception encountered

An unhandled exception occurred at $004B1748 :
ELuaException : F:\Stuff\Roguelike\doomrl\config.lua:9: require "F:\Stuff\Roguelike\doomrl\musichq.lua" failed!
  $004B1748  TLUACONFIG__LOAD,  line 140 of e:/Projects/fpcvalkyrie/src/vluaconfig.pas
  $004B181F  TLUACONFIG__LOADMAIN,  line 149 of e:/Projects/fpcvalkyrie/src/vluaconfig.pas
  $004AEE7A  TDOOMCONFIG__CREATE,  line 107 of src/doomconfig.pas
  $0041EE23  TDOOM__CREATE,  line 221 of src/doombase.pas
  $00401BCE  main,  line 86 of src/doomrl.pas

----------------------------------------------------------------------

----------------------------------------------------------------------
Timestamp   : 4/24/2014 16:57:06
Error level : FATAL EXCEPTION
Message     : Fatal exception encountered

An unhandled exception occurred at $004B1748 :
ELuaException : F:\Stuff\Roguelike\doomrl\config.lua:9: require "F:\Stuff\Roguelike\doomrl\musichq.lua" failed!
  $004B1748  TLUACONFIG__LOAD,  line 140 of e:/Projects/fpcvalkyrie/src/vluaconfig.pas
  $004B181F  TLUACONFIG__LOADMAIN,  line 149 of e:/Projects/fpcvalkyrie/src/vluaconfig.pas
  $004AEE7A  TDOOMCONFIG__CREATE,  line 107 of src/doomconfig.pas
  $0041EE23  TDOOM__CREATE,  line 221 of src/doombase.pas
  $00401BCE  main,  line 86 of src/doomrl.pas

----------------------------------------------------------------------


I also should mention that I changed up the music settings like I did for 996.  Here is the copy of my musichq file:

Code: [Select]
-- High quality remixes of the original Doom music are a courtesy of Sonic
-- Clang ( http://sonicclang.ringdev.com/ ) used with permission.

-- Doom the Roguelike theme, Unholy Cathedral, Final Showdown, Hells
-- Weapons, Something Wicked, Of Skull And Bone, The Brick Song, and
-- Too Hot Down Here tracks composed by Simon Volpert (thanks!)

dofile "random.lua"

local function rand_music(music_array,song_num)
local song_tot = table.maxn(music_array)
local song_count = 1
local music_list = {}
for i=1,math.ceil(song_num/song_tot) do
local loop_itr = math.min(song_tot,song_num)
song_num = song_num - song_tot
local song_list = music_array
for j=1,loop_itr do
idx = math.random(song_tot-j+1)
song = song_list[idx]
music_list[song_count] = song
table.remove(song_list,j)
song_count = song_count + 1
end
end
return(music_list)
end

local title_playlist = {
"mp3/PSX_Doom_Music/doom_titlescreen.mp3",
"mp3/cdoom.mp3",
"mp3/doom3.mp3",
"mp3/DSoP_00_WelcomeToHell(Intro).mp3",
"mp3/PSX_Doom_Music/PSX_stats_screen.mp3",
"mp3/PSX_Doom_Music/PSX_stats_screen.mp3",
}

local reg_playlist = {
"mp3/d64/d64_1.mp3"
"mp3/d64/d64_2.mp3"
"mp3/d64/d64_3.mp3"
"mp3/d64/d64_4.mp3"
"mp3/d64/d64_5.mp3"
"mp3/d64/d64_6.mp3"
"mp3/d64/d64_7.mp3"
"mp3/d64/d64_8.mp3"
"mp3/d64/d64_9.mp3"
"mp3/d64/d64_10.mp3"
"mp3/d64/d64_11.mp3"
"mp3/d64/d64_12.mp3"
"mp3/d64/d64_13.mp3"
"mp3/d64/d64_14.mp3"
"mp3/d64/d64_15.mp3"
"mp3/d64/d64_16.mp3"
"mp3/d64/d64_17.mp3"
"mp3/d64/d64_18.mp3"
"mp3/d64/d64_19.mp3"
"mp3/d64/d64_20.mp3"
"mp3/PSX_Doom_Music/doom_01hangar.mp3",
"mp3/PSX_Doom_Music/doom_02plant.mp3",
"mp3/PSX_Doom_Music/doom_03toxinrefinery.mp3",
"mp3/PSX_Doom_Music/doom_04commandcontrol.mp3",
"mp3/PSX_Doom_Music/doom_05phoboslab.mp3",
"mp3/PSX_Doom_Music/doom_06centralprocessing.mp3",
"mp3/PSX_Doom_Music/doom_07computerstation.mp3",
"mp3/PSX_Doom_Music/doom_08phobosanomaly.mp3",
"mp3/PSX_Doom_Music/doom_09deimosanomaly.mp3",
"mp3/PSX_Doom_Music/doom_10containmentarea.mp3",
"mp3/PSX_Doom_Music/doom_11refinery.mp3",
"mp3/PSX_Doom_Music/doom_12deimoslab.mp3",
"mp3/PSX_Doom_Music/doom_13commandcenter.mp3",
"mp3/PSX_Doom_Music/doom_16hellgate.mp3",
"mp3/PSX_Doom_Music/doom_17hellkeep.mp3",
"mp3/PSX_Doom_Music/doom_18pandemonium.mp3",
"mp3/PSX_Doom_Music/doom_22limbo.mp3",
"mp3/PSX_Doom_Music/doom_20unholycathedral.mp3",
"mp3/PSX_Doom_Music/doom_21mterebus.mp3",
"mp3/PSX_Doom_Music/doom_24hellbeneath.mp3",
"mp3/PSX_Doom_Music/fdoom_01attack.mp3",
"mp3/PSX_Doom_Music/fdoom_02virgil.mp3",
"mp3/PSX_Doom_Music/fdoom_03canyon.mp3",
"mp3/PSX_Doom_Music/fdoom_04combine.mp3",
"mp3/PSX_Doom_Music/fdoom_05catwalk.mp3",
"mp3/PSX_Doom_Music/fdoom_06fistula.mp3",
"mp3/PSX_Doom_Music/fdoom_07geryon.mp3",
"mp3/PSX_Doom_Music/fdoom_08minos.mp3",
"mp3/PSX_Doom_Music/fdoom_09nessus.mp3",
"mp3/PSX_Doom_Music/fdoom_10paradox.mp3",
}

local spec_playlist = {
"mp3/e1m1.mp3",
"mp3/e1m2.mp3",
"mp3/e1m3.mp3",
"mp3/e1m4.mp3",
"mp3/e1m5.mp3",
"mp3/e1m6.mp3",
"mp3/e1m7.mp3",
"mp3/e1m8.mp3",
"mp3/e1m9.mp3",
"mp3/Hangarmageddon.mp3",
"mp3/PA01Quake_Theme.mp3",
"mp3/Animal_Acoustic.mp3",
"mp3/Qmusic/03 PA02Intermission.mp3"
"mp3/Qmusic/04 PA03Whispers.mp3"
"mp3/qmusic/05 PA04Grizzly_Grotto.mp3"
"mp3/qmusic/06 PA05Slipgate_Complex.mp3"
"mp3/qmusic/07 PA06Underearth.mp3"
"mp3/qmusic/08 PA07damned.mp3"
"mp3/qmusic/09 PA08Necropolis.mp3"
"mp3/qmusic/10 PA09Ziggurat_Vertigo.mp3"
"mp3/qmusic/11 PA10Gloom_Keep.mp3"
}

local boss_playlist = {
"mp3/PSX_Doom_Music/doom_credits.mp3",
"mp3/PSX_Doom_Music/final_doom_end.mp3",
"mp3/PSX_Doom_Music/psx_main_menu.mp3",
"mp3/PSX_Doom_Music/PSX_stats_screen.mp3",
}

local titlemus = rand_music(title_playlist,1)
local regmus = rand_music(reg_playlist,23)
local bossmus = rand_music(boss_playlist,4)
local specmus = rand_music(spec_playlist,11)

Music = {
start     = titlemus[1],
interlude = "mp3/PSX_Doom_Music/fdoom_04combine.mp3",
bunny     = "mp3/d2end.mp3",
intro     = "mp3/DSoP_00_WelcomeToHell(Intro).mp3",
hellgate  = bossmus[1],

level2    = regmus[1],
level3    = regmus[2],
level4    = regmus[3],
level5    = regmus[4],
level6    = regmus[5],
level7    = regmus[6],
level8    = regmus[7],
level9    = regmus[8],
level10   = regmus[9],
level11   = regmus[10],
level12   = regmus[11],
level13   = regmus[12],
level14   = regmus[13],
level15   = regmus[14],
level16   = regmus[15],
level17   = regmus[16],
level18   = regmus[17],
level19   = regmus[18],
level20   = regmus[19],
level21   = regmus[20],
level22   = regmus[21],
level23   = regmus[22],
level24   = regmus[23],
level25   = regmus[24],

hells_arena       = specmus[1],
the_chained_court = specmus[2],
military_base     = specmus[3],
halls_of_carnage  = specmus[4],
hells_armory      = specmus[5],
spiders_lair      = specmus[6],
city_of_skulls    = specmus[7],
the_wall          = specmus[8],
unholy_cathedral  = specmus[9],
the_mortuary      = specmus[10],
the_vaults        = specmus[11],
the_lava_pits     = specmus[12],

phobos_lab        = specmus[13],
deimos_lab        = specmus[14],
containment_area  = specmus[15],
abyssal_plains    = specmus[16],
limbo             = specmus[17],
mt_erebus         = specmus[18],

tower_of_babel    = bossmus[2],
hell_fortress     = bossmus[3],
dis               = bossmus[4],
victory           = "mp3/Motorhead - Hellraiser.mp3",
}

Is there something I missed that is causing it to crash in the musichq.lua?
« Last Edit: April 28, 2014, 21:43 by Brewtal Legend »
Logged
-Legend

yaflhdztioxo

  • Programmer
  • Local Inquisitor
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 298
  • Lost Sole
    • View Profile

Wow.  Impressive config.  Can't really help debug it though.
I'm assuming everything works if you leave the default config files in place so best I can suggest is redo it based on the 0997 music config until one of the features makes it stop working.
Logged

Brewtal Legend

  • Second Lieutenant
  • *
  • Offline Offline
  • Posts: 162
  • I am Hellbound
    • View Profile

I can't take much credit for the config. Gamehunter helped me with it in this thread for making the music play randomly:

http://forum.chaosforge.org/index.php/topic,4787.15.html

And yes, it does work if I set the config to the default ones. I've tried editing things out and in, but no luck.  It worked perfectly in v996.

I cannot find a link to more information on the functions used in it either to try to get a better understanding either.
Logged
-Legend

Brewtal Legend

  • Second Lieutenant
  • *
  • Offline Offline
  • Posts: 162
  • I am Hellbound
    • View Profile
v997 crash when using random music script
« Reply #3 on: April 28, 2014, 12:03 »

Sorry for cross-posting, but I thought maybe I could get more help in the modding section. It didn't really seem like a bug so I figured it made the most sense here.

I only just now got around to trying v997. But it keeps crashing on startup.

I was using a script that game hunter showed me to make music play randomly for each level. This worked perfectly in v996 but not at all in v997 and crashes when I try to start the game.

Here is a link to the thread with the error log and the script I am using.

http://forum.chaosforge.org/index.php/topic,7086.0.html

Could anyone please take a look and tell me why the script now seems to be broken with v997?

Thank you very much for any help and sorry again for cross-posting.
Logged
-Legend

LuckyDee

  • Sound Wizard
  • Grand Inquisitor
  • General
  • *
  • *
  • Offline Offline
  • Posts: 1516
  • High Caliber Consecrator
    • View Profile
    • LuckyDeeIndustries

Fixed the cross-posting for you, simply merged your previous topic with this one. Modding seems to be the right board for this to be on, but I doubt anyone who comes across it here wouldn't also have been able to find it on the Discussion board. Next time, please just ask if you require maneuvers like this to be made.

That being said, and taking into account the fact that I am not burdened by excessive knowledge of how the code works: the error seems to be caused by the reference to the music lua(s) in the config. How exactly does the config refer to any/all music lua files?
Logged
[0.9.9.7G] Current: Hell Knight 1st Lieutenant [20/12/4/0/0/0]
High: Arch-Vile Lt. Colonel [25/21/12/2/1/0]

Brewtal Legend

  • Second Lieutenant
  • *
  • Offline Offline
  • Posts: 162
  • I am Hellbound
    • View Profile

Thanks.

Not sure what you mean by how it is refered to.  The config file calls to the mp3 lua file. And all the song tracks are called by their directories. All of which are inside the mp3 folder.  A couple times I tried renaming the mp3 lua file and calling it in the config file as named, but no luck.
Logged
-Legend

LuckyDee

  • Sound Wizard
  • Grand Inquisitor
  • General
  • *
  • *
  • Offline Offline
  • Posts: 1516
  • High Caliber Consecrator
    • View Profile
    • LuckyDeeIndustries

taking into account the fact that I am not burdened by excessive knowledge of how the code works

Don't say I didn't warn you :P

What I mean is this:

Code: [Select]
ELuaException : F:\Stuff\Roguelike\doomrl\config.lua:9: require "F:\Stuff\Roguelike\doomrl\musichq.lua" failed!
It looks to me like you could have written anything you wanted in the musichq.lua, since the exception is caused in the config at the moment it calls the music lua - not in the musichq itself. If that's not it, the only advice I can give you is to double-check all paths, filenames and {} (those last ones always kill me if I ever get involved with any form of programming).
Logged
[0.9.9.7G] Current: Hell Knight 1st Lieutenant [20/12/4/0/0/0]
High: Arch-Vile Lt. Colonel [25/21/12/2/1/0]

Brewtal Legend

  • Second Lieutenant
  • *
  • Offline Offline
  • Posts: 162
  • I am Hellbound
    • View Profile

Don't say I didn't warn you :P

What I mean is this:

Code: [Select]
ELuaException : F:\Stuff\Roguelike\doomrl\config.lua:9: require "F:\Stuff\Roguelike\doomrl\musichq.lua" failed!
It looks to me like you could have written anything you wanted in the musichq.lua, since the exception is caused in the config at the moment it calls the music lua - not in the musichq itself. If that's not it, the only advice I can give you is to double-check all paths, filenames and {} (those last ones always kill me if I ever get involved with any form of programming).

Ok.  Yeah, the error reads "whatever I name it".lua failed!  no matter what I name it and call it. I have already double checked the paths and they are all correct.

As for the {}'s, I'm not sure where to find the proper format to double check them.  Although, I copied it exactly as it was in v996 where it worked fine. The only difference is that v997 has a couple more tracks in the musichq.lua that were not present in v996. I just added some more mp3's to those parts.
Logged
-Legend

Brewtal Legend

  • Second Lieutenant
  • *
  • Offline Offline
  • Posts: 162
  • I am Hellbound
    • View Profile

Ok. As someone else on the Rogue Temple pointed out, I was missing commas after a few of the track names which was causing the original error I believe.

I added the missing commas but now I get a new error though.  :(

Code: [Select]
----------------------------------------------------------------------

----------------------------------------------------------------------
Timestamp   : 4/28/2014 17:55:03
Error level : FATAL EXCEPTION
Message     : Fatal exception encountered

An unhandled exception occurred at $004B1963 :
ELuaException : EntryFeed(Music) target not a table!
  $004B1963  TLUACONFIG__ENTRYFEED,  line 156 of e:/Projects/fpcvalkyrie/src/vluaconfig.pas
  $0042D18F  TDOOMIO__CONFIGURE,  line 327 of src/doomio.pas
  $0041E8BC  TDOOM__LOAD,  line 142 of src/doombase.pas
  $0041F059  TDOOM__RUN,  line 259 of src/doombase.pas
  $00401CC5  main,  line 111 of src/doomrl.pas

----------------------------------------------------------------------
Logged
-Legend

Brewtal Legend

  • Second Lieutenant
  • *
  • Offline Offline
  • Posts: 162
  • I am Hellbound
    • View Profile

Duh!  I feel like an idjit!

The reason it didn't work in the first place was because I forgot to put commas after the track names when I added tracks. *face-palm!  (-‸ლ)

The second error I got was because the .lua script I called to was a new one that I somehow managed to ommit the tables all together.  (-‸ლ)  (-‸ლ)

Anyways, thanks  LuckyDee and yaflhdztioxo for the replies and help.
Logged
-Legend
Pages: [1]