Posts

Showing posts from September, 2015

How to handle a Win32 Unhandled Exception error in a Release build

Image
Spanish version / Versión en Español You might have run into this scenario: a Windows application, which uses native/unmanaged C++, works perfectly fine in your development box. But in the productions environment, it crashes and a message like this one appears: Sometimes, that exception can be caught with a try-catch block. But in other cases such as an Access violation, division by zero and similar ones, it can't be caught. Windows offers a specific solution for this: the __try - _except block, but it has some limitations . Specifically, it can only capture SEH exceptions. And those must be enabled on a project basis for this to work. A better alternative, which is the one we'll analyze next, consists in using the SetUnhandledExceptionFilter function from the Kernel32.lib library . This allows us to catch the exception, but how can we get more information? Well, it is possible to obtain a stack trace by using additional functions from the psapi.lib and dbghlp

Cómo manejar Win32 Unhandled Exception en Release

Image
Versión en inglés / English version Probablemente se hayan topado con este escenario: una aplicación Windows, que usa C++ nativo/no manejado, funciona perfecto en la máquina de desarrollo. Pero en las máquinas de los clientes a veces sale un message box similar al siguiente: A veces, esa excepción puede capturarse con un bloque try-catch. Pero en ciertos casos como Access violation, división por cero y similares, no se puede capturar. Una alternativa específica de Windows es usar un bloque __try - __except, pero tiene sus limitaciones . Concretamente, sólo puede capturar excepciones de tipo SEH. Y las mismas deben estar habilitadas a nivel proyecto. Una mejor alternativa, que es la que estudiaremos a continuación, consiste en usar la función SetUnhandledExceptionFilter de la biblioteca Kernel32.lib. Esto nos permite capturar la excepción, ¿pero cómo obtener más información? Es posible obtener un stack trace usando unas funciones auxiliares de las bibliotecas psapi.lib

Toptal

Spanish version / Versión en Español Today, I was browsing Facebook on the bus to college and I stumbled upon an article about Toptal . To summarize, Toptal is a company created by two enginnering students. What sets it apart is the fact that nowadays it made profits for 80 million dollars, rejected Silicon Valley offers and... never had an office. All interactions, meeting and initial recruitment was done via Skype. The creators designed a special screening process aimed at recruiting "the top 3% best" engineers across the world. The whole process is done remotely, and includes tests and Skype meetings. I have worked professionally as a programmer since 2009, and recently started getting into the freelancing world. Some months ago, I created a profile on both Freelancer and Upwork , and managed to win, complete and get paid for a few projects. As we all know: It's great not having to commute to office everyday! Having the freedom to choose whic

Toptal

Versión en inglés / English version Hoy estaba mirando Facebook en el colectivo camino a la facultad y me topé con un artículo sobre Toptal . Resumiendo, es una empresa creada por dos estudiantes de ingeniería. Lo que tiene de particular es que al día de hoy cotiza 80 millones de dólares, rechazó ofertas de Silicon Valley y... nunca tuvo una oficina. Todas las interacciones, reuniones y reclutamiento de personal se hizo por Skype. Los creadores diseñaron un proceso especial de reclutamiento cuyo objetivo es reclutar a los ingenieros de software que estén dentro del "top 3%". Todo este proceso se hace de forma remota, e incluye evaluaciones y entrevistas por Skype. He trabajado profesionalmente como programador desde el año 2009, y recientemente he hecho mis primeras experiencias en el mundo del trabajo freelance. Hace algunos meses, creé un perfil en Freelancer y otro en Upwork, y logré ganar, completar y cobrar algunos proyectos. Como todos sabemos: ¡Es