bugFreeciv - Bugs: bug #20493, utype_by_number() returns invalid...

 
 
Show feedback again

bug #20493: utype_by_number() returns invalid pointer

Submitted by:  pepeto <pepeto>
Submitted on:  Sun 10 Feb 2013 11:57:52 AM UTC  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: pepeto <pepeto>Open/Closed: Closed
Release: S2_1, S2_2, S2_3, S2_4, trunkOperating System: None
Planned Release: 2.4.0, 2.5.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 15 Feb 2013 12:34:11 PM UTC, SVN revision 22335:

Make utype_by_number(utype_count()) returning a NULL pointer.

See gna bug #20493

(Browse SVN revision 22335)

pepeto <pepeto>
Project MemberIn charge of this item.
Fri 15 Feb 2013 12:34:07 PM UTC, SVN revision 22334:

Make utype_by_number(utype_count()) returning a NULL pointer.

See gna bug #20493

(Browse SVN revision 22334)

pepeto <pepeto>
Project MemberIn charge of this item.
Sun 10 Feb 2013 11:57:52 AM UTC, original submission:

Still when I was working on the network protocol, I experienced a crash (SEGFAULT after many failed assertions) due to my changes (notably replacing "(UnitTypeId) (unit8) -1" by "unit_count()".

Since r10762 for PR#13513, utype_by_number(game.control.num_unit_types) returns a pointer != NULL.

Fix attached.

pepeto <pepeto>
Project MemberIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #17170:  utype_by_number.diff added by pepeto (505B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one

Digest:
   patch dependencies.

 

Carbon-Copy List
  • -unavailable- added by pepeto (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 15 Feb 2013 12:35:22 PM UTCpepetoStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
      Planned Release2.1.10, 2.2.8, 2.3.4, 2.4.0, 2.5.0=>2.4.0, 2.5.0
    Wed 13 Feb 2013 05:09:45 PM UTCpepetoAssigned toNone=>pepeto
      Planned Release=>2.1.10, 2.2.8, 2.3.4, 2.4.0, 2.5.0
    Sun 10 Feb 2013 11:57:52 AM UTCpepetoAttached File-=>Added utype_by_number.diff, #17170
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup