About Store Forum Documentation Contact



Post Reply 
[bug] game can't load because of TextDS in DrawGame
Author Message
Harry Offline
Member

Post: #1
[bug] game can't load because of TextDS in DrawGame
Hi, I downoladed the latest version of engine and after rebuild, start and load game i get an error Unhandled exception at 0x007c9e4f in Forest Valley.exe: 0xC0000005: Access violation reading location 0xfc440b3c.

Green arrow shows this place:

TextDS ds;
ds.font =&font;
ds.scale=Vec2(0.07);

ind DrawGame. Text from call stack:

> Forest Valley.exe!DrawGame() Line 687 C++
Forest Valley.exe!EE::DrawStateW() + 0xa5 bytes C++
Forest Valley.exe!EE::Application::loop() + 0xee bytes C++
Forest Valley.exe!_WinMain@16() + 0x22 bytes C++
Forest Valley.exe!__tmainCRTStartup() Line 263 + 0x1b bytes C
(This post was last modified: 03-24-2011 11:22 PM by Harry.)
03-24-2011 11:21 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: [bug] game can't load because of TextDS in DrawGame
Please post some more code. Maybe problem is line above
03-25-2011 06:51 AM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #3
RE: [bug] game can't load because of TextDS in DrawGame
Code:
static void DrawGame()
{
    if(BL.draw())return; // this needs to be at the start of 'Draw' function
    
    // set field of view
    D.viewFov(DegToRad(Lerp(75,30,zoom)));
    
    Renderer(Render);

It's all above TextDS ds. And here is Render function:

Code:
static void Render()
{
   Game::World.draw(); // draw world (this is done outside of 'switch(Rndr())' because world automatically detects active rendering mode)

   switch(Renderer())
   {
      case RM_PREPARE:
      case RM_SOLID  :
      case RM_AMBIENT: REPAO(Bullets).draw(); break;
   }
  
   switch(Renderer())
   {

   case RM_PREPARE:
       {
           if(lkb_bool)
           {
               LightCone bulb(20,bulbPos,bulbDir,Vec(1,1,1),0.01);
               bulb.add();
           }
       }
       break;

   case RM_BLEND: // alpha blending
       blood.draw(); // draw Blood Effect in Alpha Blending mode
       smokPart.draw();
       explosion.draw(); // draw Explosion Effect in the same modes as Particles are drawn
       rain.draw();
       mission.draw();
       //FogDraw(OBox(Box(D.viewRange(),D.viewRange(),D.viewRange(),Cam.matrix.pos)),0.8,​Vec(0.6));
       break;

   case RM_PALETTE:
       shotPart.draw();
       explosion.draw(); // draw Explosion Effect in the same modes as Particles are drawn
       break;
   }
}
03-25-2011 11:45 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
RE: [bug] game can't load because of TextDS in DrawGame
TextDS doesn't have anything special, it's plain struct, with few members.
maybe you have bug somewhere else.
Can you post screen of VS with the issue, call stack, etc.

can you do "run to cursor" to "TextDS ds;" line,
and step line by line and check if it actually occurs in that place?
03-25-2011 12:01 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #5
RE: [bug] game can't load because of TextDS in DrawGame
When I did Run to Cursor at TextDS I have the same. I didn't have even yellow arrow which should show. I put another function between TexdDS ds; and Renderer(Render); and green arrow and error points to this function. So I tried to look inside Renred function. Game started when I comment Game::World.draw(); So I thought that it could be becuase I didn't rebuild world. So in Editor I loaded my world and when I move camera closer to terrain I get an error with application (Editor.exe don't response)


Attached File(s) Image(s)
   
03-25-2011 12:30 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
RE: [bug] game can't load because of TextDS in DrawGame
you're not showing full call stack, please scroll it to the top.
most likely the error is inside Renderer(..) line above, and not TextDS

I've just tested Editor.exe for loading/building/previewing world from Esenthel RPG2 (no errors)
03-25-2011 12:55 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #7
RE: [bug] game can't load because of TextDS in DrawGame
Here is whole Call Stack.


Attached File(s) Image(s)
   
03-25-2011 11:49 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #8
RE: [bug] game can't load because of TextDS in DrawGame
it seems to be related to a change I did last time.
Could you send me minimum amount of data (models+world) that cause the Editor to crash? so I can investigate this.
03-26-2011 02:53 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #9
RE: [bug] game can't load because of TextDS in DrawGame
I sent it to PM.
03-26-2011 06:36 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #10
RE: [bug] game can't load because of TextDS in DrawGame
Thanks, Im checking this
03-26-2011 06:40 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #11
RE: [bug] game can't load because of TextDS in DrawGame
I discovered one bug, although I couldn't reproduce the error with your data, I tested with some of my other worlds.
I will upload this in few moments, once it's ready please let me know if it's working ok for you too.
03-26-2011 07:12 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #12
RE: [bug] game can't load because of TextDS in DrawGame
autoupdate is ready, 7z will be in few minutes
03-26-2011 07:20 PM
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #13
RE: [bug] game can't load because of TextDS in DrawGame
Thank you very much. Now everything is ok. I saw that in Version History you wrote that problem was with grass, but when I move camera closer to grass/plants or only terrain everything was ok. But only when on field of view showed other models Editor broke.
03-26-2011 08:04 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply