complex Problem "Bad file format"

Posted By: Mysterious

complex Problem "Bad file format" - 07/23/09 11:34

Hello
I hope that this not a duplicate thread but I post here

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=280300#Post280300

but no answer

I am working on project that contains several levels,
I am using CodeGear2007 with latest version of A7 7.7.7.4

when I run the exe file from the IDE every thing is fine
but when I run the exe file immediately (with out IDE) there are some levels that shows "Access Violation" when the function "level_load" is called, how can I know what is the problem ?

now after a long day of testing I try in WED ->Preview Map
after some it shows error
Error E1198
modelName.mdl:Bad file format

it works in MED and when I run the project from IDE it works but when start it from exe file it show "Access Violation..." error

any help


Posted By: LazyDog

Re: complex Problem "Bad file format" - 07/24/09 00:15

are you using Delphi 2007?
Posted By: Mysterious

Re: complex Problem "Bad file format" - 07/26/09 10:43

Yes I am using CodeGear C++ 2007
Posted By: jcl

Re: complex Problem "Bad file format" - 07/27/09 12:51

The error message means that the model file is found, but can not be opened for some reason, or it can be opened but the content is wrong. I'm not familiar with CodeGear though, so I don't know what "access violation" could mean.
Posted By: LazyDog

Re: complex Problem "Bad file format" - 07/29/09 00:14

have you converted the acknex.lib file to be compatible with codegear c++?

you need to use the coff2omf tool. I have a batch file that converts the .lib file. which is below. then in your code you use the converted one.

here is the batch file: I have the batch file in the sdk_engine directory of 3D GameStudio.
this converts acknex.lib to a codegear c++ compatible file called CG_acknex.lib.

Code:
"c:\program files\codegear\RAD Studio\5.0\bin\coff2omf.exe" acknex.lib CG_acknex.lib


Posted By: Mysterious

[Solved]complex Problem "Bad file format" - 07/30/09 16:27

first of all thank you both JCL and LazyDog

second the problem is when I run the game from the IDE it works fine but it only do this error if I run the stand-alone exe

yes of course I converted the lib file otherwise the whole project will refuse to build

anyway after loooooooooooooooooooooooooooooong testing and changing almost everything in the level and I started to delete each model one by one when I deleted all model that was issuing that message I start to analyze the problem I am using XSI Mod tool as a 3D content creation,

this the steps I finally detect the reason of this problem

First I removed UV and texture exported from the XSI Mod tool
ZZZZZZZZZZ, no didn't work frown

Second I used another version of exported
KKKKKK, also didn't work frown

Third I export it without animation
voualah, IT WORKS smile

so I export it with one frame of animation
Didn't work frown

then the problem is in the animation thing

I removed the weight values for vertices
It works smile

then I start to look at the values of weight
finally it seems that the problem is a bug in the XSI Mod tool that set some
invalid values (negative values for weight!!!) after correcting these values
everything went fine smile

but I still have one question why It works from the IDE and crash when starting the standalone exe ???

it really take some extra time to be solved

sorry if I annoy you

thank you very much for help

Mysterious.

© 2024 lite-C Forums