FreeFalcon / freefalcon-central

A campaign based, multiplayer, open source flight simulator.
http://freefalcon.org/
BSD 2-Clause "Simplified" License
157 stars 99 forks source link

Bad maneuver data file format #8

Closed vinnydiehl closed 11 years ago

vinnydiehl commented 11 years ago

The ShiWarning() in this method is being triggered on startup- the next roadblock on our way to working code.

PeterMeyer commented 11 years ago

I simply clicked the errorboxes away and deal a bit with the alt+tab and winkey tabswitch go set app/windows focus, it load further and i entered the UI Official FreeFalcon Version is 5.0 and FFViper.exe Version is 2.3.1.9 We need an FreeFalcon 5.0 Installation, because the Datafiles are diffrent to FF 6.0. I just try to organize some FF5 Installer.

Hints: The Soundsystem is initialized, UI Background Music is playing, so we can expect thadt this Subsystem is working. I also noticed thadt mouseover Soundeffects worked in the UI:With the Winkey and Alt+TAB i was able to gain access to some UI Elements.I was able to get into the Logbook Tab in the UI and leave it, but Everytime a button is clicked where where filedata is loaded in the background i get an serialization error.

Cpnclusion: Wee need ASAP a FF 5.0 Installer. Maybe all Serialization Errors are gone with the correct Fileformat in the FreeFalcon Installfolder.We need it anyway, because we have to know what has changed in V6.0

Notes: Data Maneuver Data File Format Line 874 after click it comes again - loop? File: digimain.cpp Assertion raised in tex.cpp 265 and Assertion raised in tex.cpp 871 Assertion at 446\bsplib\objectparent.cpp

Notes2: The FFViper.exe Process goes into Idle mode, not freezing. Memory Consumption constant 180 MBytes without change.after 5 Mins.

FViper Console log: ContextMPR::FinishFrame - EndScene failed 0x887602F9 Stats report follows MinFPS: 0 MaxFPS: 16 AverageFPS: 11 TotalPrimitives: 0 Triangle Lists: 0 (-1.#J %) Triangle Strips: 0 (-1.#J %) Triangle Fans: 0 (-1.#J %) Point Lists: 0 (-1.#J %) Line Lists: 0 (-1.#J %) Line Strips: 0 (-1.#J %) AvgVtxBatchSize: 0 MaxVtxBatchSize: 0 AvgPrimBatchSize: 0 MaxPrimBatchSize: 0 AvgVtxCountPerSecond: 0 MaxVtxCountPerSecond: 0 AvgPrimCountPerSecond: 0 MaxPrimCountPerSecond: 0 TextureChangesTotal: 0 TextureChangesCached: 0 (-1.#J %) End of stats report ContextMPR - Clearing state table

PlutoniumHeart commented 11 years ago

Hi guys, I actually took a look at this, this is cause by the removal of the _filbuf() overload function, the removed one is able to read a zipped file, but the one came with the VS can't, so, I am putting it back, and using marcos to define undefine it when necessary. One more thing about this overload function is that now the scanf() won't use this overload function, so all the operations concerning the zipped file won't work.

I am thinking at some point in the future, we have to remove the entire ResMgr project, for 1. It's very old code, and hard to maintain, 2. it's not necessary to read anything from zip files any more.

If we are removing this project, then a new installation package should also be build, so that the file structure can work with the EXE.

vinnydiehl commented 11 years ago

I can't get into the UI at all. Are we getting the same sequence of errors? I'm getting:

  1. The one mentioned in this issue (twice)
  2. "Requested unavailable resolution 1024x768x16"
  3. "TimeManager dieing with callbacks still registered!"
  4. "Failed: !isReady()"

Upon ignoring the last, it crashes with an unhandled exception, an access violation reading location 0x0.

vinnydiehl commented 11 years ago

@PlutoniumHeart: :+1: on killing ResMgr, it's nasty and a maintenance nightmare. How high of a priority that will be depends on how stable the code is once it's up and running.

PeterMeyer commented 11 years ago

@gbchaosmaster Yeah. I started in debug mode. You have to click the Errors away. The Timemanager dying thing is because it trys to load in the Weatherlib this Textfile (tod.lst) and loads it in a struct. If this struct has not the expected params you get this TimeManager is died Error. Simply search for TimeManager dying string in the Slution you will find it.

PlutoniumHeart commented 11 years ago

@gbchaosmaster I don't have the second and 4th errors you got.

And if I put the _filbuf() overload back, I won't be able to get into the UI either, so there are something more going on with this overload function.

vinnydiehl commented 11 years ago

I think we should look into another way to get those files unpacked, or not have them packed in the first place. Using a low-level override when macro triggered is fragile and asking for trouble down the road.

PeterMeyer commented 11 years ago

hmm if it comes to compressed file data we should think about using libzlib. But we should be carefull about unpacking, because of all the files out there who is packed. better uncompressing it with another method.

vinnydiehl commented 11 years ago

I'm reasonably certain that the code used to use zlib. I wouldn't mind using it again, it's a nice library.

Or just don't bother with compression at all. The zip that we're working with here is only 6 MB larger uncompressed, and it adds extra overhead to decompress while loading the sim.

PlutoniumHeart commented 11 years ago

OK guys, I was forced to revisit those low level operation functions, and I believe the root of the file reading problem was because of the VS version changes from 6.0 upward, I deleted few more macros and it's working fine, I am able to use the override function _filbuf().

Now I should focus on fixing the file parcing part of the code since the code is assuming a different version of configuration files from the FFviper installations.

vinnydiehl commented 11 years ago

I deleted few more macros and it's working fine, I am able to use the override function _filbuf().

Alright, awesome. If that fixes these particular warnings, feel free to push that code up to a branch and send a PR and create a different issue for fixing the file parsing.

PeterMeyer commented 11 years ago

Regarding changed Datafiles. I was able to get an FF5.5 Installer.The Error Situation now a complete diffrent. There are startup Popups but if you click it away you can Use the UI, prepare a Mission, logbook ect without Errors. I upload the FF55 Installer right now our Mirros. Check Forum Download Section a few Ours. The upcomming Errors a mainly occuring in tex.cpp. I think they have changed the Bitmap Format for Textures a bit. Will do recursive diffrun against FF6 vs. FF55 Folder and post it in the Coders Den.

PeterMeyer commented 11 years ago

ps: We should catch this type of Exceptions. Its just because diffrent Datafile Formats. Before we change the Loader, its maybe a good Idee to keep in mind thadt old Theatre Files maybe need this loading Code. A detection of the Fileversion would be a nice thing.

PlutoniumHeart commented 11 years ago

I just tried both 5.5 and 5.0, and under 5.5 I still got an error messge after 2 pop ups, but I got to the UI. Under 5.0, the situation is far worse, I don't believe it's worth the trouble to install 5.0. You can also see from the EXE's version it's somewhere between 5.5 and 6.0.

vinnydiehl commented 11 years ago

Still can't even reach the UI in Win8 because of the additional warnings/error that I mentioned above, but Win7 lets me get to the UI by clicking away the warnings.

PeterMeyer commented 11 years ago

This is because the Error Popup Windows gained the Focus. You can use TAB+ALT and toggle between the diffrent Windows and Error Popup Windows. Toggle to Error, click it away ant toggle with TAB+ALT to the next Windows Focus. After a few clicks away you are in the UI an can click on the UI Menu Stuff elements like Logbook.

ps: We should really redirect all Errors to non visual components. An Error.log or Console log is better because blocked UI Elements while a popup window gaining Modal Focus is very bad at all. So no Popup Stuff at all. All should be logged as Text in File or Console.

vinnydiehl commented 11 years ago

Yep, it works as you describe on my Win7 install on my laptop, I have to Alt-Tab back to close some errors and the UI works, on my Win8 install the UI doesn't even begin to load, it CTDs. I suspect that solving the file reading issues might fix this.

vinnydiehl commented 11 years ago

Fixed in #10.