project-navigation
Personal tools

Author Topic: Win32 Development Binary Installer Links  (Read 466592 times)

Offline iliaarpad

  • Rookie
  • ***
  • Posts: 31
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #135 on: February 18, 2009, 01:00:28 pm »
New installer (r22752) was here.

EDIT: Installer installs non-working game. Please don't use it until a resolution is found. Sorry for the inconvenience.
EDIT 2: Removed file from FileFront.
« Last Edit: February 19, 2009, 02:42:43 am by iliaarpad »

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #136 on: February 18, 2009, 06:08:52 pm »
> EDIT: Installer installs non-working game. Please don't use it until a resolution is found. Sorry for the inconvenience.

What's you'r problem, and ho do you build UfoAI
In my newest build i can run the game
but after pressing "single-player" the game crash
with no message

Offline iliaarpad

  • Rookie
  • ***
  • Posts: 31
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #137 on: February 18, 2009, 06:26:10 pm »
Did you build your own installer and does that crash when single player is selected, too? Because right now I'm about to start pulling my hair out.

The problem is exactly that the game crashes after selecting single player and I assumed it was the fault of my installer.
When running with the Codeblocks debugger I get the message that the program got a SIGSEGV because of a Segmentation Fault. Unfortunately I'm really not at home with non-object oriented languages (such as C) so I can't really tell what is causing the Segmentation Fault.

More precisely the debugger message is
Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
In ?? () ()

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #138 on: February 18, 2009, 09:49:37 pm »
remove the newly added option
<Add option="-O2" />
inside build\projects\ufo.cbp
and rebuild
codeblocks.exe --rebuild V:\MinGW\ufoai\build\projects\ufo.cbp

I was able to build a working ufo.exe with these options too
<Add option="-march=i686" />
<Add option="-fexpensive-optimizations" />
but the option
<Add option="-O3" />
or
<Add option="-O2" />
let ufo.exe crash again

I've build ufo.exe before with options
<Add option="-march=i686" />
<Add option="-fexpensive-optimizations" />
<Add option="-O3" />
and had no problem
during 22707 (last working build was 22614) the game crash with these options
and with
<Add option="-O2" />
allone too

I'm currently not using the last C::B build from BTAxis
maybe thats the problem
« Last Edit: February 18, 2009, 09:52:01 pm by Muton »

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #139 on: February 18, 2009, 11:03:12 pm »
I don't think that should matter. The only difference with the older package is the gettext version. If that was causing trouble it would crap out on the main menu, probably.

Offline iliaarpad

  • Rookie
  • ***
  • Posts: 31
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #140 on: February 19, 2009, 12:35:59 am »
After rebuilding from scratch and watching it crash again, I decided to give it a try and removed the optimization option. The funny thing is that now it doesn't crash. Is it possible that the optimization produces buggy code? I'm using MingW gcc 3.4.5.

After further experimentation it would seem that it crashes whenever I compile it with O2 or more aggressive optimization. When using second level optimization (-O1) or less it works fine and does not crash when selecting the Single Player menu. Anything above that causes a Segmentation Fault.

I suppose it could also be a problem with the compiler (the gcc packaged with MingW is quite old)... I can't really think of anything else.

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #141 on: February 19, 2009, 01:23:01 am »
Not being a serious coder outside of HTML and the web-based stuff, so far all of you have used terminology I'm unfamiliar with, but I will say that I've been following the wiki to the letter and using the pre-packaged CB and included MinGW and have not had issues.

I will say that I do have a programming background, coming from working on C64 machines waaaaay back in the '80s and such, and that I suspect these issues mentioned in the last several posts here are simply because some people here are trying to do something fancy that might not be necessary.  I admit I could be wrong and way off, as I don't work with C too much, but that's my guess.

Regardless, I've just built a new installer of rev 22773 with fully re-built maps and I'm going to upload it to Filefront tonight over-night.

Offline iliaarpad

  • Rookie
  • ***
  • Posts: 31
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #142 on: February 19, 2009, 02:08:00 am »
I was following the wiki as well - except that the MingW packaged with the Codeblocks version there didn't quite work for me (my bet would be my OS: Vista). I had to install the candidate MingW compiler separately which may still have some bugs.
Meaning I have to use a (in theory) unstable compiler :)
Since you also create installers regularly using a stable compiler and you are also uploading to FileFront I'll stay in reserve.
My builds also have O1 optimization only so in theory your builds should be faster, as well.

@Muton: what compiler version are you using?
« Last Edit: February 19, 2009, 02:09:50 am by iliaarpad »

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #143 on: February 19, 2009, 04:07:06 am »
Quote
I was following the wiki as well - except that the MingW packaged with the Codeblocks version there didn't quite work for me (my bet would be my OS: Vista). I had to install the candidate MingW compiler separately which may still have some bugs.

