Birds fly. Sun shines. And brother? Brutes shoot people.

[UT] RMusicPlayer beta - music player for UT.

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: Semfry, ividyon

User avatar zYnthetic
Skaarj Warlord Skaarj Warlord
Posts: 510
Joined: 12 Nov 2007, 00:10

Subject:

Post Posted: 09 Jun 2008, 19:04

It is/has been finished in a sense that it has been working. New versions for bugfixes and new features.
Image

User avatar Raven
Skaarj Warlord Skaarj Warlord
Posts: 807
Joined: 12 Nov 2007, 09:39
Location: Nørresundby
Contact:

Subject:

Post Posted: 09 Jun 2008, 19:38

I think that it's bugfree version right now. In near future I'll add possibility to load whole music file into memory, which will allow to add DSP, or create UWindows based music player with playlists and stuff like that :P. I'll also try to create true crossfade (two tracks - one fading in, and second fading out). Delete few things from SDK and add few others. But right now everything seems to be working.
Madness, as you know, is like gravity…all it takes is a little push!
Image
http://turniej.unreal.pl/portfolio

User avatar Buff Skeleton
>:E >:E
Posts: 4173
Joined: 15 Dec 2007, 00:46

Subject:

Post Posted: 08 Dec 2008, 03:28

Hey Raven, I'm suddenly getting GPFs occasionally that I've never seen before:

Image

Any ideas on what might be causing this? This particular one happened when no mp3 music was even playing; just UMX.

[Edit] And I just got it again, third time. I've never gotten this error ever before today. Weird.

[Edit2] Come to think of it, I DID change my volume settings from 30 to 35 earlier today, but that shouldn't be causing crashes. It could be related, though. I overwrote my RMusicPlayer.ini and other files with the defaults included in the .zip; we'll see if it happens again (I also set my volume back to 35 from 100).

[Edit3] Nope, still crashing, and it's happening left and right now. Also, one of my beta testers got the exact same message, word for word.

User avatar Raven
Skaarj Warlord Skaarj Warlord
Posts: 807
Joined: 12 Nov 2007, 09:39
Location: Nørresundby
Contact:

Subject:

Post Posted: 08 Dec 2008, 14:24

More details (possibly log file ??). I never had this error, so I'd need more info. Or maybe make cube map with your player set up.

Just give me any info how to reproduce it.
Madness, as you know, is like gravity…all it takes is a little push!
Image
http://turniej.unreal.pl/portfolio

User avatar Buff Skeleton
>:E >:E
Posts: 4173
Joined: 15 Dec 2007, 00:46

Subject:

Post Posted: 08 Dec 2008, 17:20

Reproducing it has been difficult. It seems to happen almost at random, but it mostly happens when some of these conditions are met:

