Visual Studio 2003-2005 Migration Issues

GregH

20-03-2006 10:15:04

Hi Folks,

Well am I surprised...NOT !!!

My new laptop arrived last week (Toshiba Tecra A7) and I've been watching install progress bars ad-infinitum.

Finally copied over my OGRE test project folder (complete with every DLL, CFG, Media folders..all except DirectX.DirectSound, that I copied manually and referenced successfully).

I then launched that temperamental piece of shit called VS 2005 (you know, the one that refuses to open forms in the Designer view for no good reason other than the code-behind page got out of sync with reality..or was it a stray cosmic ray ?).

I held my breath and hit run. The errors that ensued are as follows:




DLL 'E:\VSNProjects\OgreDotNet_Stage04\OgreDotNet_Stage04\bin\Microsoft.DirectX.DirectSound.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.



VS 2003 was more than happy to run DirectSound...but VS 2005 (a Microsoft product) doesn't appear to like the idea of running DirectSound (another Microsoft product). BTW, WTF is a Loader Lock ? Is it something the Dutch use to prevent the tulips from flooding in spring time ?

...Ok...I can create a game without sound. I'll call it "Screaming In a Vacuum". That'll work well with the Alien (as in Nostromo) reference I'm going to use shortly.

The next error is displayed in the Immediate Window:



A first chance exception of type 'System.TypeInitializationException' occurred in OgreDotNet.dll



..now this is the very same OgreDotNet.dll that worked perfectly well in VS 2003...which makes me think it's:

1. An IDE setting issue (eg: Security of some kind, in keeping with MS paranoia).

2. A DLL Version issue (I'm using OgreDotNet Runtime v1.1.4322)

3. A randomly generated "we are going to shit you off for know good reason" issue.


Personally, I wouldn't mind going back to VS 2003 because it doesn't snot my work for no good reason...unfortunately we just deployed 2005 (aka Alien) onto our 100 or so workstations.

Soooo...my question is: has anyone out there made the transition from VS 2003 to VS 2005 and successfully executed their migrated OGRE project(s) ? If so, what voodoo bones does one throw to make this happen ? Please note, I have total faith in ODN...I know exactly where to lay the blame.

Cheers,

GregH.

the_cX

20-03-2006 16:55:04

you need to calm down buddy. VS 2005 is great, really great, especially if your using c#. im sure youll find that out very soon after using it for a week or so. a lot of people thought the same thing about .net when upgrading from 6.0, including me, but its just ignorance. :p

did you recompile the OgreBindings, OgreDotNet, and Math3D dlls using VS 2005?

EagleEye

20-03-2006 17:08:47

I'd ensure that you have the latest DirectX SDK update.

GregH

20-03-2006 21:10:01

Hi EagleEye,

Calm...yes...I'm thinking of fields of Dutch tulips.

I wish I had the same level of confidence in VS 2005 as you - I've been teaching 32 people concurrently for the past 6 weeks and I've lost count of the number of random failures - mostly to do with the form designer not being able to display forms. It has also failed on my personal machine for no good reason - to the point where I had to completely reconstruct a form to get it to show. This was rarely the case with 2003.

This aside, I will follow your advice and recompile every component, and include the absolute latest DirectX 9 stuff.

I'll let y'all know how it goes...

Cheers,

GregH.

GregH

20-03-2006 22:34:48

Hi the_cx,

Thanks for your advice too. Blood pressure is something I'm sure we all get from time to time, and it's nice to know I'm not alone. Mind you, if 2003 compiled DLL's won't work in 2005, there's going to be a lot of 3rd party components in need of upgrading...eeekkk.

Thanks again,

GregH.

the_cX

21-03-2006 04:21:35

np. :)

im guessing you got it working, kinda?

GregH

21-03-2006 09:10:08

Hi the_Cx,


In one word: "No because I've been sucking down every relevant SDK update known to man and ogre". :lol: At least I can laugh about it now - fields of tulips calm the savage beast.

Now, back to my original pre-Alien question: Has anyone out there successfully migrated from VS 2003 (and to be specific VB.Net) to VS 2005 ... and if so, what did you/they/them do to make the transition :idea: ?