Strange - I'm building the installers on Vista, specifically Home Premium, 32-bit.  Do you have other compilers, IDEs, or other programming tools installed that could be conflicting or otherwise interfering with building UFO: AI?

I also admit that I have no idea what you're referring to with "optimization" and the levels of it - I just use mostly the default settings within the pre-packaged CB, except that I set it to use more than one thread to take advantage of both cores on the machine.

Edit: This is probably a very *long* shot, but do you compile with the target "win32" or "win32_debug"?  I've been using the debug target, not the release one when I build the installers I upload.
« Last Edit: February 19, 2009, 04:09:21 am by Destructavator »

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #144 on: February 19, 2009, 04:52:33 am »

Offline iliaarpad

  • Rookie
  • ***
  • Posts: 31
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #145 on: February 19, 2009, 01:23:37 pm »
I'm using the default settings as well. I didn't touch anything. I still think that this is because I use the 3.4.5 version of the gcc compiler while the prepackaged Codeblocks comes with version 3.4.2 of the gcc compiler.

Optimization makes the generated code run faster. The more aggressive it is the more effective the code can become. However applying too much optimization can lead sometimes to code instability. The default UFO: AI Codeblocks project adds an option to the compiler telling it to use third level optimization, which should be safe, unless the compiler is buggy. This is why I started to suspect the compiler.

As for other IDE-s, I have Eclipse with sun JDK and Visual Studio 8 installed but I don't think they could cause the problem. When I tried to compile UFO: AI with the 3.4.2 version of the compiler the linker couldn't find some libraries. As soon as I replaced it with the 3.4.5 compiler it started to work.

Since Muton seems to have the same problem as I have, I'm quite curious as to what gcc version he is using. If it is 3.4.5...

Edit:
Quote
This is probably a very *long* shot, but do you compile with the target "win32" or "win32_debug"?
Argh... You are right! I don't know when or how but looks like I somehow accidentally changed the target to windows from windows_debug. But I still don't understand why that causes a problem.
« Last Edit: February 19, 2009, 07:07:44 pm by iliaarpad »

Offline Muton

  • Sergeant
  • *****
  • Posts: 496
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #146 on: February 19, 2009, 07:30:33 pm »
@Muton: what compiler version are you using?

mingw-gcc 3.4.2

Destructavator build a debug version
Debugging options do not include any optimation
So there is no magic!

'Couse i'm using optimation on ufo.exe for quite some time (ufo2map too [speed up by >10%])
i knew there was no problem with -O2 or -O3 before 22707
only with optimation -march
Anything higher i686 let the game crash.

Offline iliaarpad

  • Rookie
  • ***
  • Posts: 31
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #147 on: February 19, 2009, 10:51:35 pm »
Okay, I think I figured it out.

The problem seems to arise at revision 22688 (r22687 runs without segmentation fault when compiled as a release with O2 optimization).
More precisely the problem occurs when the line

Code: [Select]
visiblewhen "mn_main eq singleplayerInGame"
is missing from the button_save block in menu_singleplayer.ufo.

When I add the line back the game runs fine (at least it doesn't crash after selecting the Single Player menu).
So, if you would like to build a release version with O2 optimization enabled add the line above in the button_save block. After that the game will work.
Muton, could you verify it? Could you try adding the line above to the button_save block? Thanks!
« Last Edit: February 19, 2009, 11:23:25 pm by iliaarpad »

odie

  • Guest
Re: Win32 Development Binary Installer Links
« Reply #148 on: February 20, 2009, 02:38:56 am »
Okay, I think I figured it out.

The problem seems to arise at revision 22688 (r22687 runs without segmentation fault when compiled as a release with O2 optimization).
More precisely the problem occurs when the line

Code: [Select]
visiblewhen "mn_main eq singleplayerInGame"
is missing from the button_save block in menu_singleplayer.ufo.

When I add the line back the game runs fine (at least it doesn't crash after selecting the Single Player menu).
So, if you would like to build a release version with O2 optimization enabled add the line above in the button_save block. After that the game will work.
Muton, could you verify it? Could you try adding the line above to the button_save block? Thanks!

Hi iliaarpad,

I have been following this thread too. I last built 22773 and i face the same problems.

I guess i will wait for u folks to try fix this before i post more on this.

For now, for your reference, my system:
Win XP SP3, fully patched as of feb 09.

Previously running smoothly up to i believe 22650+- that revision. I patch and update every morning, recompile and bring home to try out. (That is continue the previous save games until it breaks).

As of last nite 22773, it works perfectly up to the single player mode. All other options in the menu (credits, multiplayer, options, even the exit) works fine.

For reference pls. :)

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Win32 Development Binary Installer Links
« Reply #149 on: February 20, 2009, 11:40:53 am »
We have investigated this problem last night and Bayo committed a possible fix in r22790.

note: it was only reproducible on windows, release build.

-geever