Linux

Debugging segmentation fault

Show information that save kernel when application crashed http://www.slideshare.net/noobyahoo/introduction-to-segmentation-fault-handling-5563036 http://mytechrants.wordpress.com/2009/05/22/debugging-a-segmentation-fault-using-gdb/ https://wiki.archlinux.org/index.php/Step_By_Step_Debugging_Guide

Continue Reading
Programming Windows

How to compile FastCGI library in Visual Studio 2010 C++

FastCGI comes with Win32 project for VisualStudio6. Unfortunately when you try to open it in VisualStudio2010 the project will be corrupted. To correctly compile it for VS2010 it’s necessary to download library sources, get patches from cybozu.co.jp site and apply it. Download library Download latest version of Development Kit here and extract it to standalone directory. Get …

Continue Reading
Linux Mac OS Programming Windows

FastCGI c++ library for all platforms (Windows, Mac and Linux)

List of existing libraries official fastcgi (http://www.fastcgi.com/drupal/node/6?q=node/21) – necessary to update win32 project fastcgi / cgi  c++ ([email protected] / cgi.sourceforge.net ) – limited windows support c++ FastCGI Protocol Driver (http://www.ohloh.net/p/libfastcgi) – POSIX only fastcgi++ ([email protected]/ / [email protected]) – only for POSIX systems fcgi Qt (https://gitorious.org/fcgi-qt-add-on) – for Qt apps cgicc (http://www.gnu.org/software/cgicc/) – no fastcgi support (although mentioned on their site) fastcgi-daemon (yandex) (https://github.com/golubtsov/Fastcgi-Daemon) – posix only …

Continue Reading
Programming

Error in RegEx (atlrx.h) in Visual Studio C++ 2003 and 2005

During our development we found that Microsoft RegEx (Regular expression) implementation contains a bug which caused crashes of our applications. The application module using RegEx passed all unit test, but sometimes under heavy usage the application crashed at our customer. Because we use BugTrap for error and crash notifications, we knew the error was in …

Continue Reading
Programming Windows

List of C++ profilers for windows (commercial and non-commercial)

Commercial Performance Validator (SoftwareVerify) GlowCode DevPartner Studio Performance Profiling – AQtime Pro Intel VTune Free Luke Stackwalker (don’t work on our project, crash when running unit tests) Microsoft PerfMon AMD Code Analyst Very sleepy micro-profiler (perfect for realtime searching of slow functions) Easy profiler (requires code modification to insert checkpoints) System performance tools Microsoft XPerf Linux test tools …

Continue Reading
Qt Windows

Qt application crash when compiled for 64-bit VS2010

Callstack The bug is probably caused by wrong alignment or incorrect VS2010 compiler optimalization. Found resources: https://bugreports.qt.nokia.com//browse/QTBUG-11445 https://connect.microsoft.com/VisualStudio/feedback/details/573262/incorrect-alignment-with-x64-optimizer-and-movaps http://support.microsoft.com/kb/2280741 https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=31433 Workarounds: First way – Update VS2010 mkspec for Qt go to $QTDIR/mkspecs/win32-msvc2010/qmake.conf and replace -02 with -01 (ie. reducing the optimzation level).Also /Ob0 could be used. Microsoft hotfix for VS http://archive.msdn.microsoft.com/KB2280741 File patch name VS10-KB2268081-x86.exe …

Continue Reading
Linux Programming

g++ error: conversion from XTestObjectA to non-scalar type XTestObjectBase requested

cite from: http://stackoverflow.com/questions/6120240/why-constructor-is-not-called-for-given-casting-operator The problem is that the number of user-defined conversions that are invoked implicitly is limited (to 1) by the Standard. B ob = a; implies two user conversions: on a: Wrap::operator A*() should be called on the result: B::B(A*) should be called The solution is to use explicit conversion

Continue Reading
Linux Programming Windows

MinGW and compilation 32/64bit libraries

Install MinGW-64 1) Download MinGW 64-bit and 32-bit http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/ http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/ – Toolchains targetting Win64 / Toolchains targetting Win32 – Automated Builds – mingw-w64-1.0-bin_i686-mingw_*.zip – mingw-w32-1.0-bin_i686-mingw_*.zip 2) Download MSYS compatible with 64-bit MinGW http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20(Win64%20hosted)/MSYS%20(32-bit)/ 3) Extract MinGW32, mingw64 and MSYS to one folder MinGW-32, MinGW-64 and MSYS to folder MinGW64 (Bin folder from MinGW will be …

Continue Reading
Programming

Collection of links about ORM, Datamapper and design patterns

Domain model http://www.slideshare.net/weierophinney/architecting-your-models ORM design patterns http://martinfowler.com/eaaCatalog/mapper.html http://martinfowler.com/eaaCatalog/dataMapper.html DataMapper http://stackoverflow.com/questions/207758/data-mapper-pattern http://stackoverflow.com/questions/762252/fowler-data-mapper-object-creation http://stackoverflow.com/questions/4658340/should-data-mapper-reference-domain-model http://stackoverflow.com/questions/1977684/should-a-finder-method-be-part-of-the-data-mapper-or-part-of-the-domain-class http://stackoverflow.com/questions/3738687/using-the-data-mapper-pattern-should-the-entities-domain-objects-know-about-th Anemic domain model http://www.martinfowler.com/bliki/AnemicDomainModel.html (Anemic domain model – why huge service layer  is bad) http://stackoverflow.com/questions/258534/anemic-domain-model-pros-cons Data Mapper best practices http://stackoverflow.com/questions/4465237/doctrine2-best-practice-should-entities-use-services http://stackoverflow.com/questions/4108291/using-entitymanager-inside-doctrine-2-0-entities/4109458#4109458 Doctrine2 articles http://www.doctrine-project.org/docs/orm/2.0/en/cookbook/aggregate-fields.html

Continue Reading