project-navigation
Personal tools

Author Topic: ufoai 2.3 on OSX PPC Leopard - save game fails  (Read 13998 times)

Offline virag0

  • Rookie
  • ***
  • Posts: 48
    • View Profile
ufoai 2.3 on OSX PPC Leopard - save game fails
« on: September 03, 2010, 01:33:40 am »
Hi,
I have compiled ufoai-2.3 for PPC on my late 2005 G5 (dual core pciE model) and it seems to work fine in skirmish and campaign
mode, to the point where I wanted to upload it somewhere so those people who can't get it running would have one to play with, but
I have reached one show-stopper I am hoping to get help with.

For now, I will just explain the problem and then dump some logs later when I am back on the console, but the problem
occurs when saving the game to any of the Campaign save slots.   The console reports that the file is created and then
corrupted.   I tried looking at the files uncompressed and they look like they have a full <xml> tagset with nothing
seemingly missing but the game reports that the header on these files is corrupted.

When I save the game into different slots without quitting, it seems to load them although the text field for the
slot is not displayed properly until you click the mouse.    Quitting then never allows the save files to be accessed
again.   Also, the files seemingly get generated at different lengths, so I am not sure if that is correct or not.

It is almost like the file is being opened but never properly let go or closed or something, but a  look
at the cp_save.c doesn't elicit any clues.   I am hoping that someone has a fix because everything
else is working fine.   When I try to compile 2.4-dev it will make, but runs like a hairy goat and
doesn't appear to like my G5 yet at all.....  ...so I am hoping to get this final 2.3 problem sorted!


Cheers....

Offline virag0

  • Rookie
  • ***
  • Posts: 48
    • View Profile
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #1 on: September 03, 2010, 02:57:19 am »
Here is the console log for the savegame problem. 
I am not sure what release I compiled but i am pretty sure it was the 2.3 stable version.