* You die (this causes mp3 music to trigger on your death
* You take damage from an enemy (no death, no music change)
* UMX music is playing, but not MP3 music
* You kill a pawn

It's REALLY erratic. I'll do more testing and try to narrow down some log errors when I get back home this afternoon. I'm also going to double check to ensure I have the latest version installed.

User avatar Raven
Skaarj Warlord Skaarj Warlord
Posts: 807
Joined: 12 Nov 2007, 09:39
Location: Nørresundby
Contact:

Subject:

Post Posted: 08 Dec 2008, 17:38

It's kinda... strange. There's NO CODE in the in both RMusic_Controller and RMusic_Player that checks players health (or death). There's absolutely no health/hit check. As for umx playing check if you have RMusic_MuteUMX set to true.

Check your game info. RMusic_Player after being spawned is just idle (just checks once awhile if player is still in same map). RMusic_Controller waits to be triggered and sends commands to RMusic_Player. I've check code many times, but I see no reason of such bugs.
Madness, as you know, is like gravity…all it takes is a little push!
Image
http://turniej.unreal.pl/portfolio

User avatar Buff Skeleton
>:E >:E
Posts: 4173
Joined: 15 Dec 2007, 00:46

Subject:

Post Posted: 08 Dec 2008, 17:45

Yeah, it could be a gameinfo problem. I'll do more comprehensive testing today and report back with what I find.

And I know music shouldn't bug up when you take damage or die, but EXU is set up to play music when the player dies, so that part at least made some sense. The other conditions are what weirded me out.

Also, I had UMX music playing (intentionally) in the map where the crashing started. The maps before both had mp3 music, and I never had any problems with them, so it may be something where switching between mp3 and UMX causes problems. Either way, I'll double-check all my stuff.

User avatar Buff Skeleton
>:E >:E
Posts: 4173
Joined: 15 Dec 2007, 00:46

Subject:

Post Posted: 08 Dec 2008, 22:18

OK, I think I was wrong about some of the triggers for the error. It seems to only happen when you die (sometimes) or (sometimes) you kill something. I got lots of accessed nones in UT.log referring to ScoreKill in my gametype when I tested it at work, but haven't gotten any here at home yet.

Also, I get an Invalid FMOD object error sort of thing when it crashes:

Code: Select all

Init: Initialized moving brush tracker for Level Save1000.MyLevel
DevAudio: Galaxy SetViewport: WindowsViewport0
DevMusic: Unregister music: Music RMusicPlayer.null
DevMusic: Load music: Music firebr.firebr
Init: RMusic_Player :: RMusic_IsPlaying :: FMOD error :: (36) An invalid object handle was used.
Critical: AActor::ProcessState
Critical: Object RMusic_Player Entry.RMusic_Player0, Old State State RMusicPlayer.RMusic_Player.RMusic_FadeOut, New State State RMusicPlayer.RMusic_Player.RMusic_FadeOut
Critical: AActor::Tick
Critical: TickAllActors
Critical: ULevel::Tick
Critical: (NetMode=0)
Critical: TickLevel
Critical: UGameEngine::Tick
Critical: UpdateWorld
Critical: MainLoop


As you can see, I loaded a save, killed myself to test the theory, and then it crashed. The save state cues up firebr.umx, and when you die, it triggers a RMusicController to play MP3 music for the death event. I think there's some issue where switching from UMX to mp3 is pissing off the game.

Here's my gameinfo, too:

Code: Select all

#exec OBJ LOAD FILE="..\System\RMusicPlayer.u"

var() name DeathEvent;

simulated function RMusic_Player Find_RMusicPlayerNoSpawn(PlayerPawn PP)
{
   local RMusic_Player RMP;

   if(Level.NetMode != NM_DedicatedServer)
        {

      if(PP.GetEntryLevel() == none)
      {
         PP.Log("No Entry level",'RMusicPlayer');
         return none;
      }

      foreach PP.GetEntryLevel().AllActors(class'RMusic_Player', RMP) break;
      return RMP;
   }
   else
   {
      return None;
   }
}

event PostLogin( playerpawn NewPlayer )
{
        local RMusic_Controller RMusic_Controller;
        local RMusic_Save RMusic_Save;
        local RMusic_Player RMusic_Player;
 
        Super.PostLogin(NewPlayer);
 
        if(Level.NetMode != NM_DedicatedServer)
        {
                //we have to found save part
                foreach AllActors(class'RMusic_Save', RMusic_Save)
                {
                        //we have to check if we have saved controller
                        if(RMusic_Save.SavedController != none)
                        {
                                RMusic_Controller=RMusic_Save.SavedController;
                                break;
                        }
                }
                //if saved controller is found, we have to restore music
                if(RMusic_Controller != none) RMusic_Controller.EVENT_Player();
      else
      {
         //we found RMusic_Save, so RMusic_Controller is used, but wasn't activated. We have to stop the music if playing
         RMusic_Player = Find_RMusicPlayerNoSpawn(NewPlayer);
         if( RMusic_Player != none)
         {
            if( RMusic_Player.RMusic_IsPlaying() ) RMusic_Player.RMusic_Stop();
         }
      }
        }
}


function Killed( pawn Killer, pawn Other, name damageType )
{
local actor A;
   if(DeathEvent!='' && DeathEvent!='none')
      if(other.isa('playerpawn') && other.bisplayer)
         foreach AllActors(class'Actor',A,DeathEvent )
            A.Trigger(Other,Other);
super.killed(Killer,Other,damageType);
}

User avatar Raven
Skaarj Warlord Skaarj Warlord
Posts: 807
Joined: 12 Nov 2007, 09:39
Location: Nørresundby
Contact:

Subject:

Post Posted: 09 Dec 2008, 01:02

I'll look at it in the morning. Tnx for the info.
Madness, as you know, is like gravity…all it takes is a little push!
Image
http://turniej.unreal.pl/portfolio

User avatar Buff Skeleton
>:E >:E
Posts: 4173
Joined: 15 Dec 2007, 00:46

Subject:

Post Posted: 09 Dec 2008, 05:30

Raven! I think I have located the source of the problem! (see [Edit2] for the solution)

I tried doing tests with a test map simulating conditions where the crash occurred, only with non-EXU gametypes. No crashes. Set it to EXU gametype. Still no crash. I then set up the death to mimic EXU exactly by copying the music sequence from Map 3; this caused crashes. Here's what happens:

1) You die, and the gametype triggers the YouDied event for your death.
2) This event trips a Dispatcher that, FIRST, trips an RMusicController set to Fade Out and Mute UMX Music and AC_Stop. THIS is where it crashes, and the fading must be conflicting with the Mute UMX option, especially since the controller is attempting to fade UMX music the way it fades MP3 music, which just might not be possible (you're the expert here, though; is that a good guess?).
3) After 1.5 seconds, a second RMusicController is triggered to play the death music, but the game has already crashed at this point if there was a problem so this never happens.

I disabled the fade and made it TRANS_Instantly for the music stopper. It still crashes when I die, even when no UMX music is playing now, but this time I got a new error:

Code: Select all

BLAST! Critical Error!
---------------------------
General protection fault!  History: AActor::ProcessState <- Object Dispatcher EXU2-BI03-Shitstorm.Dispatcher5, Old State State Engine.Dispatcher.Dispatch, New State State Engine.Dispatcher.Dispatch <- AActor::Tick <- TickAllActors <- ULevel::Tick <- (NetMode=0) <- TickLevel <- UGameEngine::Tick <- UpdateWorld <- MainLoop


[Edit] I did some more playing around and I found out that if you have it set to AC_Stop AND BMuteUMX, you get the crash, but if you set it to AC_Play and bMuteUMX, it doesn't crash! So far, I think I've solved this mystery, and it wasn't anything to do with your code--just my shitty mapping. I'll let you know more as I keep testing things. You may want to double check that this crash is in fact just a mapper's problem and not a code problem, though.

[Edit2] Yeah, AC_Stop + bMuteUMX=True is what seems to have caused the crashing. Fades have nothing to do with it. I think I've solved the crashing!

However, I have another potential issue that shouldn't be a problem right now, but could be: if a map starts out with UMX music and later triggers mp3 music, if you die after the mp3 music kicks in, since there is no AC_Stop controller tripped on your death... does that just mean the music will keep playing, even when the death music kicks in? I'll have to try this out and see what happens.

I can get around this if necessary by ONLY using .mp3 music for those kinds of maps (i.e. export umx music and convert it to an .mp3 that loops properly), but I'd rather find a solution in case I ever come across that problem.

User avatar Raven
Skaarj Warlord Skaarj Warlord
Posts: 807
Joined: 12 Nov 2007, 09:39
Location: Nørresundby
Contact:

Subject:

Post Posted: 18 Feb 2009, 14:54

I've uploaded new beta version: http://turniej.unreal.pl/files/RMusicPlayer_newbeta.zip. It makes use of paths defined in [Core.System] in ini. So if file does not exists in path defined in RMusic_Directory in RMusicPlayer,ini music player will scan all paths which contain umx. It's a beta so please let me know if this thing works.
Madness, as you know, is like gravity…all it takes is a little push!
Image
http://turniej.unreal.pl/portfolio

User avatar Jethro
Skaarj Warlord Skaarj Warlord
Posts: 686
Joined: 12 Nov 2007, 00:15
Location: Aboard Von Braun

Subject:

Post Posted: 18 Feb 2009, 22:35

I'm clueles...

Code: Select all

Init: RMusic_Player :: RMusic_Play :: file not found in path '../Music/'. Scanning GSys paths for music.
Init: RMusic_Player :: RMusic_Play :: FMOD error :: (23) File not found.

That's all I can get. The music IS in *.umx path.
UBerserker wrote:Story: totally guessed that Skeletor was the thief.

User avatar Raven
Skaarj Warlord Skaarj Warlord
Posts: 807
Joined: 12 Nov 2007, 09:39
Location: Nørresundby
Contact:

Subject:

Post Posted: 19 Feb 2009, 01:38

Tnx. I'll investigate it tomorrow.
Madness, as you know, is like gravity…all it takes is a little push!
Image
http://turniej.unreal.pl/portfolio

User avatar Raven
Skaarj Warlord Skaarj Warlord
Posts: 807
Joined: 12 Nov 2007, 09:39
Location: Nørresundby
Contact:

Subject:

Post Posted: 19 Feb 2009, 15:13

OK, updated - should work like a charm :). http://turniej.unreal.pl/files/RMusicPlayer_newbeta.zip
Madness, as you know, is like gravity…all it takes is a little push!
Image
http://turniej.unreal.pl/portfolio

User avatar Jethro
Skaarj Warlord Skaarj Warlord
Posts: 686
Joined: 12 Nov 2007, 00:15
Location: Aboard Von Braun

Subject:

Post Posted: 19 Feb 2009, 18:18

No more error messages, but still no music. I assume it works and the map is simply silent.

Thanks! :tup:
UBerserker wrote:Story: totally guessed that Skeletor was the thief.

Previous Next

Who is online

Users browsing this forum: No registered users and 33 guests

Copyright © 2001-2024 UnrealSP.org

Powered by phpBB® Forum Software © phpBB Limited