Larva Posted July 28, 2011 Share Posted July 28, 2011 Well as many already know theres a bug in the login and some days is very annoying it crashes, the debug dosen't help mush but since we dont know what is the cause of this nor how to fix it im just making plublic what the debug has tell us. just avoid to make post with non sense, any irrelevant post is going to be delete. well first we have the common message from windows. First-chance exception at 0x0044cee2 in login_server.exe: 0xC0000005: Access violation writing location 0x04e04000. Unhandled exception at 0x0044cee2 in login_server.exe: 0xC0000005: Access violation writing location 0x04e04000. First-chance exception at 0x0044cee2 in login_server.exe: 0xC0000005: Access violation writing location 0x04e04000. Unhandled exception at 0x0044cee2 in login_server.exe: 0xC0000005: Access violation writing location 0x04e04000.. and doesn't tell us mush. the next is what visual has tell running the login in debug. ------------------------------------------------- CAll Stack > login_server.exe!RleDecode(unsigned char * src=0x04be27c4, unsigned char * dest=0x04e04000, unsigned int src_size=10692) Line 6952 + 0x6 bytes C login_server.exe!decompressShipPacket(st_orange * ship=0x04be0040, unsigned char * dest=0x04befa6c, unsigned char * src=0x04be0068) Line 7081 + 0x17 bytes C login_server.exe!main(int argc=1, char * * argv=0x00393710) Line 6308 + 0x22 bytes C login_server.exe!__tmainCRTStartup() Line 266 + 0x19 bytes C login_server.exe!mainCRTStartup() Line 182 C kernel32.dll!77e6f23b() [Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll] --------------------------------------------------------- LOCAL - src 0x04be27c4 "W¼ÞìöBÊd8~ÿÿœ%¾" unsigned char * 87 'W' unsigned char - dest 0x04e04000 <Bad Ptr> unsigned char * CXX0030: Error: expression cannot be evaluated src_size 10692 unsigned int src_end 79571504 unsigned int prevChar 107 'k' unsigned char currChar 107 'k' unsigned char count 40219 unsigned short --------------------------------------------- AUTO count 40219 unsigned short currChar 107 'k' unsigned char - dest 0x04e04000 <Bad Ptr> unsigned char * CXX0030: Error: expression cannot be evaluated and the part of the code. *(dest++) = currChar; <--------THIS IS THE LINE DEBUG IS SHOWING void RleDecode(unsigned char *src, unsigned char *dest, unsigned src_size) { unsigned char currChar, prevChar; /* current and previous characters */ unsigned short count; /* number of characters in a run */ unsigned src_end; src_end = (unsigned) src + src_size; /* decode */ prevChar = 0xFF - *src; /* force next char to be different */ /* read input until there's nothing left */ while ((unsigned) src < src_end) { currChar = *(src++); *(dest++) = currChar; <--------THIS IS THE LINE DEBUG IS SHOWING /* check for run */ if (currChar == prevChar) { /* we have a run. write it out. */ count = *(unsigned short*) src; src += 2; while (count > 0) { *(dest++) = currChar; count--; } prevChar = 0xFF - *src; /* force next char to be different */ } else { /* no run */ prevChar = currChar; } } } /* expand a key (makes a rc4_key) */ if any one has a good idea please say so , at the moment no know has a clue on how to fix this. thanks. and the login code is clean with out modifications so don't start blaming any custom modification. Quote Link to comment Share on other sites More sharing options...
ACE SC1 Posted July 28, 2011 Share Posted July 28, 2011 (edited) hmm, ok so it wont be fixed completly 100% untill later? whats the exact time it will take? xD Edited July 28, 2011 by ACE SC1 Quote Link to comment Share on other sites More sharing options...
VonPawn Posted July 28, 2011 Share Posted July 28, 2011 (edited) I am by NO means an expert on C++, so please disregard this if it sounds like a stupid idea: change: *(dest++) = currChar; to this: *(dest)++ = currChar; I am not 100% sure what this code does, so I hope this at least sparks an idea. Also, I do not see where "dest" is ever defined, it could be in another section of the code, but maybe that is the problem.(I looked again, I found it) Last, check to see if "dest" is pointing to actual data, not an undeclared variable. Edit: One final thought, can you post any section of code where you call the "RleDecode" function? Because, maybe the parameter is the wrong data type or the parameter was not defined. Edited July 28, 2011 by VonPawn Quote Link to comment Share on other sites More sharing options...
shadowxz1 Posted July 28, 2011 Share Posted July 28, 2011 http://www.cplusplus.com/doc/tutorial/ http://www.cprogramming.com/tutorial.html it's been too long since i written c++ but i've posted link that helped me back in the day. hope it helps! =\ Quote Link to comment Share on other sites More sharing options...
VonPawn Posted July 28, 2011 Share Posted July 28, 2011 (edited) This is the first line of the call stack: login_server.exe!RleDecode(unsigned char * src=0x04be27c4, unsigned char * dest=0x04e04000, unsigned int src_size=10692) Line 6952 + 0x6 bytes C What data is at the following reference? 0x04e04000 unsigned char * dest=0x04e04000 Edit: After doing more research, I have another idea as to what the problem is. Is it possible that this "dest" pointer is pointing to another pointer? because that can cause some access violations if setup incorrectly. Hey Larva, the more information you provide, the more ideas I can give. Thanks. (I won't be back for 3 days so you will probably already fix it by the time I'm back. Please post the solution if you find out) Edited July 28, 2011 by VonPawn Quote Link to comment Share on other sites More sharing options...
R.A.V.S.O Posted July 28, 2011 Share Posted July 28, 2011 at times like this I wish I knew how to C-code, well no worries college should start soon there's gonna be tons of code to learn, I'm sure I can dish something up.... maybe. Quote Link to comment Share on other sites More sharing options...
chuk Posted July 29, 2011 Share Posted July 29, 2011 Isn't there a tool that shows you the value of each variable, after every command? I know there is such a feature in eclipse wich is very useful when I write some Java. That way, you can exactly see where your program goes wrong. For example : prevChar = 0xFF - *src; /* force next char to be different */ If *src = 0 it would change nothing. If you don't have such tool, you can write a line under each command to 'System.out.print(the value)' I don't know alot of C++ as we've only seen Java at school, but maybe this gives you some ideas to build on... Quote Link to comment Share on other sites More sharing options...
Green Posted August 1, 2011 Share Posted August 1, 2011 (edited) Ran into this while back. http://www.pioneer2.net/src/login_server.c has all the code there for loggin server just though this may help or mabe give idea or mabe help for comparison. I dont know.. =P Edit: After posting this i relized this is sodaboys code wich is already in use. Lol and I know Larva uses this.. So delete this post if you want. Edited August 1, 2011 by Green 4 Quote Link to comment Share on other sites More sharing options...
VonPawn Posted August 1, 2011 Share Posted August 1, 2011 Ran into this while back. http://www.pioneer2.net/src/login_server.c has all the code there for loggin server just though this may help or mabe give idea or mabe help for comparison. I dont know.. =P Edit: After posting this i relized this is sodaboys code wich is already in use. Lol and I know Larva uses this.. So delete this post if you want. Actually, this helps me because it is an extension of the code that Larva posted, which is exactly what I was asking for. Quote Link to comment Share on other sites More sharing options...
Green Posted August 1, 2011 Share Posted August 1, 2011 Actually, this helps me because it is an extension of the code that Larva posted, which is exactly what I was asking for. lol, ok kewl 4 Quote Link to comment Share on other sites More sharing options...
Doberman Posted August 3, 2011 Share Posted August 3, 2011 (edited) Edit: I'll take a look at the source tomorrow, quite tired right now. Edited August 3, 2011 by Doberman Quote Link to comment Share on other sites More sharing options...
Doberman Posted August 16, 2011 Share Posted August 16, 2011 Edit: I'll take a look at the source tomorrow, quite tired right now. There is now an updated version of the login server up. Hopefully we won't see any more frequent crashing. Quote Link to comment Share on other sites More sharing options...
Larva Posted August 16, 2011 Author Share Posted August 16, 2011 New login crashes this morning. Quote Link to comment Share on other sites More sharing options...
Doberman Posted August 16, 2011 Share Posted August 16, 2011 New login crashes this morning. Woo hoo, debug lines? Quote Link to comment Share on other sites More sharing options...
Larva Posted August 17, 2011 Author Share Posted August 17, 2011 ok login is running with newer update , and is running in debug mode, lets see what happen. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.