Forum Discussion

h_hasenack's avatar
h_hasenack
Occasional Contributor
13 years ago

AQTime combined with dynamic package loading results in serious crash

Hi



We are currently using AQTime pro 7.30.537.64  (64 bit edition, floating license) and are experiencing problems that cause the entire IDE to freeze or crash.



Our app uses dynamic package loading as a plugin system, and during the loading of one of the packages (that requires NexusDB3.103) the entire IDE crashes with an EExternalException in module aqReporter.dll ast 00017E63. External exception C0000026. BTW The app is NOT started using any profiler, just the normal IDE debugger is started. AQTIme integration is present in the IDE.

so..

1) COmpile the app, start debugging

2) breakpoint on loadmodules -> no problem I can debug my app, nu dynamic packages are loaded

3) modules get loaded some get loaded OK

4) tries loading my DB plugin package -> Bang. IDE crash in aqreporter.dll as mentioned before,

5) App dies. And I can do this repeat this each time.



OS? : Both WinXP64 and WinVista64 same problem

IDE?: RADStudioXE2 Update3





When I rename the AQTIme app folder to aqtime7.b00 and restart the IDE the AQTime integration as well as the problem is gone, and I can succesfully debug the dynamically loaded packages.



When I run the app without debugging, also there appears to be no problem.



I've read in another thread on these forums here there might come/be an 3.4 version of AQTime7, maybe this problem was addressed there too?



Also I seems I'm not the only one experiencing this problem:



https://forums.embarcadero.com/thread.jspa?threadID=66702



I have attached process explorers' list of DLL's at the thime thr BDS displays the external exception. and a screenshot of the active threads after the crash displayed.



I hope it will help to pin down this nasty problem.



Regards



Hans Hasenack

9 Replies

  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Hans,


    I've consulted with our developers, and below, there are the things I could find out:


    * Most likely, the C0000026 exception is raised by your application (that is why you failed to reproduce the behavior without AQtime integration). The problem is that AQtime shouldn't catch such exceptions.


    * So, to help us investigate the problem, please follow the steps below:

    1. Start AQtime with the -NotOpenApp command-line argument. For example, you can use the following command line:

    "c:\Program Files\SmartBear\AQtime 7\Bin\AQtime.exe" -NotOpenApp


    2. Select the 'File | Open...' main menu item.


    3. In the Open File dialog, select the executable file of the RAD studio and click Open.


    4. Select the "Tracing | Exception Trace Profiler" profiler.


    5. Click the Run toolbar button (the green arrow) or press F5 to start the profiling.


    6. AQtime will start the IDE.


    7. Perform all the described actions before loading the DB plug-in package.


    8. Select the "Options | Options..." main menu command - the Options dialog will appear.


    9. Enable the "Profiling Time | Event View | Debug Events | Generate dump on exception" option and specify a dump folder.


    10. Set the "Profiling Time | Event View | General | Exceptions | Depth shown" setting to 100 and click OK.


    11. Load the DB plug-in package and AQtime will generate dump files for all exceptions that will occur in the application until it is closed.


    12. After the problem occurs, right-click somewhere within the Event View panel (it is opened by default at the bottom of AQtime's window) and select the 'Save All...' item.


    13. Save the panel's contents to an HTML file and send the file along with all of the generated dump files to our Support Team via the Contact Support form.


    Thanks in advance.

  • h_hasenack's avatar
    h_hasenack
    Occasional Contributor
    Done. (within 10 minutes no confirmation mail received yet )



    Hans
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Hans,


    I've checked our DB and found your request. Our Support Team is going to continue working with you via e-mail.


    Thanks :)

  • h_hasenack's avatar
    h_hasenack
    Occasional Contributor
    Status update



    It appears in one of my bpls for multithreading I had 2 CreateSemaphore calls, and the application forgot to close the handles.

    The 2nd time the application was started (or maybe even in the IDE) this seems to create some kind of conflict causing the external exception.



    I found the resource leaks using AQTime -NoOpenApp parameter, not running ot from the IDE but separately.



    Next I added the required code to close the semaphores, and it seems like the IDE crash problem is gone.



    I will let you know if -after some more serious retesting- the problem is really gone.



    Maybe you can confirm the External Exceptions may happen because of things like this.
  • h_hasenack's avatar
    h_hasenack
    Occasional Contributor
    Status Update - No joy, problem still occurs on my Win7x64 PC. I will create an exception.event log here as well. Maybe this will shed some more light.
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Hans,


    As far as I know, David has already replied to your support request. Have you received this message? If you have, please continue working with our Support Team via e-mail. Also, please send any additional information you get (dump files, Event View contents, and so on) directly to our Support Team.


    Thanks.

  • h_hasenack's avatar
    h_hasenack
    Occasional Contributor
    Ah...



    Yes I got a message stating he will look into the case, so except from your reply in the forum no other hints/suggestions have arrived yet.



    The mails have to go through our info@ mailbox which makes them appear the next day when our secretary forwards them. I asked to send replies to my work and private email accounts too, but I just got the message today ;)



    I'll send my status updates by email from now.
  • h_hasenack's avatar
    h_hasenack
    Occasional Contributor
    After some correspondation by email, at first it seemed the problem was caused by the aqtime IDE plugin extension being compiled with XE2 Update2. I got a new bpl (to test) and the problem appeared to have gone away.



    BUT as it turned out, I had also disabled my exception hooking code meanwhile. And this again turned out to be the real issue. 



    What actually hgappened is that the initialization code installed for exception hook, also was executed when my bpl was loaded by the IDE (support for some designtime package). And this probably caused a mixup with the IDE's  own exception handling routines, and crashed the IDE in a very crude way.



    Also de XE2 internal debugger seemed to have trouble with my exception handling code. 



    The solution was to extend the initialization routine so my hooks won't be installed:

    1) if the bpl was loaded by BDS.EXE

    2) if DebugHook<>0



    I must say Smartbear (support at automatedqa.com) took my report very seriously and helped to fix the issue. Great support. Thanks David.
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Hans,



    Thank you for the update - it might be helpful for others...