In the meantime, I'm installing DX SDK Feb 06, recompiling OGRE 1.06 using VS 2005, and praying to the Tulip God I invented earlier in this thread. :lol:

Here's hoping that after all is said and done, "I'm not the Loader Locker, I'm the Loader Locker's son...and I'll help the Loader Locker until OGRE starts to run" :wink:

Cheers,

GregH.

GregH

22-03-2006 08:43:59

Bump...

So no-one has successfully migrated from Visual Studio 2003 to 2005 yet ??? I am the first to attempt this ?

Please let me know...

Cheers,

GregH.

alberts

22-03-2006 10:34:29

I'm developing my project under VS2003 but I had no problems copying the entire project files to another pc that have VS2005 Express installed. It worked fine without doing nothing special. :?

I'll check it later, because I only have done it once or twice.

GregH

22-03-2006 10:40:43

Hi AlbertS,

It's good to hear from you !!

When you say you did nothing special, does that mean you didn't do the whole SWIG recompile thing under VS 2005...you just copied the entire project folder from one place to another and it ran without problems?

I'm using the full VS 2005 install here..and it won't even run DirectX.DirectSound without "Loader Lock" errors...which is why I went into meltdown earlier in this thread. Fair made me see tulips it did...even changed my Avatar !!!

Please tell me more...

Cheers,

GregH.

the_cX

22-03-2006 18:46:20

GregH:

are you talking about migrating OgreDotNet project stuff or just migrating projects in general?

you keep mentioning DirectX - that has nothing to do with OgreDotNet, so im not sure in what sense are you talking about when you say migrating.

i have migrated an Ogre, but non OgreDotNet project from 7.1 to 8.0 with minimal problems. it was easy.

i guess the burning question is. instead of posting over and over about if anyone has done it (= spamming the thread)....why dont you just.........try it?! its not a big life commitment that involves something like signing your first born away...its a 2 step WIZARD!

i have succesfully migrated my OgreDotNet project from 7.1 to 8.0, here were the extremely complicated steps i had to take.

open the 7.1 sln, hit Next, Next, Finish. Recompile the entire OgreDotNet project to get the 3 dlls (which you seem very reluctant to do for some reason), and copy them over and see if it runs. THATS IT!

there were a couple of function calls that i was using in the System.Reflection and System.GC namespaces in 1.1 that have been deprecated in 2.0, and i refactored the code accordingly, and it worked perfectly.

why dont you try that, then youll have a platform to ask specific questions if it didnt work.

and no one cares about the directx sound that your using. comment out all of your directx stuff for now and remove the references to see if your OgreDotNet stuff is working, what so hard about that?

sorry for the sarcasm, but if someone had an ambiguous answer to your ambiguous question, i think they would have answered by now.

EagleEye

23-03-2006 07:29:25

you keep mentioning DirectX - that has nothing to do with OgreDotNet, so im not sure in what sense are you talking about when you say migrating.

Not true. To develop with Ogre, you MUST have the latest version of the DirectX SDK update. I'm not sure which one is the most current, but you can find it on microsoft's site. If this is a new install on a brand new system, my guess is that you need to apply this update.

i have migrated an Ogre, but non OgreDotNet project from 7.1 to 8.0 with minimal problems. it was easy.

This was likely on the same development machine you've been using? If you reference Greg's original post, you'll see he's doing this on a brand new laptop... thus the need to make sure he installs all of the proper SDK updates.

i guess the burning question is. instead of posting over and over about if anyone has done it (= spamming the thread)....why dont you just.........try it?! its not a big life commitment that involves something like signing your first born away...its a 2 step WIZARD!

This part of your reply, sir, is quite snippy and rather arrogant.

Please do not try to moderate this forum... He's seeking help, and if he seems to be asking the same question over and over again, that's not really your business. Rastaman and I moderate and help as much as possible. Of course, we welcome help from others, but for you to point out that he's spamming the forum is out of line.

As a point of fact, he is merely seeking clarification and restating his question so as to hopefully be more clear as to his issues. Your snippy reply here only serves to discourage people from asking for help in the future.

As the saying goes, if you can't say something nice, don't say anything at all. Likewise for this forum. If you can't help someone in a productive manner that isn't condescending, then don't reply.

and no one cares about the directx sound that your using.

*I* care. In any forum where people ask for help, people are encouraged to give as much information as possible as to what could POSSIBLY be causing a problem... even if it's not related to the problem, there is rarely an issue of having TOO much information.

Trust me, I was a level 3 tech for earthlink, and most of the time the only reason I fixed problems that levels 1 and 2 couldn't fix is because I asked the right questions to get that little bit of information that SEEMED irrelevant, but wasn't. Don't discourage that free flow of information please.

comment out all of your directx stuff for now and remove the references to see if your OgreDotNet stuff is working, what so hard about that?

You're speaking from ignorance here sir. To make it worse, you're being rude about it. Understand that it makes you look like an ass, and hurts feelings... it's really not productive.

sorry for the sarcasm, but if someone had an ambiguous answer to your ambiguous question, i think they would have answered by now.

No, if you were sorry for the sarcasm, you wouldn't have utilized it. Be nicer in the future please.

EagleEye

23-03-2006 07:42:54

Okay, now Greg... I finally actually READ the entire original post, and I think I can explain why things are happening the way they are...

You're getting the directX error because you manually copied the DirectX file over. You will probably want to install the DirectX SDK on to the machine, which will contain that sound .dll, and put it in the right place... as well as registering that DLL with the system.

The next error about the Ogre TypeInit error you're getting... Ogre uses DirectX in internal calls. If you check your Ogre.log file (or whatever log file you have configured for your app's main Ogre Root object), you should see more details about this error... but it's likely an internal exception being thrown because of the directX dll error.

To be fair, your stated question was the wrong one. The question isn't "has anyone successfully transitioned from VS2003 to VS2005?" The real question is "what could be causing this specific error?"

Understanding that DirectX's SDK updates are always a good thing to get (always get the most recent one, because they're all backwards compatible) is something I think we should all take away from this.

Lesson learned. :)

Now if you HAVE installed the latest DirectX SDK update... then I don't know what to tell you quite yet. I'll have to think on it.

But hey, we'll get through this together. :)

GregH

23-03-2006 09:01:22

Hi EagleEye,

Firstly, thankyou for your helpful response. As you have correctly noted, my migration involves both software and hardware, and it has been a formidable task. The guidance you have provided has been both valuable and reassuring. Please accept my apologies if I did not express the nature of the query in full.

Secondly, I (and most likely others) appreciate your moderation on this particular thread. I for one want to see the OgreDotNet Forum continue as a thriving, open and empathetic community - one in which folk aren't flamed for asking reasonable questions about highly relevant issues...for example those concerning the very platform upon which OGRE/DotNet relies.

Cheers,

GregH. Beep-Bop...that'll be the latest SDK now !!! CYA !!!

Robert Isele

23-03-2006 12:15:22

So no-one has successfully migrated from Visual Studio 2003 to 2005 yet ??? I am the first to attempt this ?
I did. Without any problems

According to your signature, you re still getting Loader Lock errors?
This is a known problem when using .Net1.1 librarys in a .Net2.0 project. Did you try to deactivate the "LoaderLock" exception? If not, in the debug menu of VS2005 go to "Exceptions" and uncheck "Loader Lock" from the "Managed Debugging Assistants" group. Visual Studio won't throw a LoaderLock exception again.

In case this doesn't help, try to use the .Net2.0 librarys of Direct.Sound instead of the .Net1.1 ones. (I never tried this, but beta versions of MDX2.0 should be included in the February update of the DirectX SDK)

GregH

23-03-2006 13:34:13

Hi Robert,

I'm not in a situation to try what you have suggested right now (I'm travelling for a couple of days) but gut feeling tells me you're advice is good: the basic nature of VS 2005 is to raise a truckload of warnings unless you tell it otherwise.

Thankyou, and I will let you know how things pan out.

Cheers,

GregH.

PS: Isn't it ironic that a known error can be known by some and not by others...

Robert Isele

23-03-2006 14:19:42

PS: Isn't it ironic that a known error can be known by some and not by others...

another irony is that microsoft actually calls it a "feature". It's the new Managed Debugging Assistant introduced with VS2005 http://msdn2.microsoft.com/en-us/library/d21c150d.aspx. They explain already on the first page how to disable it. :lol: (it seems you're not the first one who complains about it) And there's some information on the page about the mysterious LoaderLock exception.

But be carefull, there actually might be an error in your application. It might be your enumeration of directSound. Though it's unlikely if it worked before in .NET1.1. You could compare it closely with the newest samplecode from the SDK.

the_cX

23-03-2006 21:06:22

eagleeye:

i didnt mean to impose on your power complex. i did not mean to play the moderator of this forum, and i understand that you, oh eagleeye, are the moderator of this forum, you and all of your 1337 VB.NET skills.

meanwhile, anyone paying attention knows that you dont really know much about the actual development of OgreDotNet itself, its really rastaman that is doing *all* of the work right now. really, you dont do anything for the development of OgreDotNet more than any other user. you write some useless tutorial in vb.net, every now and then you chime into the forum thinking you know the answer to something but really you dont. your some guy that by mere coincidence got your 'moderator' position. all of us that are real developers know this eagleeye. we just watch you handle yourself in your own little world because we think its cute.

furthermore, no one was talking to you. and i dont know what kind of moderator you think you are calling someone an 'ass.' did i go as far as name calling? is that very moderator like? did GregH go and complain to you? or was this another chance for someone who was nothing more than a nerd in his life, to be a big tuff guy and volunteer himself to save the day, with all his...moderator priviledges.

the DirectX stuff i was making reference to was the DirectX stuff he was making reference to:

Quote:


DLL 'E:\VSNProjects\OgreDotNet_Stage04\OgreDotNet_Stage04\bin\Microsoft.DirectX.DirectSound.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.



VS 2003 was more than happy to run DirectSound...but VS 2005 (a Microsoft product) doesn't appear to like the idea of running DirectSound (another Microsoft product). BTW, WTF is a Loader Lock ? Is it something the Dutch use to prevent the tulips from flooding in spring time ?


ogre does need a fairly up to date directx installation, it does not, however, need anything that has to do with DirectSound. thats what i was talking about - comment out all that stuff and remove references, and see what happens. anyone that isnt a n00b would have understood that thats what i meant. i was not talking about not having the directx installed, i assumed that to be common knowledge and not needed to be stated.

but thats not the problem, i had responded to his thread. and you had responded to his thread. and he said thanks. and what does he then do? BUMP the thread! why do you have to bump it asking the same question over again? why not try the recommendations that were givin to you first?

anyways, the point is, is that you eagleeye, are just another dungeons and dragons nerd who references their experience as an earthlink tech as a means of justifying their expert opinion. lol. seriously, your even 'developing' an MMORPG, ...AND using VB.NET for it. can you seriously fit the persona anymore? nice forums on your development page btw, rofl.

im not saying anything more to you after this post, and i hope you do that same for me. you can go ahead and delete this post and even beg someone to get my account banned, i know how well that would feed your deprived ego. as long as you read it once, that im happy.

and lastly, dont forget, MIS is always a viable option. kthx.

EagleEye

24-03-2006 05:32:27

The_cX: I don't really have to justify my status here, but let me explain to you why I'm here.

Maleficus and I were the only ones that worked actively on this project. We were the ones that requested this special AddOns forum be created, and we were the ones that worked TOGETHER behind the scenes to iron out a lot of problems and get this thing off the ground.

Maleficus dropped off the face of the internet, and I truly fear that he suffered a horrible fate. He has not been online for a long time, and considering his dedication to this project, the only reason I can think that he is no longer here is because he is dead. That may not have much of an impact on you, but we worked closely together and it pains me to come to that conclusion.

