Commit Graph

65 Commits

Author SHA1 Message Date
Shauren
04b6f9111a Fixed ==25829== Thread #1: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
==25829== at 0x4C2A1D5: pthread_cond_broadcast_WRK (hg_intercepts.c:891)
==25829== by 0x654A758: std::condition_variable::notify_all() (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.17)
==25829== by 0x132305A: ProducerConsumerQueue<SQLOperation*>::Cancel() (ProducerConsumerQueue.h:100)
==25829== by 0x13229A7: DatabaseWorkerPool<WorldDatabaseConnection>::~DatabaseWorkerPool() (DatabaseWorkerPool.h:70)
==25829== by 0x6C6CB21: __run_exit_handlers (exit.c:78)
==25829== by 0x6C6CB74: exit (exit.c:100)
==25829== by 0x6C54EF3: (below main) (libc-start.c:276)
2014-10-02 20:09:08 +02:00
DDuarte
cefcde9ba9 Core/Misc: Multiple static analysis issues fixed (small optimizations and clear code) 2014-09-19 03:30:02 +01:00
Shauren
bd4edf6e22 Core/Threading: Fixed possible race condition with m_timeOutTime and fixed Thread #1: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread in PCQ 2014-08-12 18:18:52 +02:00
Vincent-Michael
fad2bd4f92 Core: Kill AGAIN whitespace :( 2014-08-07 07:19:06 +02:00
DDuarte
cb453fa093 Core/Shared: Fix world and auth crash on shutdown (PCQ & DbWorker)
Fixes #12704
2014-08-02 19:30:55 +01:00
Shauren
6f272ea5b7 Core/Network: Optimized packet sending by removing unneccessary memory copying 2014-07-27 17:46:46 +02:00
Shauren
b5f0b85b48 Core/Misc: Fixed a possible crash in ProducerConsumerQueue::Cancel 2014-07-24 18:05:54 +02:00
Jared P. Jones
11ecd851a1 Core/Misc: Silenced 500 OS X Warnings and removed deprecated finite() method.
*Mac OS X fires off over 200 warnings related to gsoap about the deprecated register method. CMake has been patched to remove this warning.
*Updated all occurences of finite() to std::isfinite. The method finite() is not standardized by anyone aside from BSD. std::isfinite() however is standarized by C++
*Removed -ncurses and -pthread from OS X compilation. Now that we use Boost and C++11 there is no longer a need for pthread in OS X. All it does is throw a warning. However, ncurses isn't needed either as it's built into the OS X SDK and linked by default.

Note: There are only 5 remaining warnings left when compiling on OS X. I did not attempt to fix these as they were related to 3rd party libraries statically linked into the code. The 5 warnings left are all related to unused variables.
2014-07-23 17:30:45 -05:00
Vincent-Michael
946ab3e8b7 Core: Kill again whitespace :( 2014-07-21 18:14:22 +02:00
leak
ecde28d1c1 Replacing ACE based multi threading with PCQ 2014-07-14 22:51:13 +02:00
Subv
da28c24d8e More GCC compile fixes 2014-07-09 12:24:20 -05:00
leak
021e18d152 Refactored both world and auth main
- Master/Worldrunable removed
- World Update loop now running on main (which was doing nothing before)
- Processpriority moved to shared
- Added a preliminary thread pool for boost::asio::io_service
2014-07-04 15:22:06 +02:00
Subv
87b72f41ca Fixed login and some errors 2014-07-02 21:56:40 -05:00
leak
25e633aa34 Replaced ACE_Method_Request based DelayExecutor by PCQ impl
Untested due to worldserver still breaking because of ACE threading fails
2014-07-02 00:41:30 +02:00
leak
029bad6698 Replaced all remaining ACE based Singletons
Replaced ACE base AutoPtr class with shared_ptr
Note: worldserver currently broken due to MapUpdater threading failure (ACE ofc, what else could it be)
2014-07-01 00:54:09 +02:00
leak
d39a013b6b Replaced ACE_Task_Base based DatabaseWorker with PCQ
Note: Not exactly sure how shutdown should be handled, currently the queue clears itself out before shutting down
This might need to be changed if the queue should be fully processed before being deleted
2014-06-30 18:37:23 +02:00
leak
eb36acd152 Replaced ACE_Task_Base based LogWorker with ProducerConsumerQueue 2014-06-30 14:44:52 +02:00
Subv
f03d49705d Core/Databases: Removed ACE dependencies on some of the database handling code. 2014-06-24 13:17:41 -05:00
Subv
f9a08ac1c9 Core/Dependencies: Remove ACE_Singleton dependency from the Log and DelayExecutor classes.
Removed an unused function.
2014-06-22 14:07:23 -05:00
leak
33dc72a812 Replaced Threading and SFMT access related code with std::thread and boost TSS
Note: The remote access thread is currently broken due to unknown ACE fail (will be replaced at some point anyways..)
2014-06-21 19:39:16 +02:00
leak
fdd5e11a15 Fix for LockedQueue.h (clean rebuilds ftw.) 2014-06-08 16:05:23 +02:00
leak
ee4a3b9d59 Replaced mutex related code in Common.h 2014-06-08 15:30:57 +02:00
leak
0fa3a4923e Replaced LockedQueue ACE lock with std::mutex 2014-06-02 23:01:01 +02:00
Dehravor
24ae6a6802 Core/Misc: Remove obsolete C++11 backward compatibility macros
OVERRIDE, FINAL, DELETE_MEMBER
2014-04-29 16:35:11 +02:00
Shauren
0f5632c70e Core/Misc: Fixed some -Weffc++ warnings 2014-04-20 16:48:35 +02:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
leguybrush
0a308144a8 Core/Code: Unify [more] codestyle for brackets: )\n{\n} to ) { }. 2013-10-28 14:36:07 -04:00
Ascathor
2607738990 Core/Code: Unify codestyle for brackets: {} to { }.
Also added missing copyright to some files.
2013-10-27 23:46:02 +01:00
Nay
8eaf763235 Core&Tools: Fix multiple issues found by a static code coverage tool 2013-08-26 02:00:18 +01:00
jackpoz
e96aa444b0 Core/Threading: Fix race condition in Thread
Increment the reference count of m_task in Thread::start() before spawning the actual Thread that will execute the task, otherwise the thread might finish, decRef the task and delete it.

Valgrind log of the issue:
 Invalid read of size 8
   at 0x1314CAD: ACE_Atomic_Op_GCC<long>::operator++() (Atomic_Op_GCC_T.inl:34)
   by 0x15933FB: ACE_Based::Runnable::incReference() (Threading.h:36)
   by 0x1592D2D: ACE_Based::Thread::start() (Threading.cpp:136)
   by 0x1592C37: ACE_Based::Thread::Thread(ACE_Based::Runnable*) (Threading.cpp:111)
   by 0xF6C463: Master::Run() (Master.cpp:195)
   by 0xF725D0: main (Main.cpp:142)
 Address 0x26137278 is 8 bytes inside a block of size 24 free'd
   at 0x4C2B59C: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0xF67FDB: RARunnable::~RARunnable() (RARunnable.cpp:55)
   by 0x1593441: ACE_Based::Runnable::decReference() (Threading.h:40)
   by 0x1592E92: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
   by 0x515EA35: ACE_OS_Thread_Adapter::invoke() (in /usr/lib/libACE-6.0.3.so)
   by 0x5F19F8D: start_thread (pthread_create.c:311)
   by 0x6A46E1C: clone (clone.S:113)

Closes #10619
2013-08-25 13:48:55 +01:00
Shauren
8be181c7e6 Core/Misc: Fixed a bunch of issues found by static analysis 2013-05-17 20:39:53 +02:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Spp
2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Spp
333b8e5159 Core/Build: Enable Clang PCH support and OS X specific features
Core: Fix warnings here and there
2012-11-09 13:13:45 +01:00
Spp
358c6a26d6 Core: Warning fixes (Also some -pedantic under game folder) 2012-09-10 13:04:31 +02:00
click
5411e1ce52 Core: Clean up whitespace and tabs in the base sourcetree 2012-02-18 16:52:08 +01:00
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
kandera
96f4ba29cd Fix compile error from 2d93bd07ba 2011-12-21 07:18:47 -05:00
Machiavelli
2d93bd07ba Core/DBLayer: More generic implementation of callback chains, instead of using this functionality local to CharacterCreatInfo class. Will be used in other places as well. 2011-12-21 10:22:03 +01:00
Machiavelli
17aeeaa9b5 Core/DBLayer: Fix a silly error in HandleStableSwapPet (synchronous query in async context). Fixes possible loss of pets when swapping. 2011-12-21 09:36:05 +01:00
Machiavelli
8e0be985fd Core/Netcode: Fix a possible infinite loop after 829be0b82 (which was accidentally merged in this morning) 2011-12-19 21:12:35 +01:00
Spp
b16d2245bb Cosmetic: Multiple cosmetic changes
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces

Note: Only affects files with extension "cpp" and "h" under /src/server
2011-09-29 12:43:05 +02:00
Spp
af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
Azazel
74b84a603d Core/DBLayer: add template parameter to QueryCallback classes to make it work with both QueryResult and PreparedQueryResult (will be used later). 2011-04-08 09:41:52 +06:00
Machiavelli
957c69de83 Update copyright note for 2011.
Happy new year.
2011-01-01 15:01:13 +01:00
Machiavelli
76e111fa07 Core/DBLayer: Allow asynchronous queries with callbacks to be executed in prepared statement format as well.
+ Cleanup and documentation

--HG--
branch : trunk
2010-12-23 16:05:43 +01:00
click
2642894342 Core: Add new system for parallelizing client packet processing. Handle WorldSession updates in Map::Update() where we are safe to proceed. Patch by Ambal.
(And clean up tabs and whitespace while rummaging around in there)
Closes issue 5084.

--HG--
branch : trunk
2010-12-13 22:37:56 +01:00
click
613b81f36f REALLY fix the CRLF-crap...
--HG--
branch : trunk
2010-10-07 15:54:07 +02:00
click
f0c4241ea4 Remove the accidental additions of CRLF-crap from the header updates
--HG--
branch : trunk
2010-10-07 15:35:36 +02:00
click
a67d7c9afd Copyright header updates - part 3... (and some whitespace cleanups)
--HG--
branch : trunk
2010-10-07 14:00:52 +02:00