zathras:/tmp 186> cat /tmp/ufoconsole.log
2010/09/03 02:28:23 ----- network initialization -------
2010/09/03 02:28:23 libcurl/7.21.1 OpenSSL/1.0.0a zlib/1.2.5 libidn/1.19 initialized.
2010/09/03 02:28:23 ------ server initialization -------
2010/09/03 02:28:23 added 7 maps to the mapcycle
2010/09/03 02:28:23 ----- console initialization -------
2010/09/03 02:28:23 Console initialized.
2010/09/03 02:28:23 ------- video initialization -------
2010/09/03 02:28:23 SDL version: 1.2.14
2010/09/03 02:28:23 I: desktop depth: 32bpp
2010/09/03 02:28:23 I: video memory: 0
2010/09/03 02:28:23 I: Available resolutions: 1280x1024 1280x960 1280x768 1024x768 800x600 640x480 (6)
2010/09/03 02:28:23 I: video driver: Quartz
2010/09/03 02:28:23 I: setting mode 3
2010/09/03 02:28:23 I: set multisample buffers to 2
2010/09/03 02:28:23 I: set swap control to 0
2010/09/03 02:28:23 I: 1024x768 (fullscreen: no)
2010/09/03 02:28:23 I: got 8 bits of stencil
2010/09/03 02:28:23 I: got 24 bits of depth buffer
2010/09/03 02:28:23 I: got double buffer
2010/09/03 02:28:23 I: got 8 bits for red
2010/09/03 02:28:23 I: got 8 bits for green
2010/09/03 02:28:23 I: got 8 bits for blue
2010/09/03 02:28:23 I: got 8 bits for alpha
2010/09/03 02:28:23 I: got 2 multisample buffers
GL_VENDOR: NVIDIA Corporation2010/09/03 02:28:23 GL_RENDERER: NVIDIA GeForce 6600 OpenGL Engine2010/09/03 02:28:23 GL_VERSION: 2.0 NVIDIA-1.5.482010/09/03 02:28:23 GL_EXTENSIONS: GL_ARB_transpose_matrix GL_ARB_vertex_program GL_ARB_vertex_blend GL_ARB_window_pos GL_ARB_shader_objects GL_ARB_vertex_shader GL_ARB_shading_language_100 GL_EXT_multi_draw_arrays GL_EXT_clip_volume_hint GL_EXT_rescale_normal GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_gpu_program_parameters GL_EXT_geometry_shader4 GL_EXT_transform_feedback GL_APPLE_client_storage GL_APPLE_specular_vector GL_APPLE_transform_hint GL_APPLE_packed_pixels GL_APPLE_fence GL_APPLE_vertex_array_object GL_APPLE_vertex_program_evaluators GL_APPLE_element_array GL_APPLE_flush_render GL_APPLE_aux_depth_stencil GL_NV_texgen_reflection GL_NV_light_max_exponent GL_IBM_rasterpos_clip GL_SGIS_generate_mipmap GL_ARB_imaging GL_ARB_point_parameters GL_ARB_texture_env_crossbar GL_ARB_texture_border_clamp GL_ARB_multitexture GL_ARB_texture_env_add GL_ARB_texture_cube_map GL_ARB_texture_env_dot3 GL_ARB_multisample GL_ARB_texture_env_combine GL_ARB_texture_compression GL_ARB_texture_mirrored_repeat GL_ARB_shadow GL_ARB_depth_texture GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_occlusion_query GL_ARB_point_sprite GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ARB_pixel_buffer_object GL_ARB_draw_buffers GL_ARB_shader_texture_lod GL_EXT_compiled_vertex_array GL_EXT_framebuffer_object GL_EXT_texture_rectangle GL_ARB_texture_rectangle GL_EXT_texture_env_add GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_texture_lod_bias GL_EXT_abgr GL_EXT_bgra GL_EXT_stencil_wrap GL_EXT_texture_filter_anisotropic GL_EXT_secondary_color GL_EXT_blend_func_separate GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_depth_bounds_test GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1 GL_EXT_texture_sRGB GL_EXT_blend_equation_separate GL_EXT_texture_mirror_clamp GL_EXT_packed_depth_stencil GL_APPLE_flush_buffer_range GL_APPLE_ycbcr_422 GL_APPLE_vertex_array_range GL_APPLE_texture_range GL_APPLE_float_pixels GL_ATI_texture_float GL_ARB_texture_float GL_ARB_half_float_pixel GL_APPLE_pixel_buffer GL_APPLE_object_purgeable GL_NV_point_sprite GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_blend_square GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_fog_distance GL_NV_depth_clamp GL_NV_multisample_filter_hint GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_ATI_texture_mirror_once GL_ATI_texture_env_combine3 GL_ATI_separate_stencil GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod 2010/09/03 02:28:23 2010/09/03 02:28:23 using GL_ARB_texture_non_power_of_two
2010/09/03 02:28:23 using GL_ARB_shading_language_100
2010/09/03 02:28:23 GLSL Version: 1.20
2010/09/03 02:28:23 using GL_ARB_framebuffer_object
2010/09/03 02:28:23 max draw buffers: 4
2010/09/03 02:28:23 max render buffer size: 4096
2010/09/03 02:28:23 max color attachments: 4
2010/09/03 02:28:23 using GL_ARB_draw_buffers
2010/09/03 02:28:23 max supported lights: 8
2010/09/03 02:28:23 max texture units: 4
2010/09/03 02:28:23 max texture coords: 8
2010/09/03 02:28:23 max vertex attributes: 16
2010/09/03 02:28:23 max texture size: detected 4096
2010/09/03 02:28:23 ...but using 1024 as requested
2010/09/03 02:28:23 Using low resolution globe textures as requested.
2010/09/03 02:28:23 SDL_image version 1.2.10
2010/09/03 02:28:24 SDL_ttf version 2.0.9 - we need at least 2.0.7
2010/09/03 02:28:24 ------- sound initialization -------
2010/09/03 02:28:24 SDL_mixer version: 1.2.11
2010/09/03 02:28:24 ... requested audio rate: 44100
2010/09/03 02:28:24 ... driver: 'coreaudio'
2010/09/03 02:28:24 ... audio rate: 44100
2010/09/03 02:28:24 ... audio channels: 2
2010/09/03 02:28:24 ... loaded ogg vorbis support
2010/09/03 02:28:24 ------- input initialization -------
2010/09/03 02:28:25 0 possible joysticks
2010/09/03 02:28:25 no joystick found.
2010/09/03 02:28:25 ----------- parse scripts ----------
2010/09/03 02:28:25 50 script files
2010/09/03 02:28:25 47 ui script files
2010/09/03 02:28:28 Shared Client/Server Info loaded
2010/09/03 02:28:28 ... 99 items parsed
2010/09/03 02:28:28 ... 32 damage types parsed
2010/09/03 02:28:28 ... 80 map definitions parsed
2010/09/03 02:28:28 ... 29 equipment definitions parsed
2010/09/03 02:28:28 ... 10 inventory definitions parsed
2010/09/03 02:28:28 ... 20 team definitions parsed
2010/09/03 02:28:28 executing keys.cfg
2010/09/03 02:28:28 music change to van_theme (from PsymongN3)
2010/09/03 02:29:03 CL_LanguageInit: language settings are stored in configuration: en
2010/09/03 02:29:03 ...using language: en_US.UTF-8
2010/09/03 02:29:03 SDL_ttf version 2.0.9 - we need at least 2.0.7
2010/09/03 02:29:03 ...registering 10 fonts
2010/09/03 02:29:03 134 static models loaded
2010/09/03 02:29:04 ====== UFO Initialized ======
2010/09/03 02:29:04 =============================
2010/09/03 02:29:04 Switch grab input off
2010/09/03 02:29:06 Change gametype to 'Skirmish mode'
2010/09/03 02:29:08 Shutdown gametype 'Skirmish mode'
2010/09/03 02:29:08 Change gametype to 'Campaign mode'
2010/09/03 02:29:08 --- save subsystem initialization --
2010/09/03 02:29:08 added base subsystem
2010/09/03 02:29:08 added research subsystem
2010/09/03 02:29:08 added campaign subsystem
2010/09/03 02:29:08 added hospital subsystem
2010/09/03 02:29:08 added market subsystem
2010/09/03 02:29:08 added employee subsystem
2010/09/03 02:29:08 added aliencont subsystem
2010/09/03 02:29:08 added aircraft subsystem
2010/09/03 02:29:08 added installation subsystem
2010/09/03 02:29:08 added ufostores subsystem
2010/09/03 02:29:08 added production subsystem
2010/09/03 02:29:08 added messagesystem subsystem
2010/09/03 02:29:08 added stats subsystem
2010/09/03 02:29:08 added nations subsystem
2010/09/03 02:29:08 added transfer subsystem
2010/09/03 02:29:08 added alien base subsystem
2010/09/03 02:29:08 added xvirate subsystem
2010/09/03 02:29:08 added messageoptions subsystem
2010/09/03 02:29:08 Campaign data loaded - size 4458784 bytes
2010/09/03 02:29:08 ...techs: 189
2010/09/03 02:29:08 ...buildings: 19
2010/09/03 02:29:08 ...ranks: 16
2010/09/03 02:29:08 ...nations: 8
2010/09/03 02:29:08 ...cities: 457
2010/09/03 02:29:08 2010/09/03 02:29:10 Savegame header for slot0 is corrupted!
2010/09/03 02:29:10 Savegame header for slot1 is corrupted!
2010/09/03 02:29:10 Savegame header for slot2 is corrupted!
2010/09/03 02:29:11 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:11 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:11 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:11 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:12 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:12 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:13 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:13 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:13 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:14 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:16 Savegame header for slot0 is corrupted!
2010/09/03 02:29:16 Savegame header for slot1 is corrupted!
2010/09/03 02:29:16 Savegame header for slot2 is corrupted!
2010/09/03 02:29:18 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:19 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:20 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:21 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:21 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:21 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:21 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:25 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:26 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:27 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:28 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:29 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:29 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:29 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:30 Unknown command "game_timestop" - wasn't sent to server
2010/09/03 02:29:32 Wrote config.cfg.
2010/09/03 02:29:32 Shutdown gametype 'Campaign mode'
2010/09/03 02:29:32 Wrote keys.cfg

