Closed alexeyknyshev closed 9 years ago
I try to figure out root of problem 426db21 hangs
Does that fix it ? f7d10df (It's the path set by CMake that might have been wrong, if you don't want to rerun cmake you can modify KIUI_EXAMPLE_RESSOURCE_PATH manually and tell me if that fixes it)
The backtrace is really weird though. I don't see what could go wrong so early...
Oooh wait I think I'm starting to seeing the problem in Type(), calling Type::cls() from Type::cls()
I'll be able to check at the morning. Now I'm lying in bed :р
No problem. I think I fixed it in 16b7c4d, keep me posted.
Looks like it's not connected with Type() bug. Problem has not gone. I'm trying to figure out...
If the application hangs, it should be possible to pause the debugger and see where exactly the hang happens. Could you try to give me this information so that I try to understand what is going on ?
Nevermind. The data path was not set properly between win32 and linux 4ef1ec4 and af54385. Tell me if that solves the problem.
Hang callstack, hangs in static initialization of Type ty(0); static Type& cls() { static Type ty(0); return ty; }
0 syscall /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.19.so 38 0x7ffff5b91fd9
1 cxa_guard_acquire 0x7ffff63cf023
2 mk::Type::cls mkType.h 54 0x7ffff79bd748
3 mk::Indexed<mk::Type, void>::indexer mkIndexer.h 78 0x7ffff79be37f
4 mk::Type::Type mkType.cpp 17 0x7ffff79bd3d4
5 mk::Type::cls mkType.h 54 0x7ffff79bd76b
6 mk::Type::Type mkType.cpp 21 0x7ffff79bd43c
7 mk::typeclsmkTyped.h 42 0x7ffff79c66b6 static_initialization_and_destruction_0 mkDispatch.h 102 0x7ffff79c645e
8 mk::Dispatch<mk::ValueWidget, bool&, &mk::valueWidget<bool&, mk::Input>>::Dispatch mkDispatch.h 89 0x7ffff79c9b0a
9
10 _GLOBAL__sub_I_mkInput.cpp(void) mkInput.cpp 110 0x7ffff79c65cb
11 call_init /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.19.so 78 0x7ffff7dea9fa
12 call_init /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.19.so 36 0x7ffff7deaae3
13 _dl_init /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.19.so 126 0x7ffff7deaae3
14 _dl_start_user 0x7ffff7ddd1ca
15 ?? 0x1 16 ?? 0x7fffffffea31
17 ??
Looks like dead look due to double static initailization. First time it acquires look and goes deeper, calls Type::cls() again and again makes static initialization, which already locked ==> deadlock as the result.
Yes now I see it. I already removed one such recursion in Type() and now I see there's another one when it calls indexer(). Gonna fix it right away.
Here dd5d3c8
Ought to be fixed! Great! Thx a lot!
Gdb backtrace of hanged thread. Looks like hang at libkiui.so dynamic lib start: