Project

General

Profile

Actions

Bug #1213

closed

AuthWidget crashes on logout after registration

Added by Anonymous over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
Start date:
03/27/2012
Due date:
% Done:

0%

Estimated time:

Description

See the auth1 sample in 3.2.1rc3. After registering and logging in, click logout and Wt will crash. Here is a stack trace:

0 ?? 0 0x7fe5d402b080

1 operator() mem_fn_template.hpp 49 0x7fe5fba21770

2 operator()<boost::_mfi::mf0<void, Wt::Auth::RegistrationWidget>, boost::_bi::list6<Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&, Wt::NoClass&> > bind.hpp 253 0x7fe5fba21770

3 operator()<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> bind_template.hpp 203 0x7fe5fba21770

4 boost::detail::function::void_function_obj_invoker6<boost::_bi::bind_t<void, boost::_mfi::mf0<void, Wt::Auth::RegistrationWidget>, boost::_bi::list1<boost::_bi::value<Wt::Auth::RegistrationWidget*> > >, void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>::invoke function_template.hpp 153 0x7fe5fba21770

5 operator() function_template.hpp 1013 0x7fe5fb82eef2

6 operator()boost::signals::detail::connection_slot_pair signal_template.hpp 119 0x7fe5fb82eef2

7 dereference slot_call_iterator.hpp 61 0x7fe5fb82eef2

8 dereference<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound6::caller<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >, boost::signals::detail::named_slot_map_iterator> > iterator_facade.hpp 517 0x7fe5fb82eef2

9 operator* iterator_facade.hpp 643 0x7fe5fb82eef2

10 postfix_increment_proxy iterator_facade.hpp 145 0x7fe5fb82eef2

11 operator<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound6::caller<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >, boost::signals::detail::named_slot_map_iterator>, boost::signals::detail::unusable, boost::single_pass_traversal_tag, const boost::signals::detail::unusable&, long int> iterator_facade.hpp 732 0x7fe5fb82eef2

12 operator()<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound6::caller<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >, boost::signals::detail::named_slot_map_iterator> > last_value.hpp 49 0x7fe5fb82eef2

13 boost::signal6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::last_value, int, std::less, boost::function6<void, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass> >::operator() signal_template.hpp 354 0x7fe5fb82eef2

14 emit WSignal 937 0x7fe5fba12264

15 Wt::Signal<Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass>::emit WSignal 932 0x7fe5fba12264

16 Wt::Auth::Login::logout Login.C 37 0x7fe5fba122cf

17 operator() function_template.hpp 1013 0x7fe5fb9f4a10

18 operator()boost::signals::detail::connection_slot_pair signal_template.hpp 119 0x7fe5fb9f4a10

19 dereference slot_call_iterator.hpp 61 0x7fe5fb9f4a10

20 dereference<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound1::caller<Wt::WMouseEvent, boost::function1<void, Wt::WMouseEvent> >, boost::signals::detail::named_slot_map_iterator> > iterator_facade.hpp 517 0x7fe5fb9f4a10

...

Seems like something doesn't like the changed signal being emitted from logout. This doesn't seem to happen with older versions of Wt, as both the auth1 and hangman examples from 3.2.1rc3 will fail, but the hangman live example on the official site does not crash... unless the process is simply being restarted immediately in which case you wouldn't really notice.

Only immediately after going through the registration process and then logging out. Logout will also not cause a crash if you log in with Facebook/Google and then log out. In fact, it only seems to occur when the registration dialog is shown, even if the user cancels out of it and then logs in with an existing account (in which case it will crash before even completing the login process). So it seems to me that the action of showing the registration dialog somehow corrupts the state of the widget.

So, to summarize: Click register. Crash will occur when next changed signal is emitted from Login object.

Actions #1

Updated by Koen Deforche over 12 years ago

  • Assignee set to Koen Deforche
Actions #2

Updated by Koen Deforche over 12 years ago

  • Status changed from New to Feedback
  • Assignee changed from Koen Deforche to Wim Dumon

Hey,

I could not reproduce this problem with a Mac OSX or Linux build --- which may also explain why the online example (running on Linux), and being also a fairly recent version (a 3.2.1 RC), is not affected either.

Looking at the code didn't give a clue either --- although there is a connection of the login changed signal with a method of the registration widget, closing the dialog deletes this widget and will cause the signal connection to be broken.

Wim, can you reproduce this on Windows ?

Regards,

koen

Actions #3

Updated by Wim Dumon over 12 years ago

No, just tested with git version of Wt with this scenario:

  1. register a new user
  2. login
  3. logout
    (no crash - restart the application)
  4. click register
  5. click cancel
  6. log in
  7. log out

This does not cause a crash for me, all works normal.

Is this the use case that crashes for you?

Can you do a clean build and see if you can reproduce the crash?

Best regards,

Wim.

Actions #4

Updated by Koen Deforche over 12 years ago

  • Target version changed from 3.2.1 to 3.2.2
Actions #5

Updated by Koen Deforche over 12 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF