Author Topic: code/lab/wmcgui.cpp assertion error  (Read 1873 times)

0 Members and 1 Guest are viewing this topic.

code/lab/wmcgui.cpp assertion error
I don't know what caused it, since I don't know what the code is trying to do, but when loading up the lab with a debug build I always got an assertion error
from within a vector class because the index was out of bounds (the vector was empty).

Since the code is trying to access the first element to get the starting address of the vector (bad bad thing to do without checking the vector first) this caused the assertion.

I changed the code to do the length check first and only try to get the address of the vector if it actually contains any elements (otherwise the entire function is not doing anything anyway).

Patch attached.

[attachment deleted by MSC

  
Re: code/lab/wmcgui.cpp assertion error
Anyone?

 
Re: code/lab/wmcgui.cpp assertion error
can someone from SCP please comment on this and either confirm or discard it? If this is an issue not just on my PC it needs to be put into trunk.

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: code/lab/wmcgui.cpp assertion error
I saw this as well. Seems to be fixed in the latest svn revision.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: code/lab/wmcgui.cpp assertion error
I have a feeling this was related to the FRED crashiness and other strange happenings between 5358 and 5387.  As he pointed out, it should be fixed now.  Some debugging features were accidentally enabled (I do wonder if this is related to the Ubuntu crashing though).
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: code/lab/wmcgui.cpp assertion error
(I do wonder if this is related to the Ubuntu crashing though).

I'm still 99% sure that we're overrunning buffers (I was kinda asleep while kara was going through the parselo stuff last night :P )
STRONGTEA. Why can't the x86 be sane?

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: code/lab/wmcgui.cpp assertion error
I'm 100% sure that we are overrunning buffers.  I know which buffers we're overrunning too, to some extent.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays