#1  
Old 29th November 2022, 04:03 AM
gsachs gsachs is offline
Member
 
Join Date: Oct 2008
Posts: 68
Default API failure when running with Codewatch

On a system with freshly installed QualitySuite 1.65 I tried to run an existing exe with Codewatch.
I get the error API failure:GetProcAddress, see attached screenshot.
The same exe works smoothly without qualitysuite.
I'm working in a VMWare VM, OS Windows11, Delphi Alexandria with latest updates.
If i try to call function Sysinit.isWine from my software, I am told that it is undeclared.
The function in SysInit is surrounded by a {$IFDEF MSWINDOWS} {$ENDIF} pair. I expected the MSWINDOWS to be defined when a windows target is defined.
But even if I add the {$DEFINE MSWINDOWS} in my main .pas file shortly before formcreate that in turn should call isWine I get the information 'undeclared identifier'.
Any idea ?
Attached Files
File Type: zip QualitySuite Screenshot 2022-11-28 173950.zip (31.9 KB, 6 views)
  #2  
Old 29th November 2022, 08:28 AM
Thorsten Engler [NDA]
 
Posts: n/a
Default Re: API failure when running with Codewatch

I'm sorry, but I fail to see what your problem or complaint here is?

SysInit is an internal unit of the Delphi RTL (which you aren't supposed to
ever explicitly "use") which contains the basic entry point code that is first
run for any Delphi application which sets up the environment for the RTL.

SysInit contains a function IsWine. As part of the process starting, it calls
that function.

IsWine determines if it is running under Wine by trying to get the proc pointer
for wine_get_version from ntdll.dll, which only exists when running under Wine
(windows environment under linux), and not when running on actual windows.

So that call fails and returns nil, which the code of IsWine checkes for to
return a boolean indicating if the process is running under Wine or not.

CodeWatch, as it should, reports that this API call failed. Which in this
particular case is fine and expected.

I'm perplexed what exactly it is you are asking?

gsachs wrote:

>
> On a system with freshly installed QualitySuite 1.65 I tried to run an
> existing exe with Codewatch.
> I get the error API failure:GetProcAddress, see attached screenshot.
> The same exe works smoothly without qualitysuite.
> I'm working in a VMWare VM, OS Windows11, Delphi Alexandria with latest
> updates.
> If i try to call function Sysinit.isWine from my software, I am told
> that it is undeclared.
> The function in SysInit is surrounded by a {$IFDEF MSWINDOWS} {$ENDIF}
> pair. I expected the MSWINDOWS to be defined when a windows target is
> defined.
> But even if I add the {$DEFINE MSWINDOWS} in my main .pas file shortly
> before formcreate that in turn should call isWine I get the information
> 'undeclared identifier'.
> Any idea ?
>
>
> +-------------------------------------------------------------------+
> > Filename: QualitySuite Screenshot 2022-11-28 173950.zip |
> > Download: http://www.nexusdb.com/forums/attachment.php?attachmentid=2076|

> +-------------------------------------------------------------------+


  #3  
Old 30th November 2022, 04:29 AM
gsachs gsachs is offline
Member
 
Join Date: Oct 2008
Posts: 68
Default

The applications run when starting it inside or outside Delphi.
They do not run if I start them inside Delphi by using Codewatch.
The codewatch window comes up, then I click on the green go button.
The session summary occurs, on the bottom statusfield 'Application has terminated' is displayed.
I tried several applications, all behave equal.

I did never use SysInit explicitly, it just did it here to see what happened.
The problem that codewatch is reporting is that GetProcAddress was not found.
  #4  
Old 30th November 2022, 11:08 AM
Thorsten Engler [NDA]
 
Posts: n/a
Default Re: API failure when running with Codewatch

Sorry, I did not read your mail as meaning that there is a difference in
behaviour when running the app under CodeWatch and outside of it. (Having
re-read your original post again, I still don't see it.)

The reported API failure is probably a red herring, as far as I can tell, the
process keeps running a bit further before crashing, and that reported API
failure is simply always going to show because it happens very early and isn't
yet in the list of filtered failures (as it was newly introduced in Delphi 11
as far as I can tell). The crash a short time later has nothing to do with that
as far as I can determine.

I'll leave digging into what actually goes wrong here to Eivind, has NQS is his
bailiwick.

Cheers,
Thorsten


gsachs wrote:

>
> The applications run when starting it inside or outside Delphi.
> They do not run if I start them inside Delphi by using Codewatch.
> The codewatch window comes up, then I click on the green go button.
> The session summary occurs, on the bottom statusfield 'Application has
> terminated' is displayed.
> I tried several applications, all behave equal.
>
> I did never use SysInit explicitly, it just did it here to see what
> happened.
> The problem that codewatch is reporting is that GetProcAddress was not
> found.




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CodeWatch duplicates error Sue King nexusdb.public.support.qualitysuite 1 15th May 2020 04:33 PM
Ann: Nexus Quality Suite CodeWatch and 64 bit update Eivind Bakkestuen [NDD] nexusdb.public.support.qualitysuite 2 3rd September 2016 03:40 PM
Ann: Nexus Quality Suite CodeWatch and 64 bit update Eivind Bakkestuen [NDD] nexusdb.public.support 0 26th August 2016 11:38 PM
Ann: Nexus Quality Suite CodeWatch and 64 bit update Eivind Bakkestuen [NDD] nexusdb.public.announcements 0 26th August 2016 11:38 PM
Delphi7 Turbopower CodeWatch memory filter Pleun van der Lugt Binaries 0 14th September 2003 04:28 AM


All times are GMT +11. The time now is 01:15 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.