Intraweb class not found at runtime - c++

I've beenworking with the IntraWeb framework on Borland C++Builder. Sometimes it happens that an application crashes because of a strange uncaught exception:
An unhandled application error has occured within My IntraWeb Application.
...
Error message raised by the application: Class TIWTimer not found
This happens when a new session is started. For example, by entering the address in a browser.
Also, the message appears in the classic IntraWeb error web page
The class that cannot be found is either TIWTimer or TIWButton but I think this is irrelevant.
The problem seems to occur randomly and sometimes goes away with a rebuild, but other times it will go away by rewriting the code or starting from a new project.
So, the question is, how come the link error is not found at link-time?
Why does it occur at all, since those classes belong to the standard IW library?
Has anyone had the same issue?
How can it be solved?

Use Intraweb XII in C++Builder XE2, it has good improvement and bug fixes.
in this version you can assign urls to forms, for example:
myhost/login.htm or myhost/login.aspx
for more information see this

Related

C++ Builder XE7: Using TChart in packages

I am confronted with a weird situation and I couldn't find any informations about this yet.
I have postet this issue allready on the new Embarcadero community forum but I'm not very hopeful that I will get an answer there... So I decided to create a new account here.
http://community.embarcadero.com/index.php/forum/tools/336-c-builder-xe7-and-teechart-standard)
I use the TChart component which is shiped with the IDE of XE7 (like in older versions). When I
use it in a package (.dll or .bpl) I get an access violation when I dynamically load, unload, and reload (reloading is the problem) the package wich contains a form with a chart in it. I looked at the loaded packages with a process monitoring tool and everything seems to be allright. The Tee9210.bpl is loaded successfully. When compiling the projects with /XE6 this error doesn't occur.
I could reproduce this on a second environement so I don't think its an issue of my installation/pc.
Can anybody reproduce this? I could provide a test project if needed.
Thank you in advance.
Kerem
Edit:
Access Violation when loading the bpl the second time:
Exception class: $C0000005
Message: 'access violation at 0xeeffeeff: access of address 0xeeffeeff'
I noticed that when I try to load the bpl again after this message I get a different exception:
Exception class: $C0000005
Message: 'access violation at 0x503230cf: read of address 0x00000000'
Sorry for posting the same question on two pages, but I wasn't sure if the new embarcadero
forum is popular enough to expect an answer from there.
But fortunately Yeray from Steema is active there, too. And I hope the solution could be read on the following link soon.
http://community.embarcadero.com/index.php/forum/tools/336-c-builder-xe7-and-teechart-standard

This application has requested the runtime to terminate it in an unusual way QT C++

I am developing a Fifteen Puzzle Game in QT C++. Game works sometimes fine and sometimes crashed during run. I don't know the problem. I looked into different forums and found different suggestions. Some say this error is due to missing dll etc.
A window appears with Error is below
Microsoft Visual C++ Runtime Library
This application has requested the runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
I solved the problem: Actually I was accessing a vector location which was not available. assert() helped me to troubleshoot. Thanks #DNT

C++ DX11 application only runs in Visual Studio IDE

