In WinCE 6.0, my application reading SD card, sometimes raise an error message box:
"Application xxx.exe encountered a serious error and must be shut
down"
Then my application will be terminated by the system.
It depends on the quality of SD card, not every SD card would cause this error.
How can I catch/avoid this kind of error and keep my application alive?
Related
We have an unmanaged C++ application (MFC framework, Windows CE) that closes on us at seemingly random moments.
There is no error message and no C++ exception, it just vanishes.
I presume something bad must have happened and the C run-time or OS decided to kill the program. But I'm not sure where to continue searching.
Question: is it possible to see somewhere in Windows CE why the application terminated in the first place?
Does Windows CE collect basic crash information? Perhaps then one can at least see if it was an Access Violation, an Out of Memory situation, kernel/driver panic or perhaps some other kind of internal or external event that forced the application to close?
On a regular x86 PC one would break out the debugger, application verifier, Windows Error Reporting tools, WinDbg etc. But how to (start) analyze a Windows CE application crash?
What I've tried so far:
Creating global C++ exception handlers at tactical locations in the application. These build and transmit a simple UDP packet containing minimal exception info. these are then viewed on another machine running Wireshark.
Adding the SEH exception compiler switch (/EHa), to be able to catch even those non C++ exceptions, like Access Violation and such.
Connecting the Visual Studio 2008 debugger via TCP/IP with the Smart Device (connects to smart device successfully MSVS says, but debugger doesn't see any remote processes. The Attach to process VS window gives the following error: Unable to Connect to ''.)
Retarget the application so it runs on a regular x86 PC (but then it runs fine, so no "luxury" of debugging the issue there either)
I've tested the exception handler by forcing an Access Violation.
The expected UDP message the arrives at the machine running Wireshark perfectly. But when the real issue occurs, it stays completely silent.
The platform: MS Windows Embedded Compact 7.02 running on a Texas Instruments processor (ARM A8).
The application itself implements a rudimentary VNC viewer. It uses sockets and relies on a third party binary called zlib CE (ZLIBCE.DLL) for decompressing VNC data.
It hasn't been verified if the zlib binary has been built against the exact same compiler (and/or compiler settings).
Settled for a poor man's debugging solution. Now sending application state values to a memory mapped file. The idea is that a specially crafted helper program runs along the main application. This program opens the memory mapped file, displays values it reads from it. And the main program writes to it. If anything fatal happens to the main app, the helper program has the latest state info. Since it is shared memory it doesn't impact performance much. This way found the section of the program where the fault occurs.
Today I decided to start developing a 3D game , I googled and found JMonkey. I installed it and it successfully installed but when run, I can't create a project rather it is continuously showing this two message in message box.
org.lwjgl.opengl.OpenGLException: Invalid enum (1280)
java.lang.illegalstateexception:framebuffer doesn't have any renderbuffers attached
i am using DELL vostro 1014 and no any extra graphics card.
That usually happens if you are trying to run a fullscreen mode that your computer does not support.
To find which modes are supported, do this:
GraphicsDevice device =
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
DisplayMode[] modes = device.getDisplayModes();
I work on specialized voip application.
It uses TLS as signalling channel and (S)RTP as media channel in calls.
There is a audio output module written that uses DirectSound to play & capture.
Audio module is resistant to audio errors. If it detects smth wrong -
1) the problem audio device is closed
2) main application is notified about problem
3) customer can select another audio device.
Works good most of time.
But sometimes the sequence "remove / wait 10-20 seconds / insert USB Jabra headset" results in interest thing. There is no more incoming RTP packets or they are corrupted.
OS can send ICMP reports about non available port to remote peer even.
I checked with DevPartner and DrMemory error checkers - but there weren't hints in their reports.
I think it can be driver or Windows issue. It is reproducible on other systems sometimes.
The question - how can I investigate this issue? Maybe there are tools that show audio driver activity inside Windows?
Thank you :)
First of all, we are working with a 3rd party software that ties itself to a USB device. When this USB device is disconnected and reconnected, the software cannot communicate with the device will stop working until the program is restarted. i.e. It only detects the USB device on startup.
Windows is able to see the device, but goes through the full detection/driver installation procedure every time it is reconnected, even if it is reconnected to the same USB port.
The difficulty here is that we have no way of modifying the third party software to poll for the appropriate USB device after the device is unplugged.
As such, we would like to ask if anyone has knowledge on how to go about writing a c++ program to save a USB state/register, prevent Windows from re-enumerating the USB port upon re-connection, and restoring the saved state/register. If so, we would appreciate some guidance in this endeavor. Naturally, we are open to other approaches to solving this issue.
You can't do this at application level. USB is managed by drivers. Furthermore, while the details of USB devices are managed by specific drivers, the basics (such as enumeration) are handled by the standard Windows USB driver. That's logical: Windows has to enumerate the device first to determine its Vendor ID and Product ID, which then determines the specific driver to load.
As for the full reinstallation on every reinsertion, that suggests a violation of the USB spec by the device or the Windows API by the driver. My first guess would be that the device doesn't have a proper serial number.
I have a problem with my C++ code running in Xcode with both the AMSerial library as well as the generic C (ioctl, termios).
After a fresh restart, my application works well but after I "kill" the program the Serial (I think) is not released.
I have checked my open files under /dev and have killed the connection to serial USB from there, but my C++ still can't open the USB port.
I have narrowed this down to being a low level Mac OS X issue, regarding blocking the port indefinitely, regardless of closing it using the aforementioned libraries.
Just for context, I'm trying to send numbers through my USB port, serially to an Arduino Duemilanove at 9600 baud. Running Serial Monitor in Arduino is perfectly fine, however, running through a C++ application it freezes up my computer, occasionally, my mouse/keyboard freeze up: requiring a hard reset.
How can this problem be fixed? It seems like Mac OS X is not USB friendly!
Sorry, answered my own question a while back!
After I connect to the Arduino, I have to include a sleep(2) to ensure the serial is actually connected.