Page 1 of 1

VC10 Binary

Posted: Sat Nov 24, 2012 8:49 am
by pheonixstorm
Compiles fine but when I try to run it I get an access violation. Running through the jit debugger I get this

- this 0x00000000 std::basic_string<char,std::char_traits<char>,std::allocator<char> > * const
[size] CXX0030: Error: expression cannot be evaluated
[capacity] CXX0030: Error: expression cannot be evaluated
- _Ptr 0x00aa2bbc "night" const char *
110 'n' const char
_Count 1232872 unsigned int

It seems to crash after it hits light ecm01.image. Not sure if the next image to be loaded is the issue or ecm01... Either way xstring pops up at line 921

Code: Select all

		if (_Grow(_Count))
			{	// make room and assign new stuff
			_Traits::copy(_Myptr(), _Ptr, _Count);
			_Eos(_Count);
			}
		return (*this);

Re: VC10 Binary

Posted: Sat Nov 24, 2012 7:22 pm
by klauss
It would be useful to see the full backtrace.

Re: VC10 Binary

Posted: Sat Nov 24, 2012 7:28 pm
by log0
Weird, have been building with vs2010 for almost a year now. The only bit I needed has been a vs2010 compiled python lib.

Re: VC10 Binary

Posted: Sat Nov 24, 2012 9:50 pm
by shenle
pheonixstorm wrote:
It seems to crash after it hits light ecm01.image
Oy. I have seen this happen. Lemme see if I remember what the problem was.

BTW by VC10 do you mean the 2010 version? In 2012, it compiles and works perfectly, see my other thread.

(edit) it's python-related. Try recompiling python with the version of the compiler you're using for the main binary. http://forums.vega-strike.org/viewtopic ... ge#p129905

Re: VC10 Binary

Posted: Sun Nov 25, 2012 6:00 am
by pheonixstorm
hmm.. possible, though this pops up well past python27. Will replace and see.

Re: VC10 Binary

Posted: Tue Nov 27, 2012 8:26 am
by pheonixstorm
Well got through that nightmare. So, we got a working binary based on VC10 (finally) plus I am updating all the other libs.

As for libs.. should we switch from creatives openal to openal soft? And switch from glut to freeglut? I've got both downloaded, haven't tried toying with oal soft yet.

Also, saw on the python site that they have a way to convert 2.x code over to 3.x. Has anyone tried 2to3? Should we even attempt it?

Re: VC10 Binary

Posted: Tue Nov 27, 2012 10:28 am
by log0
I am all for freeglut and openal soft, even if it is just to simplify debugging on different platforms by making sure we are using the same code/libs. This has been the main motivation to make vs compile with mingw, and of course the possibility to use gdb as debugger.

Re: VC10 Binary

Posted: Tue Nov 27, 2012 3:59 pm
by klauss
pheonixstorm wrote:Also, saw on the python site that they have a way to convert 2.x code over to 3.x. Has anyone tried 2to3? Should we even attempt it?
I've had some experience with that. Code can be autoconverted to py3 with 2to3 as long as you follow some "best practices" regarding dual python support.

IOW, you have to follow some conventions that 2to3 will recognize and autoconvert, and some other best practices that will make your code not break when using py3.

That said, I really doubt our code follows those conventions. Furthermore, at the C API level, 2 and 3 are a bit different, and there's no automagic tool for handling the differences (other than ifdefs all over the place).

I'm not sure how hard it will hit VS code, since we use boost for most our interphasing needs. But I'm sure it will hit us somehow.

Re: VC10 Binary

Posted: Tue Nov 27, 2012 6:00 pm
by pheonixstorm
So, probably stuck with 2.7 till we can manually convert or rewrite.

Re: VC10 Binary

Posted: Wed Nov 28, 2012 8:41 pm
by pheonixstorm
I put up a new working VC10 binary and project files. Enjoy and let me know if anyone encounters any bugs or if you don't encounter any bugs you previously had to deal with.

Re: VC10 Binary

Posted: Thu Nov 29, 2012 12:51 am
by shenle
Why not move straight to VS2012 express? It compiles well (after rebuilding some libraries with it), and it's free as in beer. The only catch is that you need to replace glut with freeglut, but IMHO that was long overdue anyway.

Re: VC10 Binary

Posted: Thu Nov 29, 2012 2:17 am
by pheonixstorm
Yeah already have the compiled lib/dll for freeglut just haven't swapped it out yet.

As for 2012. Since I don't think any libs will need to be recompiled for 2012 All I need is the sln and project files and we can slap em in the vc10 folder, but as i'm pretty much the only one keeping up the windows side of things I am in no hurry to upgrade to 2012. Both VS (finally) and Warzone 2100 (Legacy, Redemption, and WZP) use 2010.

Re: VC10 Binary

Posted: Thu Nov 29, 2012 3:07 pm
by shenle
I'm just sayin', never had luck with the free (express) version of visual studio - until 2012.

Re: VC10 Binary

Posted: Thu Nov 29, 2012 3:31 pm
by klauss
shenle wrote:I'm just sayin', never had luck with the free (express) version of visual studio - until 2012.
It is quite difficult to set up, including the platform SDK, DX SDK and all the other SDKs. Last time I tried (the first VC express, vc8) you had to set it all up manually, quite a pain.

Re: VC10 Binary

Posted: Thu Nov 29, 2012 11:11 pm
by shenle
klauss wrote:
shenle wrote:I'm just sayin', never had luck with the free (express) version of visual studio - until 2012.
It is quite difficult to set up, including the platform SDK, DX SDK and all the other SDKs. Last time I tried (the first VC express, vc8) you had to set it all up manually, quite a pain.
Well with 2012 express you don't have to do any of these. it works pretty much out of the box.