Tracing on Windows - "failed to execute ... (2)"

José Fonseca jose.r.fonseca at gmail.com
Sun Oct 12 09:17:41 PDT 2014


So viewer.exe is 32.bit, but java is 64-bit, and you want to trace the java
process.

apitrace can follow child processes on Windows, but no if they differ in
32-bits vs 64bits.  It's not impossible to fix, but it would require the
cooperation of both 32 and 64 bits apitrace binaries which is something
that hasn't been implemented.

There are two things you could try:

- copy the wrapper opengl32.dll from the 64-bits binaries, temporarily
place in the directory where java.exe is (or your program's other DLLs),
run the program normally (through viewer.exe, not using `apitrace trace`),
then remove the wrapper opengl32.dll when done. This might remote

- use procexp to discover the Java classpath and arguments, then run
`apitrace trace java ...` directly, with 64-bit binaries, hence bypassing
viewer.exe

Jose

On Sun, Oct 12, 2014 at 3:26 AM, <io.github.apitrace at io7m.com> wrote:

> Hi.
>
> I'm trying to debug an OpenGL program written in Java. The program
> comes with a tiny frontend executable that simply sets up the Java
> classpath and forks a JVM to run the program. The executable was
> produced with launch4j (http://launch4j.sourceforge.net).
>
> I'm using the latest apitrace binaries available on the site
> (http://people.freedesktop.org/~jrfonseca/apitrace/apitrace-msvc-latest.7z
> ).
>
> I get the following error when trying to trace the program:
>
>   > apitrace trace --verbose viewer.exe
>   info: did not find
> C:\Users\testing\Desktop\apitrace-msvc\x86\bin\..\wrappers\RelWithDebInfo\opengl32.dll
>   info: found
> C:\Users\testing\Desktop\apitrace-msvc\x86\bin\..\wrappers\opengl32.dll
>   inject:
> C:\Users\testing\Desktop\apitrace-msvc\x86\bin\..\wrappers\opengl32.dll
> viewer.exe
>   error: failed to execute viewer.exe (2)
>
> I've tried the x64 version but receive the same error.
>
> Any idea how I can get some better error reporting out of it?
>
> Some info that may be relevant: The system's JVM is a 64-bit executable:
>
>   > java -version
>   java version "1.8.0_20"
>   Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
>   Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
>
> ... but I believe viewer.exe may be 32-bit. Could this have any effect
> on apitrace?
>
> M
> _______________________________________________
> apitrace mailing list
> apitrace at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/apitrace
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/apitrace/attachments/20141012/a16cb4d5/attachment.html>


More information about the apitrace mailing list