View previous topic :: View next topic |
Author |
Message |
Wart
Joined: 13 Jun 2012 Posts: 45
|
Posted: Tue Aug 07, 2012 2:05 Post subject: |
|
|
You can start with my demo mod (2 posts above). Maybe you can figure out what's wrong |
|
Back to top |
|
|
Wart
Joined: 13 Jun 2012 Posts: 45
|
Posted: Wed Aug 08, 2012 10:30 Post subject: |
|
|
Any update? |
|
Back to top |
|
|
Valgav
Joined: 28 Aug 2010 Posts: 53
|
Posted: Thu Aug 16, 2012 21:48 Post subject: |
|
|
Preloading haks/tlks from nwnx connect.
Any chance for that? |
|
Back to top |
|
|
Wart
Joined: 13 Jun 2012 Posts: 45
|
Posted: Fri Aug 24, 2012 3:26 Post subject: |
|
|
Any update for the name plugin? |
|
Back to top |
|
|
Wart
Joined: 13 Jun 2012 Posts: 45
|
Posted: Mon Sep 10, 2012 12:02 Post subject: |
|
|
Any update for the name plugin? |
|
Back to top |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
Posted: Mon Sep 10, 2012 22:42 Post subject: |
|
|
I don't really have a suitable environment to be testing this since I'm running visual studio 2012 and windows 8 64bit. Ingame nothing happens when the functions are called, server crashes when player deallocation takes place which will happen on any 64bit environment passing plugin-allocated memory back to nwserver AFAIK. Logfile doesnt indicate any errors either. _________________ I dun have any signature, I'm happy anyway. |
|
Back to top |
|
|
Wart
Joined: 13 Jun 2012 Posts: 45
|
Posted: Mon Sep 10, 2012 23:55 Post subject: |
|
|
Seems just like me. |
|
Back to top |
|
|
drake127
Joined: 26 Jan 2010 Posts: 28
|
Posted: Wed Sep 12, 2012 19:20 Post subject: |
|
|
After some investigation, I probably managed to find correct malloc and free functions which should be used inside nwserver.exe. Should you need to allocate memory which will be later freed by nwserver (or deallocate memory allocated by nwserver), you have to use these functions, otherwise the application will most likely crash.
I am not 100% certain but these seem to be the correct ones: Code: | void * (__cdecl *pmalloc)(size_t cb) = 0x00602657;
void (__cdecl *pfree)(void * cb) = 0x0060256E; | I don't know where I can find names plugin so I cannot confirm whether this will help. If somebody has configured environment, where he or she can try it, I would be glad. I do not have NWNX2 for Windows installed so it would take me quite some time to test it.
Good thing is, this can be tested with any heap buffer (descriptions, names, variables, ...) so I think that if it is not already done, it has quite some advantages.
In other versions of nwserver.exe you can try to look for these signatures (if CRT remains the same): Code: | free begins at: 55 8B EC 6A FF 68 00 6F
malloc begins at: FF 35 68 F8 EE 05 FF 74 |
Edit: I tested it with GetDescription and it seems that it does not leak and does not crash either. If somebody want to help with actual implementation, send me PM. |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Fri Sep 14, 2012 14:31 Post subject: |
|
|
Valgav wrote: | Preloading haks/tlks from nwnx connect.
Any chance for that? | Yes, there is a chance for that. _________________ In Soviet Russia, NWN plays you! |
|
Back to top |
|
|
Wart
Joined: 13 Jun 2012 Posts: 45
|
Posted: Sun Nov 18, 2012 7:09 Post subject: |
|
|
Any update for the name plugin? |
|
Back to top |
|
|
|