Offline virag0

  • Rookie
  • ***
  • Posts: 48
    • View Profile
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #2 on: September 03, 2010, 08:59:43 am »
More info,
When I go to load the game and click the mouse inside the text field
to select a savegame slot, there is no text, but the mouse click
sends this message instead:

Unknown command "game_timestop" - wasn't sent to server

Is anyone else having problems with their save games on OSX PPC Leopard?


rachel


Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #3 on: September 03, 2010, 10:06:21 am »
This must be some endian problem. Please open a ticket on the bugracker and upload your savegame there.

-geever

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #4 on: September 03, 2010, 01:11:18 pm »
endian problem with xml? maybe the header file - please attach the savegame

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #5 on: September 04, 2010, 05:24:06 am »
Hi,
I have compiled ufoai-2.3 for PPC on my late 2005 G5 (dual core pciE model) and it seems to work fine in skirmish and campaign mode,

Whoah.

I have got to see what's going on with your system.
Do you have a working 3d geoscape? Properly lit?

Please, I want to see a dmg even if it's not working correctly on saves.
Your log shows NVidia graphics; I've got graphics failing on two different ATI's. If it's literally an ATI driver issue (for mac supplied driver???), that's useful to know. (Simply enough: 2.2.1 worked, and 2.3 does not. What's changed in the rendering between the two?)

Offline virag0

  • Rookie
  • ***
  • Posts: 48
    • View Profile
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #6 on: September 04, 2010, 02:01:26 pm »
Hi,
the game works perfectly except for the campaign save. 
I had to disable GLSL shading for everything to work.
I have  .dmg I can upload somehow if you want it.

I also have the corrupt save game which I will upload
for analysis.

Now, I seem to have 2 copies of the 2.3 source code.
They are both subtly different - the first thing I notice
is the build/install_mac.mk files are quite different.

The build that is working for me is a copy of the source out
of the cvs - it will make a full .dmg file that runs on my mac,
with all the libraries copies into the install root and it seems
to run fine except for the campaign file save. 
The second copy I am running compiles OK but faildswith a
stupid error on "@cp"  (I am not sure how cp is called in these build scripts but
they work differently in the 2 code branches) when I run
macinstaller - the ufo command itself dies with an mdx error
so I reckon this is a different package of code.   

If there is a place I can upload the .dmg, please let me know.



Offline virag0

  • Rookie
  • ***
  • Posts: 48
    • View Profile
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #7 on: September 04, 2010, 02:05:02 pm »
Please see the attached save game file.....

I will upload my .dmg as soon as I get info....



Offline Thrashard96

  • Squad Leader
  • ****
  • Posts: 260
    • View Profile
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #8 on: September 04, 2010, 03:19:17 pm »
talking about saves, may it be possible to tweak it a bit?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #9 on: September 04, 2010, 03:21:58 pm »
your savegame loads fine here (little endian) - so it looks like the save was correct - might be the loading

Offline virag0

  • Rookie
  • ***
  • Posts: 48
    • View Profile
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #10 on: September 04, 2010, 03:29:21 pm »
I thought the savefile looked OK, when I studied one uncompressed. 
What do you suggest I do?

The symptom when loading is two conditions:

1) Game is saved and reloaded without quitting UFO.
This appears to work fine.  If I save a game, I get the corrupted error
to the console, but it appears to be written fine.
It can be reloaded, although the text may or may not be
present in the slot text field.   Loading any one of these saves works.

