Jump to content
The Dark Mod Forums

AutoSaver Issue at Startup


Recommended Posts

Working fine here (except for the weird issue I get whereby DarkRadiant locks up the second time I start it, something to do with the AutoSaver firing during the splash screen update, but I was getting this issue before).

The AutoSaver is firing during startup? I never had such a lockup, do you get that reliably?

Link to comment
Share on other sites

It seems pretty reliable, every second time (and sometimes the first) I start DR it locks up permanently just after the camera window is displayed, with the splash screen still visible.

 

The stacktrace is

 

#0  0xb7f61410 in __kernel_vsyscall ()
#1  0xb738434e in writev () from /lib/tls/i686/cmov/libc.so.6
#2  0xb723bec3 in ?? () from /usr/lib/libxcb.so.1
#3  0xb723c4ab in ?? () from /usr/lib/libxcb.so.1
#4  0xb723c5df in ?? () from /usr/lib/libxcb.so.1
#5  0xb723db37 in xcb_wait_for_reply () from /usr/lib/libxcb.so.1
#6  0xb79c41eb in _XReply () from /usr/lib/libX11.so.6
#7  0xb79b2230 in XQueryPointer () from /usr/lib/libX11.so.6
#8  0xb795a686 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#9  0xb792cdfc in gdk_window_get_pointer () from /usr/lib/libgdk-x11-2.0.so.0
#10 0x0843ad7e in map::AutoMapSaver::checkSave (this=0x858d500)
at map/AutoSaver.cpp:166
#11 0x0843b70b in map::AutoMapSaver::onIntervalReached (data=0x858d500)
at map/AutoSaver.cpp:268
#12 0xb7767336 in ?? () from /usr/lib/libglib-2.0.so.0
#13 0xb7766bf8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#14 0xb7769e5e in ?? () from /usr/lib/libglib-2.0.so.0
#15 0xb776a3ac in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#16 0xb7bbe0d4 in gtk_main_iteration () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x082d2879 in process_gui () at gtkmisc.h:48
#18 0x082d21c1 in ui::Splash::queueDraw (this=0x857f420)
at ui/splash/Splash.cpp:85
#19 0x082d236b in ui::Splash::setText (this=0x857f420, text=@0xbff46c84)
at ui/splash/Splash.cpp:56
#20 0x082d238a in ui::Splash::setProgressAndText (this=0x857f420, 
text=@0xbff46c84, fraction=1) at ui/splash/Splash.cpp:69
#21 0x0820da69 in main (argc=1, argv=0xbff46d54) at main.cpp:232

 

