Ask Your Question
0

매뉴얼 27. MO게임 제작을 위한 가이드를 따라하는 중에 Ptr<User> user = User::FetchByName( user_name );부분에서 에러를 냅니다.(2016-07-04, twentone)

asked 2016-11-30 17:49:51 +0900

inkeun.kim gravatar image

덤프내용은

OS Linux 0.0.0 Linux 4.2.0-41-generic #48~14.04.1-Ubuntu SMP Fri Jun 24 17:09:15 UTC 2016 x86_64 
CPU amd64 family 6 model 45 stepping 7 1 
Crash SIGSEGV 0x8 13 

0 libglog.so.0.0.0 (+0x10dba) 
1 (+0x7f3decd8fe80) 
2 libglog.so.0.0.0 (+0x10ce4) 
3 libglog.so.0.0.0 (+0x11112) 
4 libglog.so.0.0.0 (+0x106e6) 
5 libglog.so.0.0.0 (+0x104fb) 
6 funapi_runner: fun::DieIfAssertNoRollback(std::string const&) (+0xf6) 
7 funapi_runner: fun::ObjectException::ObjectException(bool) (+0x43) 
8 funapi_runner: fun::ObjectNotFoundException::ObjectNotFoundException(boost::shared_ptr<fun::ObjectModel     const> const&, std::string const&, boost::shared_ptr<fun::AttributeValue> const&, fun::LockType) (+0x31) 
9 funapi_runner: fun::Object::Copy() const (+0xc74) 
10 funapi_runner: fun::Object::Fetch(boost::shared_ptr<fun::ObjectModel const> const&, std::string const&, boost::shared_ptr<fun::AttributeValue> const&, fun::LockType) (+0x259) 
11 libroom.so: /home/twentone/ifunfactory/room-source/src/object_model/room_object.cc:544 (+0x1e) - room::User::FetchByName 
12 libroom.so: /home/twentone/ifunfactory/room-source/src/event_handlers.cc:442 (+0x1b) - room::OnClientLogin 
13 funapi_runner: fun::SessionService::OnSessionMessageQueued(boost::shared_ptr<fun::SessionMessageQueuedEvent const> const&) (+0x480) 
14 funapi_runner: boost::detail::function::function_obj_invoker1<boost::_bi::bind_t<boost::_bi::unspecified, boost::function<fun::ChainAction (boost::shared_ptr<fun::SessionMessageQueuedEvent const>)>, boost::_bi::list1<boost::_bi::bind_t<boost::shared_ptr<fun::SessionMessageQueuedEvent const>, boost::shared_ptr<fun::SessionMessageQueuedEvent const> (*)(boost::shared_ptr<void const> const&), boost::_bi::list1<boost::arg<1> > > > >, fun::ChainAction, boost::shared_ptr<void const> >::invoke(boost::detail::function::function_buffer&, boost::shared_ptr<void const>) (+0x46) 
15 funapi_runner: boost::function1<fun::ChainAction, boost::shared_ptr<void const> >::operator()(boost::shared_ptr<void const>) const (+0x3b) 
16 funapi_runner: fun::ObjectTransaction::Execute(boost::shared_ptr<void const> const&, boost::function<fun::ChainAction (boost::shared_ptr<void const>)> const&) (+0xd5) 
17 funapi_runner: fun::EventQueue::Run(std::vector<boost::function<void ()>, std::allocator<boost::function<void ()> > > const&, std::vector<boost::function<void ()>, std::allocator<boost::function<void ()> > > const&, boost::shared_ptr<boost::barrier> const&, unsigned long const&) (+0x687) 
18 funapi_runner: fun::EventDispatcher::Run(std::vector<boost::function<void ()>, std::allocator<boost::function<void ()> > > const&, std::vector<boost::function<void ()>, std::allocator<boost::function<void ()> > > const&, boost::shared_ptr<boost::barrier> const&, unsigned long const&) (+0x74) 
19 libboost_thread.so.1.54.0 (+0xba4a) 
20 libpthread-2.19.so (+0x8184) 
21 libc-2.19.so (+0xfa37d)
edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2016-11-30 17:50:35 +0900

inkeun.kim gravatar image

Answer by twentone · 2016-07-05 AM 08:14

넵 해결되었습니다. 빠른 답변 주셔서 감사합니다.

edit flag offensive delete link more
0

answered 2016-11-30 17:50:29 +0900

inkeun.kim gravatar image

Answer by minwoo.seok · 2016-07-04 PM 01:56

안녕하세요.

혹시 예제 코드를 수정없이 사용중이시면 OnClientLogin() 함수 내용중 아래에 해당하는 코드를 잘라내서

  // AccountManager 를 이용하여 로그인 처리를 합니다.
  // session 을 user_name 으로 mapping 할 수 있습니다.
  // 이미 로그인 처리되어 있다면 false 가 리턴됩니다.
  if (not AccountManager::CheckAndSetLoggedIn(user_name, session)) {
    SendMessage(session, "client_login", false);
    return;
  }

다음 코드 바로 윗쪽으로 붙여서 다시 확인 부탁드립니다.

// 유저에게 자신의 정보를 전달합니다.
  Json response;
  response["result"] = true;
  response["user_level"] = user_level;
  response["character_id"] = character_id;
  session->SendMessage("client_login", response);

발생된 원인은 다음 문서에서 설명하는 롤백 감지로 인한 것인데요.

http://www.ifunfactory.com/engine/doc...

예제 코드에서 관련된 수정이 미처 이루어지지 않은 것 같습니다. 불편을 드려 죄송합니다. 조속히 수정하여 반영하도록 하겠습니다.

감사합니다.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-11-30 17:49:51 +0900

Seen: 65 times

Last updated: Nov 30 '16