Jump to content

ElRenardo

Member
  • Posts

    42
  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by ElRenardo

  1. Hi, the same problem can be found in the cube_proto. ch->PointChange(POINT_GOLD, -(cube_proto->gold), false); cube_proto->gold is unsigned by default.
  2. Hi Sherer, thank you very much for your detailed answer. I'm on O2 flag by default, I remember changing that already but didn't get much better results in the diagnosis so I put it back to normal. As it's a test server now, I'll try to keep it to default O0 for now on. Here are the compiler flags I use then: -m32 -g -Wall -O -pipe -fexceptions -std=gnu++17 -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG -fstack-protector-all The second error, with tr1 lists was where the crashes first started. I then did change all the tr1 lists in the sources to std lists, and did the same for every boost lists. I then got erreor with affects, I remember removing the boost affect_pool in affect.cpp, to make it use the default M2 allocator as if DEBUG_ALLOC was declared in this file. For the third error, I remember having some troubles with the memory usage of the server back then. I'm not sure if it's exactly at that time, but the memory usage of my machine was nearly at 100% even with the game not started. The machine had not been restarted for years. Until now after the restart the memory usage is fine. At this time, I though that the memory corruption could be because of a memory problem on my server, so I rent a new machine but still got crashes on it. But, the error seems to be part of the first one, that I got yesterday after 35 days without reboot and crashes (and very very few players on it so it's not really showing that it crashes less than before). I did an update, so I restarted the game, let some 3-5 players try it and got a crash after a few hours while a player attempted the refinement of ores on a guild alchemist. It worked 3 times, and then it crashed giving a backtrace to luaM_realloc because it couldn't allocate memory. For the checkpointing, everything is as it is by default, I haven't touched anything about that. To be sure, I'll only be able to check tomorrow. Thanks for the proposal, I'll keep that in mind.
  3. Hi, thanks again for your answer. Sorry, I made my shop search system recently so It crashed before that. I don't think it can be caused because of an execution time too long. (As I said, most of the usage of the database is cached, my search shop system don't use sql queries at all as it access directly the offlineshop cache.) I though at once that it could be a memset or memcpy that overflows, but I already checked several times and couldn't find any of that. Should I not use thoses functions at all ? If yes what would be the best way to fill / copy memory ?
  4. Hi, thanks for your answer. It was a server with few hundreds of players. Now it's a test server, with a very few players on it, but still it crashes sometimes; not as often now so it's getting difficult to fix. When the server was opened to the players, and out of solution, I tried to disable progressively every systems I made, it still crashed. I coded myself everything that is on my server, starting from Marty's srcs (thx to him). I have of course my own version of offline shops, searchshop, guild safebox, serverside switchbot, inventory expansion, and so so on. I tried to disable each of them one by one and one to another. Everything that needs the database uses a cache method. I'm using UTF-8 encoding in everything (database, quests, client, mob/item names... everything). I tried to disable that aswell and still got crashes. Every LC_TEXT in the game srcs are in english. BSD compiled with C++17, C++4.9 got crashes too. I put a lot of effort and time in these sources and I'm really out of solution right now.
  5. Hi there, I'm having some troubles with memory corruption since a few months on my production server. Sometimes, somewhere, somehow, the server crash on multiple channels at the same time. At first, I got backtraces about crashes occuring while iterating on map / unordered_map of entities. After a lot of modifications and refactoring, now it's going bad with quests when allocating memory, directly in the liblua. Few weeks ago I saw this old post on stackoverflow detailling my problem like a charm: [Hidden Content] I know, it's a long story, if you don't want to read everything, he explain that he got memory corruption after lots and lots of work on the srcs. Unable to reproduce a crash on a test server as it seems to need real players to crash. Crashes occurs randomly, but mostly on the same functions, first was on iterating on entities in maps, after modifications it was somewhere else when items expires... Now I'm in the same position, the production server crashes one or two times a day on multiple channels/cores at the same time, sometimes 10 minutes after a restart, sometimes it doesn't crash for 2 days... It can crash on any map or any channel. But it's happening mostly on the channel with the most players. I join few backtraces to let you see. The most recent (today) is the first one on luaM_realloc Maybe someone of you already had a similar problem and have an idea of how to locate where the corruption happen. Thanks for your time!
  6. I'm not using DX9. But thanks for the research. Of course it could be great to just create a rect and be able to show only what's inside of it even if some other classes render outside. Isn't that the way the RenderTarget works ? For now I created a rendermode for windows that changes the rect of every child windows to the size of the parent.
  7. Sorry you got it wrong again @OtherChoice but thank you very much for the effort. It's exactly what I'm talking about @masodikbela. I understand the path now. The problem for me is to modify the render function of all the elements as I don't know how I can avoid the render of the parts outside the window. Of course the ExpandedImage is already doing so with the RenderingRect function, but now, implement that on every assets... It's more complicated than I thought it would be.
  8. Sorry about that. [Hidden Content] You see here how the content of the list is cut at the top and the bottom ? I'm wondering about how it works.
  9. Bump. In the first place I thought it was some sort of workaround using a list and some "image bar" at the top and bottom of the list. But in this case, the item would appear outside the window here: Maybe it's just a simple window inside a window moving on height with a custom layer applyed ? But then, as this new layer would be below the game and the gui, the parent window should be above... What do you think ?
  10. Hi, Thanks for your answer. I'm aware about ListBox and ComboBox. What I'm asking for is how is made the smooth scrolling and the cut of the components at the top and bottom of the window. Thanks again.
  11. Hi, I've been looking for this type of gui element that hide what's outside of it. Exemple here: A few servers are using this kind of gui with a new scrolling type. I'm just curious of what's used to achieve this, how it works. Thanks in advance.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.