Alright, I presented this question on the MSDN forums but have yet to receive any kind of response so I figured I'd give StackOverflow a try.
I'm currently developing a DirectX application using VS2008 on Win7. I recently experienced a nasty memory corruption bug with a memory allocation class that grabbed byte aligned memory. During this bug I could still run the debug and release executables however it would crash due the instructions getting corrupted or whatever, but it would still execute for a bit until the crash.
I then stripped out the entire memory allocation class. The application runs perfectly in the IDE (release and debug builds) but I can't run any of the executables at all. They immediately crash with a non-responding/stop working error. And I don't think it is my environment because I get the same issue on another computer that wasn't having problems before either.
Dependency walker gives a "Warning: At least one delay-load dependency module was not found. Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module." error and indicates that GPSVC.dll and IESHIMS.DLL can't be found. I've read that this can be misleading and just indicates a potential problem somewhere. And Dependency walker wasn't giving me this error the day before.
I haven't tinkered with any of the configuration or project settings or added new code. Any idea of what could be causing this behavior?
Also another note, I installed the Windows 7.1 sdk the same day. Think this could be some kind of compiler related bug?
Just in case some useful information pops up on the MSDN post, here is the link
http://social.msdn.microsoft.com/Forums/en-IE/vsdebug/thread/f692b394-8af2-4453-991c-aa6a443a9019
Thanks!
Edit -
Here is the last couple lines of Dependency Walker's profiling output
GetProcAddress(0x76CD0000 [c:\windows\syswow64\KERNEL32.DLL], "DecodePointer") called from "c:\windows\syswow64\NVWGF2UM.DLL" at address 0x6D8BAE4F and returned 0x77B59D65.
GetProcAddress(0x76CD0000 [c:\windows\syswow64\KERNEL32.DLL], "DecodePointer") called from "c:\windows\syswow64\NVWGF2UM.DLL" at address 0x6D8BAE4F and returned 0x77B59D65.
GetProcAddress(0x76CD0000 [c:\windows\syswow64\KERNEL32.DLL], "EncodePointer") called from "c:\windows\syswow64\NVWGF2UM.DLL" at address 0x6D8BAF60 and returned 0x77B60FDB.
GetProcAddress(0x76CD0000 [c:\windows\syswow64\KERNEL32.DLL], "DecodePointer") called from "c:\windows\syswow64\NVWGF2UM.DLL" at address 0x6D8BAF70 and returned 0x77B59D65.
Second chance exception 0xC0000005 (Access Violation) occurred in "c:\users\joel\desktop\DXAPP.EXE" at address 0x0110152E.
Exited "c:\users\joel\desktop\DXAPP.EXE" (process 0x27D8) with code 255 (0xFF).
Is this referring to a DLL grabbing a null pointer or to my actual instructions? Going to read up on how to use WinDbg real quick and I'll post it's output if this doesn't shed any immediate light on the issue.
Edit 2 -
Simply running the application and hitting debug to bring up Visual Studio consistently brought me to where I'm compiling my shaders. I'm assuming at the moment that the root of the problem lies around this. However, I still don't understand the change of behavior during execution between using the IDE and not.
Solution! -
I was so thrown off by the previous memory corruption bug that I didn't realize my shaders weren't in a local directory to the executables. This in turn was generating a null pointer that wasn't handled properly after calling D3DX11CompileFromFile().
Shoot, sorry I meant to post this as a comment...
I can only suggest more diagnostic attempts.
One would be to profile the app from within Depends, this will also show dynamic DLL loads and might show something new. Also it captures the debug output. It may behave differently than launching in the debugger itself and provide a clue. You don't mention actually profiling so I thought I'd suggest it in case you hadn't. Also, pay very close attention to the paths for the DLL's loaded - you might be surprised at a DLL loading from a location other than you intended.
Another suggestion is to try at attach to the stopped app after the crash (before dismissing the error dialog). See if you can get a stack trace or anything out of it.
Finally try attaching (or even launching from) WindDbg rather than the IDE. Like the Depends profile, the difference in debugger behavior and how it hooks the app may allow the crash to happen, while providing the clues you need.
Good Luck!

c++ Service is stopping with error "this application has requested the runtime to terminate it an unusual way"

I have a c++ NTservice which is being accessed by SAP modules through rfc calls. Now this service is getting stopped with a message that "this application has requested the runtime to terminate it an unusual way" and then showing some IE script error that points to url "res://C:\WINDOWS\System32\mmcndmgr.dll/views.htm" -- I am getting this error very rarely and unexpectedly.
I have no clue why this error is coming, please anyone can guide me about the details and how to correct it if possible
(Windows xp, service is created in MSVC 2005)
Thanks,
Anil
That error message (at least usually) means you had an uncaught exception. You could start by adding a try/catch(std::exception const &e)/catch(...) to your ServiceMain, in an attempt at catching the exception and if it is a derivative of std::exception, printing out its what() to see what it has to say for itself...
That's the very unhelpful message that displays when your executable has crashed. Almost anything could be wrong.
Run your executable through a debugger and wait for the problem to occur. You can then try to find out more information about it.
In particular I'd check the service's documentation and make sure that your SAP modules are using the RFC calls correctly.

Invalid lock sequence error in an OpenSceneGraph application

I have an application that is built against OpenSceneGraph (2.6.1) and therefore indirectly OpenGL. The application initializes and begins to run, but then I get the following exception "attempt was made to execute an invalid lock sequence" in OpenGL32.dll. When I re-run it, I sometimes get this exception, and sometimes an exception about a "privileged instruction". The call stack looks like it is corrupted, so I can't really tell exactly where the exception is being thrown from. I ran the app quite a bit a couple of days ago and never saw this behavior. Since then I have added an else clause to a couple of ifs, and that is all. My app is a console application, is built with Visual Studio 2008, and it sets OpenScenGraph to SingleThreaded mode. Anybody seen this before? Any debugging tips?
Can you reproduce it with one of the standard examples?
Can you create a minimal app that causes this?
Do you have a machine with a different brand video card you can test it on (eg Nvidia vs. ATI) there are some issues with openscenegraph and bad OpenGL drivers.
Have you tried posting to osg-users#lists.openscenegraph.org
The problem turned out to be our app was picking up an incorrect version of the OpenGL DLL , instead of the one installed in System32.