Maleficus and I were the only moderators at that time, and while he did a lot of the C# work, I did a lot of testing and organization and planning. He was the primary developer, and I was his main go-to guy as well as the logistical coordinator.

Rastaman stepped up about a month after we last heard from Maleficus, when it became evident he wasn't coming back. I requested that sinbad make him a moderator and give him access to the CVS. Rastaman has pretty much replaced Maleficus in the development of OgreDotNet, and I remain in that "logistics" role.

What you DON'T know is that I talk with Rastaman on IM quite often. We discuss the direction ODN is going, and plans for how to proceed. I do testing for him, since I do VB.NET stuff, and am running on Windows (He's doing C# on Linux).

I think I can honestly say that if it weren't for me, this project would have died. Granted I haven't done much lately... but that's mainly because there hasn't been much to do. Rastaman has things well under control. There ARE, still, things that go on behind the scenes that I handle (primarly moderating the forum here, any and all contact with Sinbad, CVS stuff, testing, and planning.) I may not be developing ODN myself, but that's only because Rastaman doesn't really need help in development. He has the process down now, and any attempt to help would just get in the way.

I mean seriously, do you have any idea how much rastaman and I worked to get typemapping done right in SWIG, so it would work across all platforms properly?

I may not stand up and take credit for stuff much... and rastaman may be "the man" in the forefront right now... but dont' dare belittle me or my contribution.

As far as me being a "dungeons and dragons nerd" and all of your other insults... bah... I'm not going to even dignify that with a response.

As far as I'm concerned, you're not welcome here cX. I won't make it official, but I can tell you, if you continue to act in this immature manner, I will see to it that you're banned from these forums. We don't need this kind of thing here.

EagleEye

24-03-2006 06:09:59

Oh yeah, almost forgot.

The reason I "flexed my power-tripping moderator muscles" was because GregH came to me in private to ask me to intervene.

This wasn't me just arbitrarily stepping in. I was asked to, so I did. This has nothing to do with "power trips" or anything of the sort. I have found, however, that whenever a troublesome user gets moderated, the first thing they do is claim "power tripping moderator" so as to shift the blame away from themselves and on to the moderator.

Nice try, but it's not going to work. You were in the wrong, and you need to appologise to GregH for it. And now, thanks to your acidic reply, you owe me one as well.

Oh, and I never called you an ass. I said your behavior makes you LOOK like an ass. Perception does not necessarily equal reality. But then you went and replied in an immature manner, and gave everyone more evidence that the perception is, in fact, reality.

It's now up to you to change that perception... the ball is in your court man.

GregH

24-03-2006 10:55:26

Hi Folks,

Well, the dust is settling...my new laptop has been beaten into shape, SDK'ed to death, and even the finger print reader shudders when I approach it. :o

I'm up to the part in EagleEye's/AlbertS's collborative doc on compiling:

Ceguibindings.i
OgreBindings.i
OgreBindings_Cegui.i

At first, I had issues with the SWIG_HOME environment variable, which should not be surrounded in quotation marks (doc has quotes), and should not have a trailing slash as the doc correctly states.

Now using the *absolute* latest OgreDotNet CVS download (24/03/06)

Ceguibindings.i compiled perfectly.

OgreBindings.i throws a compile error as follows:



1>OgreAnimationState.i(119): Error: 'AnimationStateSet' is multiply defined in the generated module.



OgreBindings_Cegui.i compiled perfectly.

I do not profess to understand the inner workings..but I do note that OgreAnimationState.i appears to have duplicated include statements ? I'm not sure if this is the cause, and don't mean to confuse the issue if this isn't the cause. All I know is that OgreBindings.i won't compile because of a OgreAnimationState related error.

I figure that once I can compile the OgreBindings, and take Robert's advice into account, OGRE will once again grace my screen.

Any assistance from friendly folk would be much appreciated.

Cheers,

GregH.

rastaman

24-03-2006 15:30:19

GregH:
what version of OGRE SDK, and SWIG are you using?
I'v only tested ODN 1.0.6 with swig-1.3.27. ODN v1.2 will uses swig-1.3.29


there should be 2 "include OgreAnimationState.h" one a #include incapsolated in %{ %} and the other %include that swig reads.

GregH

25-03-2006 01:08:14

Hi Rastaman,

My (brand new) install is:

OGRE SDK as per OgreSDKSetup1.2.0_RC1_VC80

(I used CVS on 24/03/06 to retrieve the entire OgreAddons download)

SWIG Version: 1.3.27

DIRECTX SDK as per dxsdk_feb2006


Then:

I made sure I had the OGRE_HOME and SWIG_HOME Enviroment variables pointing to the correct locations. At first, VS 2005 could not find SWIG, it was because of quotation marks I had included (as in the doc I was following).

I successfully compiled CeguiBindings.i

OgreBindings.i failed with the duplication error detailed in may earlier post.

I successfully compiled OgreBindings_Cegui.i


...I have since commented out the second include line in OgreAnimationState.i, and it appears to compile OK (but that may break something later I think).

I exited VS 2005, reloaded the entire OgreDotNet solution and ran a build on the whole project.

VS 2005 generated 91 fatal errors and 9 warnings (hey - a perfect score of 100 !!!).

Would you like me to send you the error log - it's both lengthy and very ugly.

Some extracts include:



3>c:\program files\ogre sdk 120 2005\ogreaddons\ogredotnet\ogrenet\ogrebindings_wrap.cxx(3968) : error C2664: 'Ogre::TextureEffectProxyMap::TextureEffectProxyMap(std::multimap<_Kty,_Ty> *)' : cannot convert parameter 1 from 'const Ogre::TextureUnitState::EffectMap *__w64 ' to 'std::multimap<_Kty,_Ty> *'
3> with
3> [
3> _Kty=Ogre::TextureUnitState::TextureEffectType,
3> _Ty=Ogre::TextureUnitState::TextureEffect
3> ]
3> Conversion loses qualifiers



..and...



3> c:\program files\ogre sdk 120 2005\ogreaddons\ogredotnet\ogrenet\ogrebindings_wrap.cxx(51837) : see reference to class template instantiation 'Ogre::VectorIterator<T>' being compiled
3> with
3> [
3> T=int
3> ]





3>c:\program files\ogre sdk 120 2005\include\ogreiteratorwrappers.h(73) : error C2377: 'Ogre::VectorIterator<T>::value_type' : redefinition; typedef cannot be overloaded with any other symbol
3> with
3> [
3> T=int
3> ]
3> c:\program files\ogre sdk 120 2005\include\ogreiteratorwrappers.h(55) : see declaration of 'Ogre::VectorIterator<T>::value_type'
3> with
3> [
3> T=int
3> ]




This kind of stuff is my worst nightmare: I was really concerned from day one about migrating from VS 2003 to VS 2005, as I had a stack of trouble building ODN, and I didn't want to be amongst the first to deal with VS 2005 compile issues (as I'm not a C++/C# programmer)

For example, there may be 40 check boxes that need to be set in the IDE to make it less picky.

Having said all of this, I also realise it may be one small spanner in the works - it's not unusual for a single error to look like the end of the world.

Anyway, if we can get past this, we'll all know how to tackle VS 2005 in future.

Cheers,

GregH.

rastaman

25-03-2006 03:16:47


OGRE SDK as per OgreSDKSetup1.2.0_RC1_VC80


well ODN in cvs now as of 2006/03/24 is not updated to Ogre 1.2

I'm now trying to figure out what all I've changed and added so I can update cvs for 1.2

GregH

25-03-2006 05:49:04

Hi Rastaman,

Thanks for the prompt reply...if I understand you correctly, I should wait for a CVS update notification from you, download same, and try recompiling with VS 2005.

I really apologise if this puts you under any pressure. I understand that I'm in an unsual situation in that I'm provided with the latest version of whatever software virtually on the day of its release...looks like I'm destined to be the battering ram. Ouch. :shock:

Please let me know when to proceed with a CVS download. I will of course provide feedback following compilation.

I can't wait to see OGRE rendering again. :lol:

Cheers,

GregH.