It seems to be a problem with the gdk_window_get_pointer call, although I did try commenting out this line and the problem was not resolved (although maybe I didn't recompile properly).

Link to comment
Share on other sites

It seems to be a problem with the gdk_window_get_pointer call, although I did try commenting out this line and the problem was not resolved (although maybe I didn't recompile properly).

Thanks, I'll have a look.

Link to comment
Share on other sites

I changed the order a bit in AutoSaver::onIntervalReached(). The AutoSaver class is activated in MainFrame::Create() which sounds about right, but it seems there is a small timeframe between MainFrame::Create and the time the map becomes valid and/or the window manager is ready for such a call. The most recent code checks now for a valid map before querying the input states.

 

Could you please check whether my change resolves this issue?

Link to comment
Share on other sites

Hm, according to the GTK/GDK docs, this is the function description: http://library.gnome.org/devel/gdk/stable/...dow-get-pointer

 

GdkWindow* gdk_window_get_pointer(GdkWindow *window, gint *x, gint *y, GdkModifierType *mask);

 

Obtains the current pointer position and modifier state. The position is given in coordinates relative to the upper left corner of window.

 

window : a GdkWindow

x : return location for X coordinate of pointer or NULL to not return the X coordinate

y : return location for Y coordinate of pointer or NULL to not return the Y coordinate

mask : return location for modifier mask or NULL to not return the modifier mask

Returns : the window containing the pointer (as with gdk_window_at_pointer()), or NULL if the window containing the pointer isn't known to GDK

The function call I copied from the GtkRadiant code is like this:

GdkModifierType mask;
gdk_window_get_pointer(0, 0, 0, &mask);

So what I'm wondering is, how did this ever work? It's passing a NULL pointer for the GdkWindow* argument, something which is not mentioned in the documents as valid. This code needs to be adapted a bit, I guess.

 

edit: Done, latest SVN retrieves the GdkWindow from the main window.

Link to comment
Share on other sites

Could you please check whether my change resolves this issue?

 

Unfortunately not. Sometimes I get a stacktrace which does not include the AutoSaver stuff, and just seems to be running a gtk_main loop from Splash::queueDraw(), but I also get the same lockup on your modified version of the gdk_window_get_pointer call.

Link to comment
Share on other sites

Here's one.

 

#0  0xb7f91410 in __kernel_vsyscall ()
#1  0xb73b434e in writev () from /lib/tls/i686/cmov/libc.so.6
#2  0xb726bec3 in ?? () from /usr/lib/libxcb.so.1
#3  0xb726c4ab in ?? () from /usr/lib/libxcb.so.1
#4  0xb726c5df in ?? () from /usr/lib/libxcb.so.1
#5  0xb726db37 in xcb_wait_for_reply () from /usr/lib/libxcb.so.1
#6  0xb79f41eb in _XReply () from /usr/lib/libX11.so.6
#7  0xb79e2230 in XQueryPointer () from /usr/lib/libX11.so.6
#8  0xb798a686 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#9  0xb795cdfc in gdk_window_get_pointer () from /usr/lib/libgdk-x11-2.0.so.0
#10 0x0843add1 in map::AutoMapSaver::checkSave (this=0x858d6c0)
at map/AutoSaver.cpp:184
#11 0x0843b737 in map::AutoMapSaver::onIntervalReached (data=0x858d6c0)
at map/AutoSaver.cpp:282
#12 0xb7797336 in ?? () from /usr/lib/libglib-2.0.so.0
#13 0xb7796bf8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#14 0xb7799e5e in ?? () from /usr/lib/libglib-2.0.so.0
#15 0xb779a1e7 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#16 0xb7bee264 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x0820da29 in main (argc=1, argv=0xbf9eaff4) at main.cpp:257

 

Here's another (almost useless)

 

#0  0xb7796d03 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#1  0xb7799e5e in ?? () from /usr/lib/libglib-2.0.so.0
#2  0xb779a1e7 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#3  0xb7bee264 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#4  0x0820da29 in main (argc=1, argv=0xbf9eaff4) at main.cpp:257

 

Third one

 

#0  0xb74f8b13 in std::string::compare () from /usr/lib/libstdc++.so.6
#1  0x08213610 in std::operator< <char, std::char_traits<char>, std::allocator<char> > (__lhs=@0x9129d40, __rhs=@0x858cf00)
at /usr/include/c++/4.2/bits/basic_string.h:2218
#2  0x0821362e in std::less<std::string>::operator() (this=0x858543c, 
__x=@0x9129d40, __y=@0x858cf00)
at /usr/include/c++/4.2/bits/stl_function.h:227
#3  0x0838e083 in std::_Rb_tree<std::string, std::pair<std::string const, boost::shared_ptr<RegisterableModule> >, std::_Select1st<std::pair<std::string const, boost::shared_ptr<RegisterableModule> > >, std::less<std::string>, std::allocator<std::pair<std::string const, boost::shared_ptr<RegisterableModule> > > >::find (this=0x858543c, __k=@0x858cf00) at /usr/include/c++/4.2/bits/stl_tree.h:1398
#4  0x0838e15c in std::map<std::string, boost::shared_ptr<RegisterableModule>, std::less<std::string>, std::allocator<std::pair<std::string const, boost::shared_ptr<RegisterableModule> > > >::find (this=0x858543c, __x=@0x858cf00)
at /usr/include/c++/4.2/bits/stl_map.h:557
#5  0x0838c7e8 in module::ModuleRegistry::getModule (this=0x8585420, 
name=@0x858cf00) at modulesystem/ModuleRegistry.cpp:175
#6  0x08437f0f in module::StaticModule<map::Map>::getModule (this=0x858cf00)
at ./modulesystem/StaticModule.h:41
#7  0x08432420 in GlobalMap () at map/Map.cpp:868
#8  0x0843ace4 in map::AutoMapSaver::checkSave (this=0x858d6c0)
at map/AutoSaver.cpp:165
#9  0x0843b737 in map::AutoMapSaver::onIntervalReached (data=0x858d6c0)
at map/AutoSaver.cpp:282
#10 0xb7797336 in ?? () from /usr/lib/libglib-2.0.so.0
#11 0xb7796bf8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#12 0xb7799e5e in ?? () from /usr/lib/libglib-2.0.so.0
#13 0xb779a1e7 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#14 0xb7bee264 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#15 0x0820da29 in main (argc=1, argv=0xbf9eaff4) at main.cpp:257

 

I can't see any logic in these, it looks like it's just going round in some kind of loop. It's also really weird that I get it on the second start of DarkRadiant, not usually the first.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...