ArcEmu: [c++]: Mapmgr Issues - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[c++]: Mapmgr Issues

#1 User is offline   QQrofll 

  • Member
  • Pip
  • Group: Members
  • Posts: 11
  • Joined: 07-June 11
  • IRC:QQrofl
  • Gender:Male
  • Location:Tennessee
  • Server OS:Windows

Posted 17 June 2011 - 12:42 PM

Hello, I have recently stumbled across an issue relating to MapMgr; this use to work in the previous revisions, but it seems to this day, it no longer works or I am doing something terribly wrong.

Here is my header file's code:

class ChangedName
{
public:
	void SpawnFlags();
        void TheMapMgr(MapMgr * m_mgr);
	//GameObject * SpawnFlags();

private:
        static MapMgr * Mapping;
};


And here is my .cpp file's code:

MapMgr * ChangedName::Mapping;
static ChangedName CN;

void ChangedName::TheMapMgr(MapMgr * m_mgr)
{
	Mapping = m_mgr;
}

void ChangedName::SpawnFlags()
{
	Mapping->GetInterface()->SpawnGameObject(ALLIANCE_FLAG, -3327, -2577, 105, 3, true, 0, 0, 0);
	//Mapping->GetInterface()->SpawnGameObject(HORDE_FLAG, -3403, -2769, 122, 4, true, 0, 0, 0);
}


Now when I call CN.SpawnFlags(); on a certain action, it crashes the server. I have tried every single way I know, and it still crashes the server. I don't know what changed, but whatever did, I don't get it. Any help would be appreciated so I can continue my project.
I can see no knowledge in you.
0

#2 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 17 June 2011 - 12:51 PM

Hi there, well it's a little bit out of context like this. There could be oh so many things going wrong.
The best you could do is also to provide a call stack so we can see where it actually crashes and why..
Even then I am not sure we could help, but we shall see
"The demand for free goods is infinite."
0

#3 User is offline   Notthecrow 

  • Member
  • Pip
  • Group: Members
  • Posts: 30
  • Joined: 27-June 10
  • Gender:Male
  • Server OS:Windows

Posted 17 June 2011 - 12:59 PM

View Postdfighter, on 17 June 2011 - 12:51 PM, said:

Hi there, well it's a little bit out of context like this. There could be oh so many things going wrong.

Indeed.

Have you tried adding Null pointer checks?
Ghost in my mind, you used to be, so alive...
0

#4 User is offline   QQrofll 

  • Member
  • Pip
  • Group: Members
  • Posts: 11
  • Joined: 07-June 11
  • IRC:QQrofl
  • Gender:Male
  • Location:Tennessee
  • Server OS:Windows

Posted 17 June 2011 - 01:52 PM

Well, the thing about that is every crashdump file I receive after it crashes, they are all blank. And every time I try to open it, it gives me "The volumn for a file has been externally altered so that the opened file is no longer valid"

Either way, it is crashing because I'm using Mapping->, so something must be changed for it to work properly, which I have lost confidence of that because I have tried everything I know of. If I comment out the CN.SpawnFlags(); when I use a certain action, it works fine, so I don't have a clue.

@Notthecrow: Yes, yes I have. :D

Well, here is a script I coded awhile back this year, it worked fine back when I was working on it, I tested it out and it will crash the server as well:

.cpp file:
http://www.assembla....mbie.cpp?rev=60

.h file:
http://www.assembla....Holder.h?rev=60

Look over those and see what it looks like. I have images/screenshots of these working too.
I can see no knowledge in you.
0

#5 User is offline   salamanda 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 161
  • Joined: 10-July 08

Posted 17 June 2011 - 02:34 PM

View PostQQrofll, on 17 June 2011 - 01:52 PM, said:

Well, the thing about that is every crashdump file I receive after it crashes, they are all blank. And every time I try to open it, it gives me "The volumn for a file has been externally altered so that the opened file is no longer valid"


Compile the server in debug as you are going to be debugging a crash.
0

#6 User is offline   QQrofll 

  • Member
  • Pip
  • Group: Members
  • Posts: 11
  • Joined: 07-June 11
  • IRC:QQrofl
  • Gender:Male
  • Location:Tennessee
  • Server OS:Windows

Posted 17 June 2011 - 04:28 PM

Did everything before I made the thread, that is why I made the thread. Debugging doesn't work properly either.
I can see no knowledge in you.
0

#7 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 17 June 2011 - 04:32 PM

View PostQQrofll, on 17 June 2011 - 04:28 PM, said:

Did everything before I made the thread, that is why I made the thread. Debugging doesn't work properly either.

Does this mean that you tried running it in debug mode with Visual Studio?
Maybe that can catch it if creating a dump fails.
"The demand for free goods is infinite."
0

#8 User is offline   QQrofll 

  • Member
  • Pip
  • Group: Members
  • Posts: 11
  • Joined: 07-June 11
  • IRC:QQrofl
  • Gender:Male
  • Location:Tennessee
  • Server OS:Windows

Posted 17 June 2011 - 05:36 PM

Sadly, once I try to run it in debug mode using Visual Studio, it cannot find the configs/world.conf file. I might try and take a different approach to what I am doing, instead of using MapMgr.
I can see no knowledge in you.
0

#9 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 17 June 2011 - 05:39 PM

Yes this happen for a fairly obvious reason. You either need to copy the files to the working directory set by CMake, or just attach to the running world process.
I prefer the latter due to being lazy to copy over 9000 copies of my DBCs and configs.
"The demand for free goods is infinite."
0

#10 User is offline   QQrofll 

  • Member
  • Pip
  • Group: Members
  • Posts: 11
  • Joined: 07-June 11
  • IRC:QQrofl
  • Gender:Male
  • Location:Tennessee
  • Server OS:Windows

Posted 17 June 2011 - 06:23 PM

http://i.min.us/idmipo.png

Process: [6424] world.exe
Thread: [7236] Map mgr - M169|I8

Got it working properly, took a screenshot of why it's crashing and now working to solve it; second opinions will help.
I can see no knowledge in you.
0

#11 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 17 June 2011 - 06:46 PM

msvcr100.dll is not part of Arcemu, I am not sure how you want to debug the Microsoft Visual C++ 10.0 runtime library :)
"The demand for free goods is infinite."
0

#12 User is offline   QQrofll 

  • Member
  • Pip
  • Group: Members
  • Posts: 11
  • Joined: 07-June 11
  • IRC:QQrofl
  • Gender:Male
  • Location:Tennessee
  • Server OS:Windows

Posted 17 June 2011 - 07:48 PM

I'll just redo everything and try something different, thanks for your response. :)
I can see no knowledge in you.
0

#13 User is offline   dfighter 

  • Titles are overrated
  • PipPipPipPipPipPipPipPipPipPip
  • Group: Administrator
  • Posts: 5,189
  • Joined: 14-June 08
  • IRC:dfighter
  • Gender:Male
  • Server OS:Linux

Posted 17 June 2011 - 07:55 PM

Well in any case usually the crash ends up in the library when you mess up a pointer somewhere.
So if I were you I'd try to run it under a memory checker like IBM Rational Purify, Intel Thread Checker or Valgrind, those would find exactly where you messed up a pointer. ( or if you REALLY messed up they'd crash themselves too )
"The demand for free goods is infinite."
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users