UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Bug report #1898 Buffer overflow after call of confuncs
Go to the next issue (open or closed)
Go to the next open issue
There are no more issues in that direction.
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Bug report
  • Category
    Campaign
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    3. Normal
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
  • Estimated time
    Not estimated
Issue details
  • Resolution
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Complexity
    Not determined
  • Platform
    Not determined
  • Architecture
    Not determined
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/bugs/1898 Item 1898] imported from sourceforge.net tracker on 2013-01-28 19:12:13

I was spinning the time on the geoscape and the game crashed with SIGSEGV, (maybe) on a finished research. The last message(s):

Cbuf_AddText: overflow (8192) (mn_setnodeproperty bt_rs_change5 min 0
)

Program received signal SIGSEGV, Segmentation fault.


Backtrace 'full' attached. Well, I've truncated it at least 660 lines like the last one in the backtrace.

-geever
===== Comments Ported from Sourceforge =====

====== geever (2008-11-24 14:30:59) ======


====== bayo-fr (2008-11-24 14:42:22) ======

Hello,

If you have a savegame near, it is wellcome. With the new code, i lose every thing.

--bayo
====== geever (2008-11-24 15:33:12) ======

Here it is. Open the base in Africa select a research (stingray) and try stopping it.
(I couldn't reproduce it in the same way as before but this, start/stop a research seems to be a point where happens.)

Another warning:
Unknown command "researchselect6"
Cbuf_AddText: overflow (8192) (mn_setnodeproperty bt_rs_change5 current 0
)

For recovering your old saves here is a little hint: http://ufoai.ninex.info/forum/index.php?topic=2299.msg20595#msg20595

-geever

File Added: slot5.sav
====== geever (2008-11-24 21:04:44) ======

Here is a longer (non-trimmed) log, zipped as it's 2M opened.

-geever
File Added: ufolog.zip
====== geever (2008-12-04 21:17:00) ======

Ok, it doesn't crash since your fix but tons of debug messages printed, and warns about truncated commandline. Could you do something with this? (ok the first is easy but the second isn't as commands shouldn't be lost.)

cut--
mn_setnodeproperty bt_rs_change6 current 16
mn_setnodeproperty bt_rs_change6 miCbuf_AddText: overflow (8192) (mn_setnodeproperty bt_rs_change4 max 20
)
Q_vsnprintf: string (buffer content:
mn_setnodeprope...) was truncated (8182) - target buffer too small (4096)
buffer content:
mn_setnodeproperty bt_rs_change0 current 0
mn_setnodeproperty bt_rs_change0 min 0
--cut

-geever
====== bayo-fr (2008-12-05 15:36:11) ======

Can you provide me the content of overflowed buffer?

Maybe you can add some like with fopen and fprintf to copy the buffer into a file went the code find an overflow.

The content of the buffer will be very helpfull to know if (and where) its a "normal" issue (buffer too small, a bad code on the client) or a bigger problem of architecture. Anyway it maybe need to call less confunc or to reduce number of commands (cmd) into confuncs.

Thanks a lot.
====== geever (2008-12-25 23:26:02) ======

In case of RS_ResearchStop_f RS_RemoveScientist is called in a loop and did RS_InitGUI on every call. I moved the RS_InitGUI one level up (RS_ResearchStop_f and RS_RemoveScientist_f). The same was fixed with MaxOut (start research with all unassigned scientists).

Bayo, please check this.

-geever
====== geever (2008-12-30 23:08:14) ======

I can still make it overflow by using mousewheel.
maybe:
* setting 'min's are unnecessary
* shorten calls using '*node propery value' form

-geever
====== geever (2009-01-03 14:46:37) ======

By removing 'min' set the overflow fixed (close). However we may need to revisit the commandbuffer size some time.

-geever
Steps to reproduce this issue
Nothing entered.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif