Trouble in launching Unreal Editor 4 built on Ubuntu 20.04 - unreal-engine4

I have installed Unreal Engine 4 on Ubuntu 20.04, following the instructions from here:
https://docs.unrealengine.com/en-US/SharingAndReleasing/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/index.html
The compilation and make went fine, but when launching the UE4Editor it crashes with the following error:
Fatal error: [File:/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/VulkanRHI/Private/VulkanUtil.cpp] [Line: 803] VulkanRHI::vkQueueSubmit(Queue, 1, &SubmitInfo, Fence->GetHandle()) failed, VkResult=-4 at /opt/unreal/UnrealEngine-release/Engine/Source/Runtime/VulkanRHI/Private/VulkanQueue.cpp:71 with error VK_ERROR_DEVICE_LOST 0x00007fb25e26e1df libUE4Editor-VulkanRHI.so!VulkanRHI::VerifyVulkanResult(VkResult, char const*, char const*, unsigned int) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/VulkanRHI/Private/VulkanUtil.cpp:802] 0x00007fb25e245518 libUE4Editor-VulkanRHI.so!FVulkanQueue::Submit(FVulkanCmdBuffer*, unsigned int, VkSemaphore_T**) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/VulkanRHI/Private/VulkanQueue.cpp:71] 0x00007fb25e1ddbfa libUE4Editor-VulkanRHI.so!FVulkanCommandBufferManager::SubmitUploadCmdBuffer(unsigned int, VkSemaphore_T**) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/VulkanRHI/Private/VulkanCommandBuffer.cpp:547] 0x00007fb25e2a6471 libUE4Editor-VulkanRHI.so!FVulkanSurface::InternalLockWrite(FVulkanCommandListContext&, FVulkanSurface*, VkImageSubresourceRange const&, VkBufferImageCopy const&, VulkanRHI::FStagingBuffer*) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/VulkanRHI/Private/VulkanTexture.cpp:170] 0x00007fb25e2af4d7 libUE4Editor-VulkanRHI.so!FRHICommand<FRHICommandLockWriteTexture, FUnnamedRhiCommand>::ExecuteAndDestruct(FRHICommandListBase&, FRHICommandListDebugContext&) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/RHI/Public/RHICommandList.h:763] 0x00007fb30abdb65e libUE4Editor-RHI.so!FRHICommandListExecutor::ExecuteInner_DoExecute(FRHICommandListBase&) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/RHI/Private/RHICommandList.cpp:373] 0x00007fb30ac5b1c6 libUE4Editor-RHI.so!FExecuteRHIThreadTask::DoTask(ENamedThreads::Type, TRefCountPtr<FGraphEvent> const&) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/RHI/Private/RHICommandList.cpp:428] 0x00007fb30ac5a832 libUE4Editor-RHI.so!TGraphTask<FExecuteRHIThreadTask>::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:886] 0x00007fb31042863c libUE4Editor-Core.so!FNamedTaskThread::ProcessTasksNamedThread(int, bool) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:709] 0x00007fb310426d3e libUE4Editor-Core.so!FNamedTaskThread::ProcessTasksUntilQuit(int) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:600] 0x00007fb30ae17f4d libUE4Editor-RenderCore.so!FRHIThread::Run() [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/RenderCore/Private/RenderingThread.cpp:319] 0x00007fb3104d84e7 libUE4Editor-Core.so!FRunnableThreadPThread::Run() [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25] 0x00007fb31049c8b3 libUE4Editor-Core.so!FRunnableThreadPThread::_ThreadProc(void*) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.h:185] 0x00007fb310e1e609 libpthread.so.0!UnknownFunction(0x9608) 0x00007fb3077e5293 libc.so.6!clone(+0x42)
libUE4Editor-Core.so!FGenericPlatformMisc::RaiseException(unsigned int) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformMisc.cpp:472]
libUE4Editor-Core.so!FOutputDevice::LogfImpl(char16_t const*, ...) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/Core/Private/Misc/OutputDevice.cpp:61]
libUE4Editor-VulkanRHI.so!VulkanRHI::VerifyVulkanResult(VkResult, char const*, char const*, unsigned int) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/VulkanRHI/Private/VulkanUtil.cpp:802]
libUE4Editor-VulkanRHI.so!FVulkanQueue::Submit(FVulkanCmdBuffer*, unsigned int, VkSemaphore_T**) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/VulkanRHI/Private/VulkanQueue.cpp:71]
libUE4Editor-VulkanRHI.so!FVulkanCommandBufferManager::SubmitUploadCmdBuffer(unsigned int, VkSemaphore_T**) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/VulkanRHI/Private/VulkanCommandBuffer.cpp:547]
libUE4Editor-VulkanRHI.so!FVulkanSurface::InternalLockWrite(FVulkanCommandListContext&, FVulkanSurface*, VkImageSubresourceRange const&, VkBufferImageCopy const&, VulkanRHI::FStagingBuffer*) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/VulkanRHI/Private/VulkanTexture.cpp:170]
libUE4Editor-VulkanRHI.so!FRHICommand<FRHICommandLockWriteTexture, FUnnamedRhiCommand>::ExecuteAndDestruct(FRHICommandListBase&, FRHICommandListDebugContext&) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/RHI/Public/RHICommandList.h:763]
libUE4Editor-RHI.so!FRHICommandListExecutor::ExecuteInner_DoExecute(FRHICommandListBase&) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/RHI/Private/RHICommandList.cpp:373]
libUE4Editor-RHI.so!FExecuteRHIThreadTask::DoTask(ENamedThreads::Type, TRefCountPtr<FGraphEvent> const&) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/RHI/Private/RHICommandList.cpp:428]
libUE4Editor-RHI.so!TGraphTask<FExecuteRHIThreadTask>::ExecuteTask(TArray<FBaseGraphTask*, TSizedDefaultAllocator<32> >&, ENamedThreads::Type) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h:886]
libUE4Editor-Core.so!FNamedTaskThread::ProcessTasksNamedThread(int, bool) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:709]
libUE4Editor-Core.so!FNamedTaskThread::ProcessTasksUntilQuit(int) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp:600]
libUE4Editor-RenderCore.so!FRHIThread::Run() [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/RenderCore/Private/RenderingThread.cpp:319]
libUE4Editor-Core.so!FRunnableThreadPThread::Run() [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.cpp:25]
libUE4Editor-Core.so!FRunnableThreadPThread::_ThreadProc(void*) [/opt/unreal/UnrealEngine-release/Engine/Source/Runtime/Core/Private/HAL/PThreadRunnableThread.h:185]
libpthread.so.0!UnknownFunction(0x9608)
libc.so.6!clone(+0x42)
Vulkan seems correctly installed, as I am using the nvidia drivers.

I had exactly the same problem, the reason for the crash was that I enabled Raytracing with my GTX 1060 for the project, which understandably does not work. So, if you have no nVidia RTX card, do not enable raytracing

Related

I'm trying to build unity project on webGL, it was built successfully but something wrong when I swich to android platform and swich back to webGL

The project was developed in vesion 2019.4.8f1, it is unable to be built on webGL that version so I open it in version 2021.3.7f1c1.
At first it works, everthing was OK. So I tried to build it on Android and saw this when I switch back:
exception thrown: RuntimeError: memory access out of bounds,RuntimeError: memory access out of bounds
at il2cpp::metadata::Il2CppTypeHash::Hash(Il2CppType const*) (http://localhost:8081/Build/****.wasm:wasm-function[947]:0xd70d4)
at google::sparsehash_internal::sh_hashtable_settings<KeyWrapper<Il2CppType const*>, il2cpp::metadata::Il2CppTypeHash, unsigned long, 4>::hash(KeyWrapper<Il2CppType const*> const&) const (http://localhost:8081/Build/****-webGL.wasm:wasm-function[1705]:0xfe369)
at google::dense_hashtable<std::__2::pair<KeyWrapper<Il2CppType const*> const, unsigned long>, KeyWrapper<Il2CppType const*>, il2cpp::metadata::Il2CppTypeHash, google::dense_hash_map<KeyWrapper<Il2CppType const*>, unsigned long, il2cpp::metadata::Il2CppTypeHash, KeyWrapper<Il2CppType const*>::EqualsComparer<il2cpp::metadata::Il2CppTypeEqualityComparer>, google::libc_allocator_with_realloc<std::__2::pair<KeyWrapper<Il2CppType const*> const, unsigned long> > >::SelectKey, google::dense_hash_map<KeyWrapper<Il2CppType const*>, unsigned long, il2cpp::metadata::Il2CppTypeHash, KeyWrapper<Il2CppType const*>::EqualsComparer<il2cpp::metadata::Il2CppTypeEqualityComparer>, google::libc_allocator_with_realloc<std::__2::pair<KeyWrapper<Il2CppType const*> const, unsigned long> > >::SetKey, KeyWrapper<Il2CppType const*>::EqualsComparer<il2cpp::metadata::Il2CppTypeEqualityComparer>, google::libc_allocator_with_realloc<std::__2::pair<KeyWrapper<Il2CppType const*> const, unsigned long> > >::find_position(KeyWrapper<Il2CppType const*> const&) const (http://localhost:8081/Build/****-webGL.wasm:wasm-function[1699]:0xfe1bb)
at google::dense_hash_map<KeyWrapper<Il2CppType const*>, unsigned long, il2cpp::metadata::Il2CppTypeHash, KeyWrapper<Il2CppType const*>::EqualsComparer<il2cpp::metadata::Il2CppTypeEqualityComparer>, google::libc_allocator_with_realloc<std::__2::pair<KeyWrapper<Il2CppType const*> const, unsigned long> > >::find(KeyWrapper<Il2CppType const*> const&) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[1633]:0xfab7f)
at il2cpp::vm::Reflection::GetTypeObject(Il2CppType const*) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[1616]:0xf8375)
at il2cpp::icalls::mscorlib::System::Object::GetType(Il2CppObject*) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[60633]:0xc13c0b)
at Object_GetType_mE10A8FC1E57F3DF29972CCBC026C2DC3942263B3 (http://localhost:8081/Build/****-webGL.wasm:wasm-function[64061]:0xca0ae4)
at dynCall_iii (http://localhost:8081/Build/****-webGL.wasm:wasm-function[107999]:0x1cbada9)
at http://localhost:8081/Build/****-webGL.framework.js:1040:20
at invoke_iii (http://localhost:8081/Build/****-webGL.framework.js:14724:10)
at ABTestInstaller_InstallBindings_m3CF5B6CC950B2C0275B9E6BA7AA57BD49787D9CE (http://localhost:8081/Build/****-webGL.wasm:wasm-function[35956]:0x7c6e1e)
at InterfaceActionInvoker0::Invoke(unsigned short, Il2CppClass*, Il2CppObject*) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[66219]:0xce5894)
at dynCall_viii (http://localhost:8081/Build/****-webGL.wasm:wasm-function[108010]:0x1cbae46)
at http://localhost:8081/Build/****-webGL.framework.js:1040:20
at invoke_viii (http://localhost:8081/Build/****-webGL.framework.js:14746:3)
at Context_InstallInstallers_m01A84DFAE66F4462F24DE9A942296617222AE279 (http://localhost:8081/Build/****-webGL.wasm:wasm-function[49675]:0xa332ee)
at Context_InstallInstallers_m3AD29FF4EE2F625F3E1F82F91E7A7FA9A6E334E6 (http://localhost:8081/Build/****-webGL.wasm:wasm-function[49674]:0xa32950)
at SceneContext_InstallBindings_m3C7F585FCEAD32EEF9CDD66925E317A155875F98 (http://localhost:8081/Build/****-webGL.wasm:wasm-function[49774]:0xa399ec)
at dynCall_viii (http://localhost:8081/Build/****-webGL.wasm:wasm-function[108010]:0x1cbae46)
at http://localhost:8081/Build/****-webGL.framework.js:1040:20
at invoke_viii (http://localhost:8081/Build/****-webGL.framework.js:14746:3)
at SceneContext_Install_m8904B30F70C232AAC16EE134486ED63BEDB1D4E2 (http://localhost:8081/Build/****-webGL.wasm:wasm-function[49768]:0xa38955)
at SceneContext_RunInternal_m282A915AB634D9091851CBE0249903D9C6B39A5B (http://localhost:8081/Build/****-webGL.wasm:wasm-function[49767]:0xa38352)
at RunnableContext_Run_m62FF1E74A523C4261857A042A0FBC43BC0D4A568 (http://localhost:8081/Build/****-webGL.wasm:wasm-function[49704]:0xa3451f)
at RunnableContext_Initialize_mE5D19AF80D494C5961C5675249414B90466B7016 (http://localhost:8081/Build/****-webGL.wasm:wasm-function[49702]:0xa34454)
at SceneContext_Awake_mABEDDD9CF120B5BB7513552E9912A409CC7E59BC (http://localhost:8081/Build/****-webGL.wasm:wasm-function[49766]:0xa38340)
at RuntimeInvoker_TrueVoid_t4861ACF8F4594C3437BB48B6E56783494B843915(void (*)(), MethodInfo const*, void*, void**, void*) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[86201]:0x119d9bd)
at il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[88169]:0x11c50f6)
at dynCall_iiii (http://localhost:8081/Build/****-webGL.wasm:wasm-function[108002]:0x1cbadd8)
at http://localhost:8081/Build/****-webGL.framework.js:1040:20
at invoke_iiii (http://localhost:8081/Build/****-webGL.framework.js:14768:10)
at il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[88149]:0x11c4717)
at il2cpp_runtime_invoke (http://localhost:8081/Build/****-webGL.wasm:wasm-function[88207]:0x11c6638)
at scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[107070]:0x1c6e7b9)
at ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[105125]:0x1be16e3)
at ScriptingInvocation::InvokeChecked(ScriptingExceptionPtr*) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[105130]:0x1be18e7)
at SerializableManagedRef::CallMethod(Object&, ScriptingMethodPtr) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[90738]:0x1243d16)
at MonoBehaviour::CallAwake() (http://localhost:8081/Build/****-webGL.wasm:wasm-function[105079]:0x1bddd74)
at MonoBehaviour::AddToManager() (http://localhost:8081/Build/****-webGL.wasm:wasm-function[105081]:0x1bde231)
at Behaviour::AwakeFromLoad(AwakeFromLoadMode) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[90935]:0x12599c4)
at MonoBehaviour::AwakeFromLoad(AwakeFromLoadMode) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[105078]:0x1bddce9)
at AwakeFromLoadQueue::InvokePersistentManagerAwake(AwakeFromLoadQueue::Item*, unsigned int, AwakeFromLoadMode, bool) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[107132]:0x1c72050)
at AwakeFromLoadQueue::PersistentManagerAwakeFromLoad(ErrorsAndWarningsCapture*, bool) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[107129]:0x1c71350)
at LoadSceneOperation::CompleteAwakeSequence() (http://localhost:8081/Build/****-webGL.wasm:wasm-function[90833]:0x124ee40)
at LoadSceneOperation::PlayerLoadSceneFromThread() (http://localhost:8081/Build/****-webGL.wasm:wasm-function[90832]:0x124ea85)
at LoadSceneOperation::IntegrateMainThread() (http://localhost:8081/Build/****-webGL.wasm:wasm-function[90830]:0x124d5c6)
at PreloadManager::UpdatePreloadingSingleStep(PreloadManager::UpdatePreloadingFlags, int) (http://localhost:8081/Build/****-webGL.wasm:wasm-function[90845]:0x124feb0)
at PreloadManager::WaitForAllAsyncOperationsToComplete() (http://localhost:8081/Build/****-webGL.wasm:wasm-function[90846]:0x124ffea)
at main (http://localhost:8081/Build/****-webGL.wasm:wasm-function[102755]:0x1aa9186)
at http://localhost:8081/Build/****-webGL.framework.js:1040:20
I tried to build with previous version pulled from git, but still has the problem. I tried to eliminate every error in unity IDE but still cannot work.
Here is my build settings:
enter image description here
enter image description here

Dvd ezmaker 7 driver compiling issue

I'm unsuccessful with compilation dvd ezmaker 7 driver under raspbian (kernel 3.2.0-4-rpi), although it is successfully compiled under same Debian (kernel 3.2.0-4-686-pae). So, I've done following steps on Raspbian:
install 3.2.0-4 kernel (aptitude install linux-image-3.2.0-4.rpi)
install 3.2.0-4 headers (aptitude install linux-headers-3.2.0-4.rpi)
install linux source (linux-source-3.2 - some dvb-core header files are needed for compilation)
download driver source (v. 1.0.28)
and try to compile (with make command) it without any success: gcc says "cx231xx-i2c: error: implicit declaration of function 'i2c_master_recv' " (and same for 'i2c_add_adapter' and 'i2c_del_adapter').
But, all these functions are defined in /lib/modules/3.2.0-4-rpi/source/include/linux/i2c.h:
extern int i2c_master_recv (const struct i2c_client *client, char *buf, int count);
extern int i2c_add_adapter (struct i2c_adapter *);
extern int i2c_del_adapter (struct i2c_adapter *);
and there is the #include directive in cx231xx-i2c.c file.
Problem i2c_del_adapter usage for example:
cx231xx-i2c.c
int cx231xx_i2c_unregister(struct cx231xx_i2c *bus)
{
i2c_del_adapter(&bus->i2c_adap);
return 0;
}
and cx231xx.h (struct cx231xx_i2c definition)
struct cx231xx_i2c {
struct cx231xx *dev;
int nr;
/* i2c i/o */
struct i2c_adapter i2c_adap;
struct i2c_algo_bit_data i2c_algo;
struct i2c_client i2c_client;
u32 i2c_rc;
/* different settings for each bus */
u8 i2c_period;
u8 i2c_nostop;
u8 i2c_reserve;
};
I don't familiar to C and gcc, and cannot understand why gcc considers these functions as undefinded (besides, there is no problem with compilation under Debian).

Error: Offset out of range, in CoIDE

I am trying out CooCox CoIDE for developing software to a STM32F100.
When I compile after adding CooCox RTOS (CoOS), I get a error message:
[cc] Starting link
[cc] arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -g -nostartfiles -flto -Wl,-Map=OS_Test.map -O0 -Wl,--gc-sections -Wl,--entry=main -LC:\CooCox\CoIDE\configuration\ProgramData\OS_Test -Wl,-TC:\CooCox\CoIDE\configuration\ProgramData\OS_Test/arm-gcc-link.ld -g -o OS_Test.elf ..\obj\kernelHeap.o ..\obj\core.o ..\obj\startup_stm32f10x_md_vl.o ..\obj\core_cm3.o ..\obj\timer.o ..\obj\utility.o ..\obj\system_stm32f10x.o ..\obj\task.o ..\obj\serviceReq.o ..\obj\main.o ..\obj\mbox.o ..\obj\mm.o ..\obj\time.o ..\obj\event.o ..\obj\syscalls.o ..\obj\port.o ..\obj\queue.o ..\obj\mutex.o ..\obj\flag.o ..\obj\arch.o ..\obj\sem.o ..\obj\hook.o
[cc] C:\Users\Jonas\AppData\Local\Temp\cccpkRF6.s: Assembler messages:
[cc] C:\Users\Jonas\AppData\Local\Temp\cccpkRF6.s:240: Error: offset out of range
[cc] C:\Users\Jonas\AppData\Local\Temp\cccpkRF6.s:241: Error: offset out of range
I know this isn't much information, but I haven't seen this error before, so i am completely blank, please help :)
EDIT: Oh, and i found out that if I change the optimization from -O0 to -O1 the error becomes:
[cc] ccKXT9LB.s:1163: Error: registers may not be the same -- `strexb r0,r0,[r1]'
[cc] ccKXT9LB.s:1188: Error: registers may not be the same -- `strexh r0,r0,[r1]'
Oh, and i found out that if I change the optimization from -O0
to -O1 the error becomes: [cc] ccKXT9LB.s:1163: Error: registers
may not be the same -- strexb r0,r0,[r1]' [cc] ccKXT9LB.s:1188:
Error: registers may not be the same --strexh r0,r0,[r1]'
Go to cmsis directory of the firmware, open core_cm3.c and change these functions:
uint32_t __STREXB(uint8_t value, uint8_t *addr)
uint32_t __STREXB(uint8_t value, uint8_t *addr)
{
uint32_t result=0;
__ASM volatile ("strexb %0, %2, [%1]" : "=&r" (result) : "r" (addr), "r" (value));
return(result);
}
uint32_t __STREXH(uint16_t value, uint16_t *addr)
uint32_t __STREXH(uint16_t value, uint16_t *addr)
{
uint32_t result=0;
__ASM volatile ("strexh %0, %2, [%1]" : "=&r" (result) : "r" (addr), "r" (value));
return(result);
}
For the source of the solution see here and here
FOUND IT!
Someone more clever than me can probably explain it, but anyway I got it fixed by unchecking the "Enable LTO" box under linker configuration.
Right click project -> Configuration -> Link tab -> uncheck "Enable LTO". Done..
I hope this will help others.

MongoDB capped collection replication & extremely high CPU usage

Should there be a problem running a replica set that contains capped collections?
For some reason one of the secondary nodes on my replica set is periodically at 90% CPU for a few hours.
Breaking into it with gdb shows the following stack trace nearly every time:
#0 0x00000000008c3e3a in mongo::ps::Rolling::access(unsigned long, short, bool) ()
#1 0x00000000008c3bd6 in mongo::Record::accessed() ()
#2 0x000000000086eb03 in mongo::CoveredIndexMatcher::matches(mongo::BSONObj const&, mongo::DiskLoc const&, mongo::MatchDetails*, bool) ()
#3 0x000000000086ed78 in mongo::CoveredIndexMatcher::matchesCurrent(mongo::Cursor*, mongo::MatchDetails*) ()
#4 0x00000000009794dc in mongo::UpdateOp::next() ()
#5 0x00000000008c9a96 in mongo::QueryPlanSet::Runner::nextOp(mongo::QueryOp&) ()
#6 0x00000000008d9930 in mongo::QueryPlanSet::Runner::next() ()
#7 0x00000000008d9f86 in mongo::QueryPlanSet::Runner::runUntilFirstCompletes() ()
#8 0x00000000008ddc3e in mongo::QueryPlanSet::runOp(mongo::QueryOp&) ()
#9 0x00000000008df5f5 in mongo::MultiPlanScanner::runOpOnce(mongo::QueryOp&) ()
#10 0x00000000008dfaf0 in mongo::MultiCursor::nextClause() ()
#11 0x00000000008e1bcd in mongo::MultiCursor::MultiCursor(char const*, mongo::BSONObj const&, mongo::BSONObj const&, boost::shared_ptr<mongo::MultiCursor::CursorOp>, bool) ()
#12 0x000000000095f542 in mongo::_updateObjects(bool, char const*, mongo::BSONObj const&, mongo::BSONObj, bool, bool, bool, mongo::OpDebug&, mongo::RemoveSaver*) ()
#13 0x00000000009642d5 in mongo::updateObjects(char const*, mongo::BSONObj const&, mongo::BSONObj, bool, bool, bool, mongo::OpDebug&) ()
#14 0x00000000008339cf in mongo::applyOperation_inlock(mongo::BSONObj const&, bool) ()
#15 0x00000000008232cb in mongo::ReplSetImpl::syncApply(mongo::BSONObj const&) ()
#16 0x0000000000826f65 in mongo::ReplSetImpl::syncTail() ()
#17 0x00000000008283e5 in mongo::ReplSetImpl::_syncThread() ()
#18 0x0000000000828438 in mongo::ReplSetImpl::syncThread() ()
#19 0x00000000008288d0 in mongo::startSyncThread() ()
#20 0x0000000000aabd90 in thread_proxy ()
#21 0x00007effd9cd09ca in start_thread () from /lib/libpthread.so.0
#22 0x00007effd927fcdd in clone () from /lib/libc.so.6
Is there some extra magic one needs to use in order to get capped collections to replicate right?
You need to have a unique index on _id for replication to be fast (otherwise it has to do a full table scan for each op on the collection, which is what you're seeing in the trace). The _id index is not created automatically on capped collections. Create the index on your primary and then you may want to resync your secondary: if you had non-unique _ids, it can mess up replication.
Make sure you create a unique index on _id. If you create a non-unique index, it's very difficult to recover from: mongod "protects" this index by not letting you drop it and not letting you create any other index on _id.
See the warning at http://www.mongodb.org/display/DOCS/Capped+Collections#CappedCollections-UsageandRestrictions.

getting crash om memory set After updating to lion and xCode

I have just updated to Lion and now my app is crashing which was working fine in older version. It crash on memset function with no logs.
unsigned char *theValue;
add(theValue, someotherValues);
I have passed theValue reference to function
add(unsigned char *inValue, some other perameter) {
memset(inValue,0,sizeOf(inValue)); // **here it is crashing**
}
Is there really no code between the declaration of theValue and the call to add()? If so, then that's your problem. You are passing a random value as the first parameter to memset().
For this code to make sense, you have to allocate a block of memory for theValue and pass its size to add(), like so:
unsigned char *theValue = new unsigned char[BUFSIZE]; // Or malloc
add(theValue, BUFSIZE, ...);
void add(unsigned char *inValue, size_t bufsize, ...) {
memset(inValue, 0, bufsize);
...
}
Do you allocate memory for inValue?
1)
add(unsigned char *inValue, some other perameter) {
inValue = (unsigned char*)malloc(sizeof(inValue));
memset(inValue,0,sizeOf(inValue)); // **here it is crashing**
}
2)
theValue = (unsigned char*)malloc(sizeof(inValue));
add(theValue, ...)
unsigned char *theValue;
This points to a random bit of memory (or 0). Until you call malloc you don't own what it's pointing at so you can't really memset it.