[Question]How to debug properly using codeblocks

How do you use the forum? Also Technical News.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Forum rules
This forum is NOT a forum where you post a technical questions about osRose, osiRose or ospRose. Use the dedicated forum for that!

[Question]How to debug properly using codeblocks

Postby Choseal on Sun Sep 06, 2009 6:43 pm

Ofcourse, every server has some bugs when they just start out, and ofcourse a good way to take out the problems is using the debug function in codeblocks.

But once you have gotten debug to work, and got your first error, what does all the information mean?

Just to save you some work, I won't ask for a whole guide on what packets are, and what all the references mean, but I would like to know the following, in this error:

Image

Where can I see what quest is bugged, or whatever is causing the problem, or how do I find out?

Thank you for reading this, and thank you in advance! =D
Choseal
Electric Ghost
Electric Ghost
 
Posts: 837
Joined: Fri Jan 09, 2009 6:40 pm

Re: [Question]How to debug properly using codeblocks

Postby lmame on Sun Sep 06, 2009 8:03 pm

Call stack means the list of functions called, in reverse order (first line is the latest called, so where it crashed).
The yellow / red arrow shows the line where it crashed.
You can add watches (see debug menu to display it) to see variables values, for example to display variables "slot", and "data->nDupCNT" (right click on watches and add).

Though if you're not used, the best way is to tell indeed and show where it bugged, and what you did so I (or another developer) can reproduce the bug and solve it since we're more used to osRose, and it could help other people as well.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Question]How to debug properly using codeblocks

Postby lmame on Sun Sep 06, 2009 8:10 pm

It seems it's quest 2754-02 (Quest 2754 (A Good Deed for Burtland (1))).
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Question]How to debug properly using codeblocks

Postby Choseal on Sun Sep 06, 2009 10:55 pm

Wow, that's great, you taught me a lot, thanks! =D

One more thing though, how did you know which quest it was, so I can check it myself if it ever happens again?
Choseal
Electric Ghost
Electric Ghost
 
Posts: 837
Joined: Fri Jan 09, 2009 6:40 pm

Re: [Question]How to debug properly using codeblocks

Postby lmame on Sun Sep 06, 2009 10:57 pm

The Pakgivequest, it's the questid.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Question]How to debug properly using codeblocks

Postby Choseal on Sun Sep 06, 2009 11:01 pm

Great, thanks. :3
Choseal
Electric Ghost
Electric Ghost
 
Posts: 837
Joined: Fri Jan 09, 2009 6:40 pm

Re: [Question]How to debug properly using codeblocks

Postby lmame on Sun Sep 06, 2009 11:07 pm

If a quest fails, please write a bug report...
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Question]How to debug properly using codeblocks

Postby Choseal on Mon Sep 07, 2009 11:31 am

A player was doing that quest, so I have to find it first. :P
Choseal
Electric Ghost
Electric Ghost
 
Posts: 837
Joined: Fri Jan 09, 2009 6:40 pm

Re: [Question]How to debug properly using codeblocks

Postby lmame on Mon Sep 07, 2009 11:49 am

Ok.
You know you can use the mass exporter from dev rev to easily find those informations, right?

  1.      Block 43 / 49 :: 12 Functions
  2.      {
  3.          Function 1 / 12 (2754-02 / 269978540) :: 4 conditions, 7 actions
  4.              <If Function 2754-02 returns False, we'll check the next Function (check_next activated)>
  5.          {
  6.              Conditions (4)
  7.              {
  8.                      CDT 000: Check if Quest 2754 (A Good Deed for Burtland (1)) exists
  9.                      CDT 004: Check 1 Player's items
  10.                          |-> Check Item 12045 (12:45,  Tender Leather) >= 200
  11.                      CDT 004: Check 1 Player's items
  12.                          |-> Check Item 12009 (12:9,  Tiar) >= 400
  13.                      CDT 004: Check 1 Player's items
  14.                          |-> Check Item 12163 (12:163,  Red Crystal) >= 20
  15.              }
  16.              Actions (7)
  17.              {
  18.                      ACT 000: select quest 2754 (A Good Deed for Burtland (1))
  19.                      ACT 001: current quest: delete 200 items 12045 (12:45,  Tender Leather)
  20.                      ACT 001: current quest: delete 400 items 12009 (12:9,  Tiar)
  21.                      ACT 001: current quest: delete 20 items 12163 (12:163,  Red Crystal)
  22.                      ACT 000: delete quest 2754 (A Good Deed for Burtland (1))
  23.                      ACT 025: Clan Points -= 10000
  24.                      ACT 023: Raise clan grade (+1) (NOT FULLY CODED)
  25.              }
  26.          
  27.          }
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Question]How to debug properly using codeblocks

Postby Choseal on Mon Sep 07, 2009 2:24 pm

I had no idea, never heard about it. o.o

Do I just set lma_export to true?
And where does it save the "File/log/thingy"?
Choseal
Electric Ghost
Electric Ghost
 
Posts: 837
Joined: Fri Jan 09, 2009 6:40 pm

Next

Return to Some Help / News

Who is online

Users browsing this forum: No registered users and 5 guests

cron