Author Topic: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe  (Read 5474 times)

0 Members and 1 Guest are viewing this topic.

A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
I'm experiencing several access violation crashes with this build. I think it happens somehow related to persona messages (which play correctly though). I'm not exactly sure though, since even the Debug build doesn't report anything but what's in the error log, which I attach here.

Any idea what this could be?

[attachment has decomposed]

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
You don't get anything when debugging?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
The Debug build just crashes like any other. It doesn't give me an option to jump to an IDE for debuggin, it just crashes.

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
If you're asking me whether I get anything when running from inside the IDE.. I have no idea how to run FS_Open from inside the IDE and use a specific working directiory to run in to be honest.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
In that case it makes more sense to explain how.

Simply compile a build yourself and make sure it is already in your WCS folder (If you've set the environment variable it will do that automatically. If you don't know how, just ask) . Once you're done click on either the Freespace or FRED project in the solution explorer window and choose properties. Select Debugging. In Command select browse and find the exe. Command Arguments is the command line you want (You'll only need this for FRED since FS2 loads it in from the .cfg file).

Okay out of there and then simply select Debugging->Start Debugging from the menu. You might want to add the debugging toolbar to the ones visible if it doesn't show up as being able breakpoint the code near the critical section and step through the code a single line at a time makes it very easy to find the cause of bugs and should be something you use often.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
Doesn't really help. It still just freezes. VS also just tells me that there is an access violation. It halts at the render_all function but I don't see any problems there or how a wrong address could be there somewhere. All that thing does is provide a render function pointer and a boolean value. the halting also doesn't really tell WHERE the access violation happens.

This crash is also nearly impossible to reproduce and seems to happen very much at random... I'm at a loss here how to find out what's causing this.

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
The debugger halts exactly where the access violation occurs (if you've got it attached correctly).

I can't find a function called render_all. The VS callstack information is really important if this kind of error is occurring (Debug->Windows->CallStack, or it's present on a tab somewhere in your environment)

If we're going to debug this, we need a lot more information, e.g. a screenshot of VS or how you're causing this crash so that we can reproduce it.
STRONGTEA. Why can't the x86 be sane?

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
I'm busy at the moment, I'll try again later.

It does halt somewhere yes (I'll get the exact function name again). but I don't see any place where this could cause any access violation because it doesn't access anything.

As for reproducing it... I'm not causing it at all.. as I said, it appears quite randomly somehow.

I'll try to narrow it down a bit more...

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
When it halts make sure that you turn on the View Call Stack options (it should be a tab at the bottom of the IDE). That will show you the exact chain of events that led to the crash.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
I still can't make heads or tails of this. But here's the data I managed to collect. I can confirm that it always crashes at exactly this position but I have no way to reproduce it easily.
I also have no idea what exactly in this code could cause an Access Violation. It's just a function call, isn't it?

[attachment has decomposed]

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
Are you sure that you're debugging the source against EXACTLY the same executable? That would cause the errors we're seeing here.
Also, debugging a release version would give you the results you're seeing here

You really need to cause this problem with a debug version before you can get meaningful results in the debugger.
STRONGTEA. Why can't the x86 be sane?

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
Sigh, forgot to set it to compile the Debug version... back to it later. (I'm debugging the exact same build yes, just compiled Retail instead of Debug, forgot to set that in the IDE)

It doesn't help that Freespace keeps the mouse focus and I have to work with keyboard shortcuts in VS.

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
Hmm, seems to be the shield-explosion rendering code... Some vertex pointer is a problem it seems. I can't find anything wrong with the model's shield however.
Does anyone find an error in here somewhere? Call stack is in the screenshots, the problematic value is marked.

[attachment has decomposed]

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
You're cutting off more than half of the callstack in your screen shots.
My guess (because I can't confirm without seeing the second half of the callstack - horizontally) is that the second screen shot will show you that 'sv' is NULL.
STRONGTEA. Why can't the x86 be sane?

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
That may very well be. And sorry for the layout but I cannot change the window layout since I don't get my mouse back. FS keeps the mouse focus so there's very little I can do inside VS during debugging once FS has crashed.

Anyone got an idea how I can get my mouse back? I can only get it for the task bar, As soon as I enter application area the mouse is not only invisible but also it is not possible to click on anything (that way I could at least guess the mouse position, but as I said it is not there at all).

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
hmmm... I knew there was something fishy - the scrollbar is down the bottom of the collection of images, so it's a real pain to scroll around.

Anyway, I'm still going with the bet that sv is NULL, as for how to debug that, I'm not sure - I debug on a second monitor, and I've not had problems with mouse capture before.
STRONGTEA. Why can't the x86 be sane?

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
Well not everyone has a second monitor. I'm also not saying that I cannot debug if I simply pause and go to VS via Alt-TAB, but once the game crashes Alt-TAB doesn't work anymore and I need to go to the main logon screen of vista to start the task manager to even get back to my normal desktop. And there I don't have mouse focus, since that one is still captured and not released by the game. This makes it near impossible to really debug this crash.

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
Stick in if ( sv==NULL ) Int3( );

You need to develop a hypothesis, and then test it.
The Int3( ) will allow you to get your mouse focus.

Unfortunately full screen debugging on a single monitor is not a fun task :P
STRONGTEA. Why can't the x86 be sane?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
Well not everyone has a second monitor. I'm also not saying that I cannot debug if I simply pause and go to VS via Alt-TAB, but once the game crashes Alt-TAB doesn't work anymore and I need to go to the main logon screen of vista to start the task manager to even get back to my normal desktop. And there I don't have mouse focus, since that one is still captured and not released by the game. This makes it near impossible to really debug this crash.

I've seen that one before. Did you have VC6 installed on that PC at any point?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
Re: A lot of access violation crashes with fs2_open_3_6_11(r/d)-20090526_r5309.exe
I doubt it. I had it once but I'm nearly 100% sure that was before the last complete wipe and OS reinstall. I can rule that out as a cause pretty sure.
I get mouse back ok as soon as I stop debugging and FS is closed. The problem is that FS locks the mouse if it freezes until the process is killed.