[FIXED] Database Bugs

I'm sure there will be a TON of bugs discovered. List them here and we will cross them off the list as they are fixed.

[FIXED] Database Bugs

Postby adosorken on Wed Aug 24, 2016 11:38 pm

I posted this in the other thread, though I probably should have just posted it here, but hey, because reasons, I didn't. Ah well. :D

Anyway... both Database/list_objects.sql and Database/list_respawnzones.sql contain SQL errors in regards to 'id'. I've updated the former but the latter will take some work.

http://silkrose.eponasoft.com/list_objects.7z
Last edited by adosorken on Sun Aug 28, 2016 2:32 pm, edited 1 time in total.
Evolve this!!
User avatar
adosorken
Smoulie
Smoulie
 
Posts: 61
Joined: Sat Aug 20, 2016 3:29 pm
Location: Windsor, VT

Re: Database Bugs

Postby adosorken on Thu Aug 25, 2016 12:20 am

I loaded the old "respawnzones" data into the database and WorldServerVS.exe crashes. Maybe a range issue... the old one has map values higher than the new one, but since the new one won't work as-is, I figured I'd try it anyway.
Evolve this!!
User avatar
adosorken
Smoulie
Smoulie
 
Posts: 61
Joined: Sat Aug 20, 2016 3:29 pm
Location: Windsor, VT

Re: Database Bugs

Postby adosorken on Thu Aug 25, 2016 12:29 am

I doubt my manual setting of the 'id' list in list_respawnzones.sql will actually work, but at least the server loaded them and didn't crash. Now we're on to a new issue... looks like there's a missing table.

Image

I grep'd the SQL files... no results.
Evolve this!!
User avatar
adosorken
Smoulie
Smoulie
 
Posts: 61
Joined: Sat Aug 20, 2016 3:29 pm
Location: Windsor, VT

Re: Database Bugs

Postby WiseGuy on Thu Aug 25, 2016 5:49 am

same here

there're missing list_waypoints & new_drops table

but I borrow from old ktrose

then I have error when I login to the server
I used new trose.exe

137-01.jpg
137-01.jpg (40.02 KiB) Viewed 19782 times


137-02.jpg
137-02.jpg (22.51 KiB) Viewed 19782 times
It is nice to be important
but very very important to be nice
User avatar
WiseGuy
Pomic
Pomic
 
Posts: 112
Joined: Sat Nov 21, 2009 4:03 am
Location: Jakarta

Re: Database Bugs

Postby adosorken on Thu Aug 25, 2016 2:09 pm

Could you possibly post the missing tables as an SQL file? That would be most helpful. :)
Evolve this!!
User avatar
adosorken
Smoulie
Smoulie
 
Posts: 61
Joined: Sat Aug 20, 2016 3:29 pm
Location: Windsor, VT

Re: Database Bugs

Postby adosorken on Thu Aug 25, 2016 2:34 pm

I found a copy of list_waypoints.sql and just made my own new_drops.sql from the existing table (worldserver loads it just fine, so the structure is probably correct).

The client crashes after logging in and selecting a channel.

Looks like it's trying to read a file that isn't present. The file path is truncated, so I did a directory search with wildcards. The source of the crash is Rose_Engine/Client/Util/CFileSystemNormal.cpp on line 87:

  1. assert( m_pFile && "Read failed from FileStream, file description is null" );


This assert() is causing the client to crash. The whole function is as follows:

  1. int CFileSystemNormal::Read( void *lpBuf, unsigned int nCount )
  2. {
  3.     assert( lpBuf && "Read failed from FileStream, output buffer is null" );
  4.     assert( m_pFile && "Read failed from FileStream, file description is null" );
  5.     if( m_pFile == NULL || lpBuf == NULL )
  6.     {              
  7.         return 0;   
  8.     }
  9.  
  10.     memset( lpBuf, 0, sizeof( char ) * nCount );
  11.     return fread( lpBuf, 1, nCount, m_pFile );
  12. }


Why the assertion is failing is beyond me. The code looks solid. Also, I am not sure what file it is attempting to load.
Evolve this!!
User avatar
adosorken
Smoulie
Smoulie
 
Posts: 61
Joined: Sat Aug 20, 2016 3:29 pm
Location: Windsor, VT

Re: Database Bugs

Postby WiseGuy on Thu Aug 25, 2016 2:36 pm

adosorken wrote:Could you possibly post the missing tables as an SQL file? That would be most helpful. :)


I dont know if this allow, if not please delete.

here are the missing sql:
list_waypoints.rar
(482 Bytes) Downloaded 663 times
Attachments
new_drops.rar
(22.91 KiB) Downloaded 658 times
It is nice to be important
but very very important to be nice
User avatar
WiseGuy
Pomic
Pomic
 
Posts: 112
Joined: Sat Nov 21, 2009 4:03 am
Location: Jakarta

Re: Database Bugs

Postby PurpleYouko on Thu Aug 25, 2016 2:38 pm

Added both missing sql files to the repository.

I'm wondering if this "id" issue might be due to differences in newer versions of MySQL in which they have added new reserved words.
I did notice some strangeness in some of the SQL files when I edited them yesterday in Notepad++. A couple of field names were highlighted in blue as if they were command words.

We used to have the same problem with the field "type" as it became a reserved word after PHP 5.0 I believe.

example
MYSQL_RES *result = DB->QStore("SELECT id,x,y,map,radius,type FROM list_respawnzones");
This works fine for me because I'm still running an older version of MySQL but some people might require something like this
MYSQL_RES *result = DB->QStore("SELECT id,x,y,map,radius,`type` FROM list_respawnzones");
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: Database Bugs

Postby PurpleYouko on Thu Aug 25, 2016 2:52 pm

adosorken wrote:I found a copy of list_waypoints.sql and just made my own new_drops.sql from the existing table (worldserver loads it just fine, so the structure is probably correct).

The client crashes after logging in and selecting a channel.

Looks like it's trying to read a file that isn't present. The file path is truncated, so I did a directory search with wildcards. The source of the crash is Rose_Engine/Client/Util/CFileSystemNormal.cpp on line 87:

  1. assert( m_pFile && "Read failed from FileStream, file description is null" );


This assert() is causing the client to crash. The whole function is as follows:

  1. int CFileSystemNormal::Read( void *lpBuf, unsigned int nCount )
  2. {
  3.     assert( lpBuf && "Read failed from FileStream, output buffer is null" );
  4.     assert( m_pFile && "Read failed from FileStream, file description is null" );
  5.     if( m_pFile == NULL || lpBuf == NULL )
  6.     {              
  7.         return 0;   
  8.     }
  9.  
  10.     memset( lpBuf, 0, sizeof( char ) * nCount );
  11.     return fread( lpBuf, 1, nCount, m_pFile );
  12. }


Why the assertion is failing is beyond me. The code looks solid. Also, I am not sure what file it is attempting to load.


That whole CFileSystemNormal class is one that I added to load stuff in from file rather than VFS.
I kind of cobbled some of it together as a copy of CFileSytsemVFS which is the way it would have loaded from VFS originally. hence the reason that the "asserts" are still there. I hate those bloody things. They create a break point if the assertion fails for any reason. One of my projects is to remove every last one of them from the entire source by the end.

It's kind of difficult to figure out which file it's reading from.
That's one of the reasons I added a Client_Log class. ;)
The whole client loading process is being logged each time you run it. At least it is as long as you have a folder named "log" in the root directory of your client. If you don't, just add an empty folder named "log" then run up the client again
Inside the "log" folder you will find two logs. "InOutPackets.log" which logs all packet traffic to and from the client and "ClientLog.log" which logs the startup sequence of the client
It might not tell you precisely which file it's trying to load but it will clearly show teh last one that worked correctly so we can track it back easier. It might even show the actual file..... maybe.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: Database Bugs

Postby PurpleYouko on Thu Aug 25, 2016 2:55 pm

WiseGuy wrote:same here

there're missing list_waypoints & new_drops table

but I borrow from old ktrose

then I have error when I login to the server
I used new trose.exe

137-01.jpg


137-02.jpg

looks like exactly the same error as adosorken got. Probably the same file that is bugging or is missing. As soon as we can identify which file is causing the problem we can get this fixed up.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Next

Return to BUGS

Who is online

Users browsing this forum: No registered users and 3 guests

cron