API problem

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Mitsuhiro Hayashibe
Posts: 10
Joined: Thu Apr 22, 2010 5:00 am

API problem

Post by Mitsuhiro Hayashibe » Thu Jun 16, 2011 4:12 am

Hi, I have a problem executing the TugOfWar_Complete program. There are no compile errors or warnings. However, when it is run, no single message showed up on the screen.
And another problem is that once I have this problem, testOpenSimAPI.exe has also this problem even if I restart PC.
This testAPI program was working before I have this problem, and If I reinstall opensim, of course testAPI works but again TugOfWar_Complete has same problem and after it, testAPI doen't work.
Except this API problem, Opensim itself works always fine.








User avatar
Mitsuhiro Hayashibe
Posts: 10
Joined: Thu Apr 22, 2010 5:00 am

RE: API problem

Post by Mitsuhiro Hayashibe » Thu Jun 16, 2011 4:17 am

I use OpenSim-2.2.1-win32-VC9P.exe on windowsXP 64bit, but I use Java 32bit.
Cmake 2.8 and VisualStudio9 2008.

User avatar
Mitsuhiro Hayashibe
Posts: 10
Joined: Thu Apr 22, 2010 5:00 am

RE: API problem

Post by Mitsuhiro Hayashibe » Thu Jun 16, 2011 8:13 am

I have tried also on windows7 64bit environment, and it is same. TugOfWar_CreateModel program works, then it is not compile error.
TugOfWar_Complete program may have bug, and it is really problem because once we have this problem, testAPI starts crashing and never recovered even with restarting PC.
Since I tested with windows7, I imagine many people can be in this situation.
Again, Opensim main program works fine. then it is not Java problem.

User avatar
Ayman Habib
Posts: 2252
Joined: Fri Apr 01, 2005 12:24 pm

RE: API problem

Post by Ayman Habib » Thu Jun 16, 2011 10:02 am

Hi Mitsuhiro,

I don't think any of our API programs would have a "destructive" effect on the machine or even on the OpenSim installation on the machine.

Few things to keep in mind:
1. The GUI launches from a batch file that sets its own Path so it's self contained.
2. The GUI also comes with a copy of the 32bit JRE that runs on Windows7 so Java version on the machine is never a problem.
3. The key difference between API and the GUI even though they use the same libraries is that API programs depend on the PATH setting to locate their dlls (Please check that the most recent installation used in building the API program is in the front of the PATH and remove all other unused instances if any).
4. Another difference is that API programs need a working directory to locate the files they need please make sure you run the program you built from the directory described in the developer's guide.

VisualStudio is particularly picky on library versions so it's possible that your version of VisualStudio even though it's 2008 Pro may not be compatible with the libraries used to build the distribution you have because of differences in service packs etc. Do you get a stack trace or some error diagnostic message when you run inside VisualStudio? If so please report so that we can troubleshoot further.

Best regards,
-Ayman


User avatar
Mitsuhiro Hayashibe
Posts: 10
Joined: Thu Apr 22, 2010 5:00 am

RE: API problem

Post by Mitsuhiro Hayashibe » Thu Jun 16, 2011 11:51 pm

Hi Ayman,
Thanks for the reply.

As I explained CreateModelprogram did work, then it should not be PATH problem.
and As I copied exe file into the directory of obj,vtp files, then I think it is not working directory problem.

I tried with 2008pro Japanese version, normally I never have problem when I use other APIs, but if it is picky, It can be.
I will install 2.2.0 version and VC9express version and I will try the compile again.

This is the output from execution in 2008pro. sorry for Japanese
but anyway, it just stuch while importing dlls.

'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\sdk\APIExamples\ExampleMain\RelWithDebInfo\TugOfWar_Complete.exe' を読み込みました。シンボルが読み込まれました。
'TugOfWar_Complete.exe': 'C:\WINDOWS\SysWOW64\kernel32.dll' を読み込みました
'TugOfWar_Complete.exe': 'C:\WINDOWS\SysWOW64\kernel32.dll' をアンロード
'TugOfWar_Complete.exe': 'C:\WINDOWS\SysWOW64\ntdll.dll' を読み込みました
'TugOfWar_Complete.exe': 'C:\WINDOWS\SysWOW64\kernel32.dll' を読み込みました
'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\bin\osimCommon.dll' を読み込みました。バイナリはデバッグ情報と一緒にビルドされませんでした。
'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\bin\xerces-c_2_8.dll' を読み込みました
'TugOfWar_Complete.exe': 'C:\WINDOWS\SysWOW64\advapi32.dll' を読み込みました
'TugOfWar_Complete.exe': 'C:\WINDOWS\SysWOW64\rpcrt4.dll' を読み込みました
'TugOfWar_Complete.exe': 'C:\WINDOWS\SysWOW64\secur32.dll' を読み込みました
'TugOfWar_Complete.exe': 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43\msvcr90.dll' を読み込みました
'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\bin\OpenSim_SimTKcommon.dll' を読み込みました。バイナリはデバッグ情報と一緒にビルドされませんでした。
'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\bin\SimTKlapack.dll' を読み込みました。バイナリはデバッグ情報と一緒にビルドされませんでした。
'TugOfWar_Complete.exe': 'C:\WINDOWS\SysWOW64\msvcrt.dll' を読み込みました
'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\bin\pthreadVC2.dll' を読み込みました
'TugOfWar_Complete.exe': 'C:\WINDOWS\SysWOW64\wsock32.dll' を読み込みました
'TugOfWar_Complete.exe': 'C:\WINDOWS\SysWOW64\ws2_32.dll' を読み込みました
'TugOfWar_Complete.exe': 'C:\WINDOWS\SysWOW64\ws2help.dll' を読み込みました
'TugOfWar_Complete.exe': 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43\msvcp90.dll' を読み込みました
'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\bin\OpenSim_SimTKmath.dll' を読み込みました。バイナリはデバッグ情報と一緒にビルドされませんでした。
'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\bin\OpenSim_SimTKcpodes.dll' を読み込みました。バイナリはデバッグ情報と一緒にビルドされませんでした。
'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\bin\osimSimulation.dll' を読み込みました。バイナリはデバッグ情報と一緒にビルドされませんでした。
'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\bin\OpenSim_SimTKsimbody.dll' を読み込みました。バイナリはデバッグ情報と一緒にビルドされませんでした。
'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\bin\osimAnalyses.dll' を読み込みました。バイナリはデバッグ情報と一緒にビルドされませんでした。
'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\bin\osimActuators.dll' を読み込みました。バイナリはデバッグ情報と一緒にビルドされませんでした。
'TugOfWar_Complete.exe': 'D:\App\OpenSim2.2.1\bin\osimTools.dll' を読み込みました。バイナリはデバッグ情報と一緒にビルドされませんでした。


User avatar
Mitsuhiro Hayashibe
Posts: 10
Joined: Thu Apr 22, 2010 5:00 am

RE: API problem

Post by Mitsuhiro Hayashibe » Fri Jun 17, 2011 6:30 am

I have tried several things, but still situation is same.

I have tried to use English VisualstudioExpressSP1 and Opensim2.2.0VC9E version,and testAPI worked in ExampleMain, and CreateModel program also worked.
then when I tried TugofWar_Compelete, I had same "destructive" effect on the machin.

User avatar
Mitsuhiro Hayashibe
Posts: 10
Joined: Thu Apr 22, 2010 5:00 am

RE: API problem

Post by Mitsuhiro Hayashibe » Fri Jun 17, 2011 6:44 am

I have noticed that after the destructive event, all vtp files and obj file size went into 0KB, then I recopied those files from other PCs, then now TugofWar Complete program works.
I dont know why for first execution, program destroy the files (file itself exist, but 0KB files, thus it is difficult to detect)

I will try again on 2.2.1 and Visual2008Pro. maybe it is same situation.


User avatar
Ayman Habib
Posts: 2252
Joined: Fri Apr 01, 2005 12:24 pm

RE: API problem

Post by Ayman Habib » Fri Jun 17, 2011 1:14 pm

Hi Mitsuhiro,

Can you run your machine in English Locale to see if that fixes the problem? It's disturbing that an API program would destroy these files but it's possible that it's caused by the xml and vtp files have some XML encoding that's not handled properly with Japanese version of the libraries. Please let me know if you try this out how it goes.

Good luck,
-Ayman

User avatar
Mitsuhiro Hayashibe
Posts: 10
Joined: Thu Apr 22, 2010 5:00 am

RE: API problem

Post by Mitsuhiro Hayashibe » Wed Jun 29, 2011 9:08 am

it seems ok with english environment, maybe that is why other people dont complain about it.
and I found other japanese guy is posting similar situation where compile is ok, and running is gone without any message, and maybe it is also due to empty file.
maybe it is happening during initialization phase, since I never has this problem once I copy the files, even in japanese environment.

POST REPLY