Th3Ya0vi / vdrift-ogre

Automatically exported from code.google.com/p/vdrift-ogre
0 stars 0 forks source link

Minimap, championship stage image, track preview crash #175

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. load a track (e.g. D1)
2. start a championship (e.g. Tutorial Basic)

The minimap will still show the terrain and road of the track that you played 
previously.

Original issue reported on code.google.com by scrawl...@gmail.com on 2 Aug 2012 at 4:38

GoogleCodeExporter commented 8 years ago

Original comment by Cry...@gmail.com on 3 Aug 2012 at 5:32

GoogleCodeExporter commented 8 years ago
OK should be fixed now, but there is another freaking stupid issue here.
Scrawl? or anyone who understands Ogre's resource methods (not me) please look 
at it.

1st issue:
Check out the code in Gui_CommonTrack.cpp under line 498  //  preview images
is it good ? can it be made working in other way ?
If you remove here resMgr.unloadResourceGroup(sGrp); you get a run out of 
memory crash: load track F12 and on gui track tab go through all tracks, they 
are loaded and not freed.
2nd issue.
Similar code is in HudCreate.cpp under line 140  ///  reload mini textures
if you add resMgr.unloadResourceGroup(sGrp); there it will crash: pick a 
championship in gui, pick a stage on next tab and on next tab track should see 
its previews, pressing alt-Q (going to Track tab in single player) crashes.
There is also in Gui_Network.cpp line 134.

Problem started since all tracks have same name preview images: 
view,terrain,road.
But surely we want it, all is in track's dir. Don't tell me we need to rename 
it to be unique for every track because Ogre, textures or Mygui won't get it..

Original comment by Cry...@gmail.com on 5 Aug 2012 at 10:07

GoogleCodeExporter commented 8 years ago
I found this
http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Loading+Image+from+Disk
maybe it could work.

Original comment by Cry...@gmail.com on 22 Aug 2012 at 5:07

GoogleCodeExporter commented 8 years ago
Just needed separate resource group names for championship/Single Race track 
previews.
Fixed.

Original comment by Cry...@gmail.com on 30 Aug 2012 at 3:27