Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Google

Members: 0
Guests: 5
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWFOTE FUSS » after using makeplanet typing...
Forum Rules | Mark all | Recent Posts

after using makeplanet typing planets crashes the MUD /help!/
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Mar 24, 2010, 2:21 am
Go to the top of the page
Go to the bottom of the page

Tyler-yo
Fledgling
GroupMembers
Posts4
JoinedMar 24, 2010

Hi I recently started using swfote 2.1 and it was running great till I tried making a new planet.

After typing makeplanet earth, when I type planets it does an emergency copyover, then when I makeplanet again and type planets it crashes.

I was wondering if anyone else has had this problem or knows how I could go about fixing it.
       
Post is unread #2 Mar 24, 2010, 2:33 am
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

Besure to setplanet after make planet. Its a pretty common bug that it crashes when it tries to call the planet list. Once everything is set to the planet (ie star system area x y z pos) it should be safe to view the planet list.

If I recall the problem comes from the fact that the planet isn't set to a star system and planets pukes on that fact.

Could be wrong,
ayuri
       
Post is unread #3 Mar 24, 2010, 2:56 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Well that sounds like a pretty buggy thing to have happen. Making a planet should at the very least create dummy data to keep from crashing the game.
       
Post is unread #4 Mar 24, 2010, 4:09 am   Last edited Mar 24, 2010, 4:12 am by ayuri
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

Did a quick test on my game:
Died in this block of planets.c:
    for ( planet = first_planet; planet; planet = planet->next )
    {
        if ( planet->starsystem )
            continue;

        ch_printf( ch, "&G%-15s %-12s  %-25s    ",
                planet->name , "",
                planet->governed_by ? planet->governed_by->name : "" );
        ch_printf( ch, "%.1f\n\r", 
                !str_cmp(planet->governed_by->name, "Neutral";) ? 100.0 : planet->pop_support );
        if ( IS_IMMORTAL(ch) && !planet->area )
        {
            ch_printf( ch, "&RWarning - this planet is not attached to an area!&G";);
            ch_printf( ch, "\n\r" );
        }

        count++;
    }

To be exact it died here with my gdb output.
        ch_printf( ch, "%.1f\n\r",
                !str_cmp(planet->governed_by->name, "Neutral";) ? 100.0 : planet->pop_support );


Again, just guessing. I've been up for a few too many hours, can't see the screen all that clearly.
And output from my gdb if anyone cares:
#0 0x0817382c in do_planets (ch=0x8c3dd58, argument=0xbfd5b4e7 "";) at planets.c:912
#1 0x0813812c in interpret (ch=0x8c3dd58, argument=0xbfd5b4e7 "";) at interp.c:427
#2 0x080e66d0 in game_loop () at comm.c:670
#3 0x080e5806 in main (argc=5, argv=0xbfd5bdb4) at comm.c:269

The ch_printf( ch, "%.1f\n\r", is line 912 btw.

Hope this helps some and standard disclaimer this has not been tested on the swfotefuss branch. This is on a non-fuss codebase.
ayuri
       
Post is unread #5 Mar 24, 2010, 2:10 pm
Go to the top of the page
Go to the bottom of the page

Keberus
Conjurer
GroupFUSS Project Team
Posts341
JoinedJun 4, 2005

Looks like it's because you try to access data that is null here:
        ch_printf( ch, "%.1f\n\r", 
                !str_cmp(planet->governed_by->name, "Neutral";) ? 100.0 : planet->pop_support );


I would change that to look more like:
        ch_printf( ch, "%.1f\n\r", 
                planet->governed_by ? ( !str_cmp(planet->governed_by->name, "Neutral";) ? 100.0 : planet->pop_support) : 0 );


Which would make the planet report a 0 pop support if it doesn't have a governing clan set.

Or you could just set the governing clan to "Neutral" in makeplanet.

Change:
    planet->governed_by = NULL;


To:
    planet->governed_by = get_clan( "Neutral" );


Or: handle it like FUSS does, which removes the governed_by check completely so the code is:
        ch_printf( ch, "%.1f\n\r", planet->pop_support );


Pick your poison, any of the 3 should fix your problem. After thinking about it, FUSS's way is probably the best, in case you ever were to remove the Neutral clan.

Later,
KeB

       
Post is unread #6 Mar 24, 2010, 11:50 pm
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

I agree, doing it the FUSS way is the way to go. Much nicer since I'm guessing a majority of people don't know about the Neutral clan.

ayuri
       
Post is unread #7 Mar 25, 2010, 12:55 am
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

I should point out, that you want to use the swfotefuss 1.4a not 1.4. The first release of 1.4 I think was using the broken code. I could be mistaken if my tarballs got mixed up.

ayuri
       
Post is unread #8 Mar 25, 2010, 4:42 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

There's a SWFotEFUSS 1.4a?
       
Post is unread #9 Mar 25, 2010, 9:01 pm   Last edited Mar 25, 2010, 9:07 pm by ayuri
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

I'm sorry, I should have been more clear - been pullin some long nights at work lately. After your most recent update of 1.4. I think there were two revisions (?) of 1.4. I downloaded the first release before some other bugs were fixed in the trunk - whatever you guys use.

**EDIT I seen that it has had 16 revisions since release. Sorry, I'm just used to adding revision data to release. Like with 16 revisions so far it would be 1.4p. If I remember correctly, the first initial release of 1.4 didn't have that fix. The next version I downloaded did. However, I didn't keep any data as to what revision it was when I downloaded it again.

ayuri
       
Post is unread #10 Mar 25, 2010, 9:11 pm
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

Oh.

All prior versions without fixes disappear when a new copy of the base is posted for that version number.
       
Post is unread #11 Mar 25, 2010, 10:41 pm
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

Ahh, nifty. Sorry for any confusion it may have caused. I sometimes pay very little attention to things like that.

ayuri
       
Pages:<< prev 1 next >>