Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Offline elasto  
#1 Posted : Monday, January 30, 2012 6:20:57 AM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
In project FindIt there's a Moo.wav file which is downloaded ok into the local Content folder (and plays ok there via VLC)

On calling Moo.Play() the following error results (and the sound does not play):

Code:
Program: FindIt v1.0.0.0
Modules: Graphic=OpenTK, Input=Windows, Audio=OpenTK, Video=, Physics=
Start Time: 2012-01-30 12:13:59
Platform: Windows, 4 CPU Cores, 32 bit, Windows 7 v7601 Service Pack 1, Resolution: 1024, 768, VS: 2, PS: 2
User: Phil (PHIL-LAPTOP)

32.065 Warning: CreateInstance failed for 'Delta.Multimedia.OpenTK.OpenTKChannel': Exception has been thrown by the target of an invocation.
Inner Exception: Object reference not set to an instance of an object.
This means the dynamic creation of 'Delta.Multimedia.OpenTK.OpenTKChannel' worked, but the class failed internally and the instance could not be created. There should be a previous error, if not, try to debug the constructor of the class!)
System.NullReferenceException: Object reference not set to an instance of an object.
	at Delta.Multimedia.BaseOpenAL.BaseOpenALChannel.FfiB0Xs6YqGVda5EDq(Object )
	at Delta.Multimedia.BaseOpenAL.BaseOpenALChannel..ctor(NativeSound parentSound)
	C:\Coding\DE\deltaengine-a8bcd5cec16d\DeltaEngine_a8bcd5cec16d\Multimedia\OpenTK\OpenTKChannel.cs(18,1): at Delta.Multimedia.OpenTK.OpenTKChannel..ctor(NativeSound parentSound)
If you need, let me know where to put a debug so I can try to obtain more info.

---

Sorry for the multiple edits! More info is: Sounds play ok in the sample projects, so maybe I'm missing a reference or something.

---

Oh. And on a presumably unrelated note, the length of the sound shows as 0.65s in the ContentManager v0.9.2.15 preview but plays ok there (it's actually nearer to 4s long)

Edited by user Monday, January 30, 2012 6:39:40 AM(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline Benjamin  
#2 Posted : Monday, January 30, 2012 6:39:20 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Looks like an internal error because something was renamed and could not be found anymore (or BaseOpenALChannel crashed internally, but it has been a long time since we changed anything there).

Thanks for the bug report, will be fixed asap.
Offline elasto  
#3 Posted : Monday, January 30, 2012 6:48:14 AM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
No, I don't think it's anything like that because the latest Pong plays sounds ok. I'll try to work out what the difference is between my project and Pong.
Offline elasto  
#4 Posted : Monday, January 30, 2012 6:56:12 AM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
Ok well I can't see any obvious differences. It's referencing the same Delta.Multimedia.dll and I instantiate my Sound object in the Game constructor just the same.

Edit: If I replace "Moo" with "DefaultSound" I still get the error (and nothing seems to play)

Edited by user Monday, January 30, 2012 6:59:23 AM(UTC)  | Reason: Not specified

Offline elasto  
#5 Posted : Monday, January 30, 2012 9:01:25 AM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
Don't know if it's related but I assume it is. Here's a new error in case it sheds more light on the matter:

Code:
Program: FindIt v1.0.0.0
Modules: Graphic=OpenTK, Input=Windows, Audio=OpenTK, Video=, Physics=
Start Time: 2012-01-30 14:57:13
Platform: Windows, 4 CPU Cores, 32 bit, Windows 7 v7601 Service Pack 1, Resolution: 1024, 768, VS: 2, PS: 2
User: Phil (PHIL-LAPTOP)

07.125 Warning: OpenAL error 'IllegalCommand': Invalid Operation
	at Delta.Utilities.Log.Warning(System.String message)
	at Delta.Multimedia.BaseOpenAL.OpenALBinding.vnMppZUGMwUSytPgWF(System.Object )
	at Delta.Multimedia.BaseOpenAL.OpenALBinding.CheckError()
	at Delta.Multimedia.BaseOpenAL.OpenALBinding.DeleteBuffer(System.Int32 bufferId)
	at Delta.Multimedia.BaseOpenAL.OpenALSoundData.F3DRiJBTHWL4J7cyZr(System.Int32 bufferId)
	at Delta.Multimedia.BaseOpenAL.OpenALSoundData.Dispose()
	at Delta.Multimedia.BaseOpenAL.BaseOpenALSound.lOaeHjvLFUfZt8YnK8(System.Object )
	at Delta.Multimedia.BaseOpenAL.BaseOpenALSound.Dispose()
	at Delta.ContentSystem.Content.F4s9Sr7HJj5sIwWcx9s(System.Object )
	at Delta.ContentSystem.Content.Dispose()
	at Delta.ContentSystem.EmptySceneData.mdR67SqkYTZCPJJ6vJt(System.Object )
	at Delta.ContentSystem.EmptySceneData.Dispose()
	at Delta.ContentSystem.ContentManager.QxFWDFq7kiXsLrQvIhO(System.Object )
	at Delta.ContentSystem.ContentManager.UpdateMetaDataFromXml(System.Boolean saveMetaDataFile, System.String relativeContentFilenameToForceUpdating)
	at Delta.ContentSystem.ContentClient.GM9uvi0Av6Yg69ql7e(System.Object , System.Boolean saveMetaDataFile, System.Object )
	at Delta.ContentSystem.ContentClient.OnMessageReceived(System.Byte messageType, System.IO.BinaryReader data)
	C:\Coding\DE\deltaengine-a8bcd5cec16d\DeltaEngine_a8bcd5cec16d\Utilities\Networking\BaseClient.cs(969,5): at Delta.Utilities.Networking.BaseClient.OnRawMessageReceived(System.Byte messageType, System.IO.BinaryReader data, System.Boolean isCompressed)
	C:\Coding\DE\deltaengine-a8bcd5cec16d\DeltaEngine_a8bcd5cec16d\Utilities\Networking\SocketHelper.cs(638,6): at Delta.Utilities.Networking.SocketHelper.ReceiveMessageData(Delta.Utilities.Networking.BaseClient data, System.Int32 numOfReceivedBytes)
	C:\Coding\DE\deltaengine-a8bcd5cec16d\DeltaEngine_a8bcd5cec16d\Utilities\Networking\SocketHelper.cs(93,7): at Delta.Utilities.Networking.SocketHelper.OnReceivedDataAsyncCallback(System.IAsyncResult ar)
	at System.Net.LazyAsyncResult.Complete(System.IntPtr userToken)
	at System.Net.ContextAwareResult.CompleteCallback(System.Object state)
	at System.Net.ContextAwareResult.Complete(System.IntPtr userToken)
	at System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object result, System.IntPtr userToken)
	at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(System.UInt32 errorCode, System.UInt32 numBytes, System.Threading.NativeOverlapped* nativeOverlapped)

Offline Benjamin  
#6 Posted : Tuesday, January 31, 2012 12:22:48 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Hey PG, I am unable to reproduce your error. Can you check if the OpenTK.dll is different in the Delta.Multimedia.Tests directory and your project directory? To me it sounds like some dll is not referenced correctly like for internetfreak: http://forum.deltaengine...m-derzeitigen-Theme.aspx
Offline elasto  
#7 Posted : Tuesday, January 31, 2012 8:07:03 PM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
Ok, I got to the bottom of it.

My settings file had been carried forward and was still pointing to v0.9.2.2

On running FindIt it was pulling in Delta.Multimedia.OpenTK.dll (v0.9.2.2) to use and that was failing when used in combination with Delta.Multimedia.dll (v0.9.2.16) referenced in the project.

---

The first thing I stumbled across to fix it was to reference Delta.Multimedia.OpenTK.dll directly in the project - but I realised there must be something going on I didn't understand because Delta.Multimedia.Tests doesn't reference that and it works fine. Then I deleted everything in the Debug folder, removed the reference to Delta.Multimedia.OpenTK.dll and was surprised to discover the sound still played! Eventually I deduced what must be going on.

So... Sorry! Guess I need to make sure I always delete the contents of the Debug folder with each new release!

Maybe when a project is being run in Debug mode it could log a warning if ever all the dll's aren't the same version number? I guess there might be some reason why someone might want to do that deliberately - so by making it a warning not an error and making it only in Debug mode not Release mode it could allow for that.
Offline Benjamin  
#8 Posted : Tuesday, January 31, 2012 8:27:53 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Nice that you could figure it out on your own Cool

internetfreak has run into the same trouble (he was referencing old dll versions in his csproj file). The new samples and visual studio templates have been fixed to just reference the file location, not a specific version anymore (this way all updates work always).

In any case try to make sure to do a full rebuild for each update (nightly or monthly) to make sure there are no left over dlls. If that does not work, the directory might need a full cleanup, but usually a normal Visual Studio Rebuild will get rid of all outdated dlls and the Delta Engine Factory class will automatically update all the dynamically copied assemblies as long as it is allowed in the Settings.xml.
Offline elasto  
#9 Posted : Tuesday, January 31, 2012 8:39:52 PM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
Originally Posted by: Benjamin Nitschke (DeltaEngine) Go to Quoted Post
In any case try to make sure to do a full rebuild for each update (nightly or monthly) to make sure there are no left over dlls. If that does not work, the directory might need a full cleanup, but usually a normal Visual Studio Rebuild will get rid of all outdated dlls and the Delta Engine Factory class will automatically update all the dynamically copied assemblies as long as it is allowed in the Settings.xml.

Yeah. Well. Now I know about this little landmine it'll be the first thing I check for if I run into trouble. My suggestion about logging a warning is for all the other people who are going to run into this after me! :/

At the very least, if the log file includes a warning it might clue you in to suggesting someone check dll versions first rather than wasting valuable time on a non-problem like you did with me! ;(
Offline Benjamin  
#10 Posted : Wednesday, February 1, 2012 5:54:28 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Added a warning when the dependency finder finds different engine assembly versions while building the dependency tree, which should not slow down the startup time by more than 1-2%. I did not find a better place yet to check assembly versions and since all assemblies are kept up to date in the solution version of DeltaEngine automatically, it is hard to check when this happens. If this problem happens again to someone I will build a special test sample application that is setup wrongly to further investigate this issue.
Offline elasto  
#11 Posted : Wednesday, February 1, 2012 7:24:50 AM(UTC)
elasto

Joined: 8/23/2011(UTC)
Posts: 245

Thanks: 6 times
Was thanked: 12 time(s) in 11 post(s)
Cool. My suggestion is for saving your time much more so than mine!

Start-up slow-down shouldn't matter if you only do the test in Debug mode (assuming you can check for that).
Offline Benjamin  
#12 Posted : Wednesday, February 1, 2012 7:40:33 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Yes in the past we did only do these checks in debug mode, but when testing locally in Release mode some issues happened, especially since the Release folder is usually outdated, so the AllowDevelopmentAssemblyUpdating is always on when developing and always off when building a version with the Launcher for release (because all the correct assemblies are baked into the build result with the Launcher anyway).

Because of another issue with OpenTK reported yesterday I just tested different engine assembly versions and found some other issues like trying to overwrite the already loaded Delta.Engine.dll, but I was unable to reproduce the OpenTK issue one team is having. They probably have to fix the issue themselves and I will then merge the solution into the public repository ..
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.105 seconds.