New OLC Craft System

More
5 years 11 months ago - 5 years 11 months ago #609 by Papaya Pete
Replied by Papaya Pete on topic New OLC Craft System
So I've been testing it out a little and I found out when it crashes. It's only after the ingredients for a recipe are set. When the item recipe is first created, it saves properly, but if I try to modify an existing recipe it doesn't save properly. I'm also unable to delete existing recipes. Hope this helps!

Edit:

So it looks like the issue might be with this loop right here...
if (craft->requirements->iSize) {
    for(r = (struct requirement_data *) merge_iterator(&Iterator, craft->requirements);
          r;
           r = next_in_list(&Iterator)) {
      remove_from_list(r, craft->requirements);
      free(r);
    }

Since this is dealing with the required ingredients for a crafting recipe. Hmmm.
Last edit: 5 years 11 months ago by Papaya Pete.

Please Log in or Create an account to join the conversation.

  • Vatiken
  • Vatiken's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • tbaMUD Programmer
More
5 years 11 months ago #621 by Vatiken
Replied by Vatiken on topic New OLC Craft System
Try that...
if (craft->requirements->iSize) {
    for(r = (struct requirement_data *) merge_iterator(&Iterator, craft->requirements);
          r;
-          r = next_in_list(&Iterator)) {
+          r = (struct requirement_data *) next_in_list(&Iterator)) { 
      remove_from_list(r, craft->requirements);
      free(r);
    }

tbaMUD developer/programmer

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago #622 by Papaya Pete
Replied by Papaya Pete on topic New OLC Craft System
Hmmm, I made that change... still crashing after trying to modify existing crafts or attempting to delete existing recipes.

Please Log in or Create an account to join the conversation.

  • Vatiken
  • Vatiken's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • tbaMUD Programmer
More
5 years 11 months ago #636 by Vatiken
Replied by Vatiken on topic New OLC Craft System
I believe your crash is a result of free_craft() attempting to free something that doesn't exist. Which is quite odd since no one else, including myself, has seen/reported this issue before. My first guess is this probably is a compatibility issue that is appearing due to you using windows and cygwin to compile/run the code. Nevertheless, the next step in debugging this problem is to figure out if the requirement data is actually being loaded properly or not.

Please post (in code tags) a screen capture of show craft, show craft "item" if you can, your crafts file, and as much gdb data as possible from the crash.

Screen Cap Example:
Crafts: 
ID  ) Name                       VNUM   Item Name 
1   ) Steel Ingot            -> [1001] [a steel ingot] 
2   ) Lumber                 -> [1005] [a piece of lumber] 
5   ) Iron Ingot             -> [1003] [an iron ingot] 
100 ) recipe, basic staff    -> [539 ] [a crafted staff] 
Craft: Steel Ingot, (1) 
Makes: a steel ingot! 
Time: 3 
Req: some raw steel (5 ) In Inventory Remove 
Req: a furnace  (1 ) In Room No Remove 

tbaMUD developer/programmer

Please Log in or Create an account to join the conversation.

More
5 years 9 months ago #831 by Papaya Pete
Replied by Papaya Pete on topic New OLC Craft System
Alright, well, first of all I have to apologize for taking so long to do as you requested. I had to take a break and wanted to talk with a friend of mine to see what he could spot, since he's much more experience than I am. So... here is the result of using "show craft" and "show craft <craft>":
i34 500H 100M 82V > 
show crafts
Crafts:
ID  ) Name                       VNUM   Item Name
100 ) Weak Healing Potion    -> [103 ] [a light blue potion]
101 ) Healing Potion         -> [104 ] [a blue potion]

i34 500H 100M 82V > 
show crafts weak healing potion
Craft: Weak Healing Potion, (100)
Makes: a light blue potion!
Time: 5
Req: some delicious blueberries (1 ) In Inventory Remove
Req: some queenswrap (1 ) In Inventory Remove

i34 500H 100M 82V > 
show crafts Healing Potion
Craft: Healing Potion, (101)
Makes: a blue potion!
Time: 5
Req: some delicious blueberries (1 ) In Inventory Remove
Req: some kingsfoil (1 ) In Inventory Remove

i34 500H 100M 82V >

Now... here's the problem we ran into. We were trying to use gdb, and this is the result that we kept getting:
warning: core file may not match specified executable file.
[New Thread 0x1]
[New process 1]
[New process 1]
[New process 1]
[New process 1]
[New process 1]
[New process 1]
[New process 1]
[New process 1]
[New process 1]
#0 0x77b9f8b1 in ntdll!RtlUpdateClonedSRWLock ()
   from c:\Windows\SysWOW64\ntdll.dll
(gdb) bt
#0 0x77b9f8b1 in ntdll!RtlUpdateClonedSRWLock ()
   from c:\Windows\SysWOW64\ntdll.dll
#1 0x77b9f8b1 in ntdll!RtlUpdateClonedSRWLock ()
   from c:\Windows\SysWOW64\ntdll.dll
#2 0x76fa0a91 in WaitForSingleObjectEx ()
   from C:\Windows\syswow64\KERNELBASE.dll
warning: (Internal error: pc 0x2db in read in psymtab, but not in symtab.)
warning: (Internal error: pc 0x2db in read in psymtab, but not in symtab.)

#3 0x000002dc in ?? ()
warning: (Internal error: pc 0x2db in read in psymtab, but not in symtab.)

#4 0x00000000 in ?? ()