2) Save game and then quit/restart
If I save the campaign and then immediately quit,
when I restart, I will no longer be able to see the save
games with their names in the slots.


As mentioned, I seem to have 2 codebases, so I am working with the one
that actually gives me a result (up to a point).  Is there a version file anywhere
that indicates what release of 2.3 it is I am actually compiling?

Cheers.....

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #11 on: September 04, 2010, 06:27:38 pm »
Now, I seem to have 2 copies of the 2.3 source code.
They are both subtly different - the first thing I notice
is the build/install_mac.mk files are quite different.

The build that is working for me is a copy of the source out
of the cvs - it will make a full .dmg file that runs on my mac,
with all the libraries copies into the install root and it seems
to run fine except for the campaign file save. 

Two things:
1. What is the output from "svn diff"?
2. What is the output from "svn info"?

That should tell me which specific revision you are working with.

Quote
If there is a place I can upload the .dmg, please let me know.
I used google docs when I uploaded my last disk image.

** Please, download this, and tell me if the graphics work on your system **
https://docs.google.com/leaf?id=0B5IJio6EJ3NBNTNhMTliNmMtZTM5Mi00NDkzLTlmY2ItNDM4YzExZjM1MDg0&sort=name&layout=list&num=50

This version failed to give proper graphics on my machine (working about 1 in 4 times). If it works -- consistently -- for you, then ... well, I'm suspecting a bug in the driver that is trigger by the 2.3 rendering code being different than the 2.2.1 rendering code.

Offline virag0

  • Rookie
  • ***
  • Posts: 48
    • View Profile
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #12 on: September 06, 2010, 02:23:44 am »
Hi.
I tried your copy of UFO on my system and it only gets as far as the splash screen  :(

Here is my current "working" copy that has the save game issue.
It works in campaign and skirmish mode if you disable GLSL shading and run
it at 1024x758 in a window.  For some reason, Full screen mode the game will
load but fail to load a skirmish.   For now, I just want the savegame to work!

https://docs.google.com/leaf?id=0B1I9frP6pXMMNTdiYzk2ZWYtOGU5Zi00MDEwLWJmNDgtMGZkN2FkZmVlM2Rk&hl=en&authkey=COnJ_54K

Feel free to download and this PPC only versions.....

Cheers....

Offline Lord_Aether

  • Cannon Fodder
  • **
  • Posts: 2
    • View Profile
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #13 on: September 06, 2010, 04:47:06 am »
Just chiming in here to say that in 2.4-dev on PPC I have the same problem.

Offline virag0

  • Rookie
  • ***
  • Posts: 48
    • View Profile
Re: ufoai 2.3 on OSX PPC Leopard - save game fails
« Reply #14 on: September 06, 2010, 06:32:58 am »
Just chiming in here to say that in 2.4-dev on PPC I have the same problem.

Are you saying you compiled it or you are trying to run a downloaded binary?
This thread is discussing compiling the game.   You can try the version I uploaded
today, but the savegames fail.  The campaign and skirmish modes work with caveats
as above.

I have been over the cp_save.c code a few times and cannot see what is causing the
game load error. I might play around with it a bit, but I have to first fully understand what
it is doing.    There has to be a clue - Mattn says the save file opens and loads correctly.
On my system the file is written out, but the console informs me it is corrupted.
So this is the first clue.   The code that writes the file is correct.   The code that
verifies it must be wrong!    I will dig instead of playing ;)