Author Topic: warp in /warp out trap  (Read 2405 times)

0 Members and 1 Guest are viewing this topic.

warp in /warp out trap
I'm a trap seemingly at random points during missions.  I believe others are seeing this too.  I've found a scenario that I can consistantly duplicate the problem.  

I'm using the FS2 mission The Romans Blunder(sm1-03.fs2).  The first time the Iceni jumps out, everything is fine.  If I restart the mission (ESC, select restart), the game will trap as soon as the Iceni begins to warp out.  I've  had this occur at other times and I believe a large ship was warping in or out at the time but can't swear to it.  But in the above case I can duplicate the problem consistantly.  Perhaps the warp.pof is getting free'd and not reloaded when you restart the mission?  (Just a Wild Arsed Guess)

I'm not that familiar this this part of the code.  Hopefully the above will give someone a Eureka moment.

Trap info:

Assert: Polygon_models[num]->id == model_num
File: D:\fs2_open\code\Model\ModelRead.cpp
Line: 2444

Call stack:
------------------------------------------------------------------
    model_render()    warpin_render()    fireball_render()    obj_render()    obj_render_all()    game_render_frame()    game_frame()    game_do_frame()    game_do_state()    gameseq_process_events()    WinMainSub()    WinMain()    WinMainCRTStartup()    KERNEL32.DLL bff8b560()
    KERNEL32.DLL bff8b412()
------------------------------------------------------------------
« Last Edit: December 04, 2002, 12:00:38 am by 852 »

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
yup that is defanantly the warpmodel render

this only happens with big ships, or will this happen with small ones as well? it should be happening with both

the model is loaded from fireball_load_data(), wich is called from fireball_init(), wich is called from game_level_init(), it's getting called after model_free_all() so that shouldn't be effecting anything

the trap is in model_get()
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Would that explain my inexplicable crashes to the desktop?  I get no error messages.
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 
I haven't noticed if it happens with small ships or not.  I'll try with another mission tonight.  I've had it happen in other missions but don't remember for sure what ships were jumping in/out.

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
it happened with Medusas using OGL
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
which makes it the glow points crashing the game.

i found out what to do:

set 'wm' equal to -1 when model_free_all finishes

we need a separate function that loads the warpin stuff separate from fireballs because fireball_load_data is called once.
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 
Did I hear someone say Eureka!  :)

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
:wtf:

But why does the bug only show up in recent fs2_open builds?

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Quote
Originally posted by Goober5000
:wtf:

But why does the bug only show up in recent fs2_open builds?


Bobboau made some changes to the warp model code, IIRC, to allow custom warp POFs.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
try this
Code: [Select]

extern int wm;
void model_free_all()
{
int i;

if ( !model_initted) {
model_init();
return;
}

mprintf(( "Freeing all existing models...\n" ));

for (i=0;i model_unload(i);
}
wm=-1;
}
« Last Edit: December 10, 2002, 05:39:15 pm by 31 »
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I think I fixed it
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

  
Yep, its fixed :)   The case I mention above works now and I haven't had a trap since.

Thanks!