So the first thing he noticed was that the core file was not matching with the .exe file, when it should of. So for some reason that eludes us, gdb is not properly reading the core dump file. Has thing kind of thing happened to anyone else?

Please Log in or Create an account to join the conversation.

  • Vatiken
  • Vatiken's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • tbaMUD Programmer
More
5 years 9 months ago - 5 years 9 months ago #832 by Vatiken
Replied by Vatiken on topic New OLC Craft System
Don't have enough time at the moment to scroll back over this completely but I'll try when I get home later. With regards to the GDB message: "warning: core file may not match specified executable file."

This might be a result of either:
a) inputing the incorrect path in for the binary executable OR
b) an outdated core file (If you've recompiled since the core dump then GDB will complain since the executable that created the core dump will be different then the one you are using to read the dump)

tbaMUD developer/programmer
Last edit: 5 years 9 months ago by Vatiken.

Please Log in or Create an account to join the conversation.

More
5 years 9 months ago #835 by Papaya Pete
Replied by Papaya Pete on topic New OLC Craft System

This might be a result of either:
a) inputing the incorrect path in for the binary executable OR
b) an outdated core file (If you've recompiled since the core dump then GDB will complain since the executable that created the core dump will be different then the one you are using to read the dump)


We actually double-checked both of those possible problems, he was thinking the same thing. It's real puzzling, since it seems like we have the correct path and the core file was updated.

Please Log in or Create an account to join the conversation.

  • Vatiken
  • Vatiken's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • tbaMUD Programmer
More
5 years 9 months ago #836 by Vatiken
Replied by Vatiken on topic New OLC Craft System
Everything I've read (about the GDB error/warning) suggests the issue is related to one of the reasons i've already submitted. What happens when you cause the crash while running the program in GDB?

tbaMUD developer/programmer

Please Log in or Create an account to join the conversation.

More
5 years 9 months ago #838 by Papaya Pete
Replied by Papaya Pete on topic New OLC Craft System
I tried running it in gdb like you said. It gave me the same kind of errors as before (it's really really irritating how I can't copy text directly off of CYGWIN!), and backtrace just gives me the same kind of nonsense as above. Hmmm. Maybe I should go for a clean install of CYGWIN or something... though I'll have to refigure out what I need and don't need.

Please Log in or Create an account to join the conversation.

More
4 months 3 weeks ago #7625 by Sascha
Replied by Sascha on topic New OLC Craft System
So I'm wondering...

Were the crash causes ever hammered out? Is there a reason this isn't released in stock? I was quite interested in this a year ago, and one of my builders brought it to my attention again this morning, so I thought I'd bump it up and get some more info on its history/progress/implementation.

Dovie'andi se tovya sagain. After the Breaking MUD, now in beta testing...

Please Log in or Create an account to join the conversation.

  • Vatiken
  • Vatiken's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • tbaMUD Programmer
More
4 months 3 weeks ago #7626 by Vatiken
Replied by Vatiken on topic New OLC Craft System
Although I'm sure there is a bug or two somewhere, the system was stable. To my knowledge only 1 person reported a crash and it was on a Windows machine and may not have been related to the craft system at all.

I had built it for tbaMUD and then used it in my own MUD extensively and never had any issues.

While the code is 5 years old now it should still be a pretty simple patch into stock tba.

tbaMUD developer/programmer

Please Log in or Create an account to join the conversation.

More
4 months 3 weeks ago #7629 by Sascha
Replied by Sascha on topic New OLC Craft System
Thanks for the fast reply! I'm going to go over this carefully and then see if I can get it running, for my next addition for After the Breaking.

Dovie'andi se tovya sagain. After the Breaking MUD, now in beta testing...

Please Log in or Create an account to join the conversation.

More
4 months 1 day ago - 4 months 1 day ago #7716 by Papaya Pete
Replied by Papaya Pete on topic New OLC Craft System
Regarding the crafting system crashing, it happened to me when I was using Cygwin on a Windows 7 machine. What added to the problem was not finding a way to read the stackdump file, since it was not creating a normal/proper one.

In the end I think it likely was due to a missing lib or just some oddness with Cygwin. Everything looked good, no one had any issues, so likely just a fault of mine (shock and horror, me making a mistake?!!?!?!?!?). Honestly, I would trust using it if it was something you're interested in putting into your mud.

I like the idea; crafting is probably one of the best ways to draw me into a game. However, for the story/game I had in mind, crafting probably was not one of the best ideas and can easily be exploited if not done properly.

By the way, what's your mud about and how's it coming along?
Last edit: 4 months 1 day ago by Papaya Pete.
The following user(s) said Thank You: Chime

Please Log in or Create an account to join the conversation.

More
4 months 22 hours ago #7723 by Chime
Replied by Chime on topic New OLC Craft System
Installed today and it worked right off the bat. Thank you so much for releasing it.

Please Log in or Create an account to join the conversation.

More
4 months 19 hours ago #7727 by JTP
Replied by JTP on topic New OLC Craft System
Chime..where did you find that olc craft ?

Please Log in or Create an account to join the conversation.

More
4 months 18 hours ago #7730 by Chime
Replied by Chime on topic New OLC Craft System
Here, from the Downloads section of the site (link goes straight to his crafting system):
drive.google.com/open?id=0B40XbRH2Qbx5cmdxR3RoaFR4dDA

Please Log in or Create an account to join the conversation.

Time to create page: 2.158 seconds