Page 1 of 1

NPC of doom

Posted: Mon Mar 24, 2003 6:50 am
by Karlos
I created a new NPC via Studio in my new game world, but I am unable to click on her without crashing Exult. This occurs regardless of whether I click on her in game mode or editing mode. My debugging tells me that the actual crash occurs in libc, but is triggered from get_npc_name. I believe my NPC has a name ("Alica"), but there's no way to check now. Here's the actual line that causes the crash:

objnames.cc, line 755: if(strchr(name, '/') == 0)

If I try to print the name string from gdb prior to the crash, I get:

$1 = 0x11

I guess somehow Exult is passing a bad pointer to the strchr function? Any ideas on why this is happening with this NPC and how to fix it? Thanks in advance for any suggestions.


-Karl

Re: NPC of doom

Posted: Mon Mar 24, 2003 8:24 am
by drcode
Sounds like an Exult bug involving setting the name. I'll try to duplicate this tonight.

Re: NPC of doom

Posted: Mon Mar 24, 2003 9:43 am
by Karlos
I did more testing, and discovered that this problem seems to depend on what shape I use. When I create an NPC with SI's shape #1015, I can duplicate this problem, but when I created one with shape #766 with the same name and properties, it worked fine.

More details just to confuse matters: I did the same experiment in SI itself, and couldn't duplicate the problem. Another possibly revevant factor is that object names do not show up in my custom game. E.g., in SI, if I click on the new NPC I just created, the caption says "woman". This doesn't happen for any of the objects in my custom game.

After writing this post, I went and tried something else: I created another NPC with shape #1015, but set the "met" flag. Clicking on the new NPC does not crash Exult, and the caption with her name shows correctly.

I guess it's a combination of the fact that the object name is null and something to do with the shape number that is triggering the crash.



-Karl

Re: NPC of doom

Posted: Tue Mar 25, 2003 5:46 am
by Karlos
I've summarized my findings in a bug report:

https://sourceforge.net/tracker/index.p ... tid=102335

This isn't a show-stopper for me, since I'm just usinga different shape number for now to avoid the problem.


-Karl

Re: NPC of doom

Posted: Tue Mar 25, 2003 12:17 pm
by Dominus
happy bug-searching. I'm happy someone is really working on and trying to make a game with ES. All those bugs need to be found and fixed.
great work!

Re: NPC of doom

Posted: Tue Mar 25, 2003 1:18 pm
by Karlos
Well, my job is the easier one, since I'm not the one who has to fix them. ;-)

Seriously though, I've had a lot of fun working on this project despite the bugs, and everyone has been quite helpful answering any questions I had along the way.


-Karl

Re: NPC of doom

Posted: Tue Mar 25, 2003 11:05 pm
by drcode
Here's a workaround: Double click the shape (1015) in the shape-viewer and give it a name; then save. That will cause the 'text.flx' to be updated (which was the problem). You might have to restart Exult.

Re: NPC of doom

Posted: Wed Mar 26, 2003 4:44 am
by Karlos
Okay, that worked. My problem was that the text.flx that I had copied from SI was in my static directory instead of my patch directory. Naming the object worked, as did copying the text.flx to the right place.


-Karl