• Welcome to Kart Racing Pro Official Forum. Please login or sign up.
 
March 28, 2024, 09:40:31 AM

News:

Kart Racing Pro release13e available! :)


Output Plugins

Started by PiBoSo, June 19, 2010, 10:40:35 PM

Previous topic - Next topic

HornetMaX

Quote from: Racer_S on January 04, 2018, 04:14:59 PM
Trying to update some of my existing output plugins for V4. 

When using the new plugin example from the website the game is crashing when clicking ToTrack.  Even with no changes to example.

Anyone else?
All my plugins work fine with v4 (no change from v3, v2, v1 and beta16, if I recall correctly).
I'm tempted to say you're doing something wrong.
Two wheels, more than enough.

PiBoSo

Quote from: Racer_S on January 04, 2018, 04:14:59 PM
Trying to update some of my existing output plugins for V4. 

When using the new plugin example from the website the game is crashing when clicking ToTrack.  Even with no changes to example.

No changes have been made to the plugins interface, so all plugins for previous versions, down to Beta16, should still work.

Racer_S

January 04, 2018, 07:50:22 PM #32 Last Edit: January 04, 2018, 09:00:56 PM by Racer_S
Thanks for the quick reply guys.

The old plugin used to work with older version of KRP but it does not work anymore, hence the reason I am trying to update.

The only difference from my old source I can see is GetModDataVersion was changed to 6, and RPM was changed from float to integer?

I am using Visual Studio 2013 to compile, the project was created using the empty DLL template.

I've tried adding extern "C" and compiling as C code,  It still crashes when I click ToTrack.

Does KRP not like VS2013 compiler?


EDIT: I tried compiling the example with MinGW and its crashing still.







Racer_S

No solution?

The example does not work without crashing.

Steps to reproduce:

Compiling latest example as DLL with DLO extension and placing in plugin folder. 

Crashes when clicking ToTrack in KRP release 4.


HornetMaX

Quote from: Racer_S on January 04, 2018, 07:50:22 PM
The only difference from my old source I can see is GetModDataVersion was changed to 6, and RPM was changed from float to integer?
No, I think there's also the extra field "int m_iInvalid;" in structures SPluginsKartLap_t and SPluginsRaceLap_t.
Two wheels, more than enough.

PiBoSo

Quote from: Racer_S on January 09, 2018, 04:08:44 PM
No solution?

The example does not work without crashing.

Steps to reproduce:

Compiling latest example as DLL with DLO extension and placing in plugin folder. 

Crashes when clicking ToTrack in KRP release 4.

No crash here with the compiled example.
What compiler are you using? Are you compiling as C? Is the integer size 32 bits? Is the struct member alignment 8 bytes?

Racer_S

I am indeed compiling as C.

If compiled as C++, the game does not recognize it and there is no crash.

I have tried with the new version of WRS and his example output plugin and same problem there.
Strange because I never had this problem with the older versions of KRP and WRS.

I have tried aligning the structs with #pragma pack ( 8 )
Tried turning off all optimizations, tried compiling with older visual studio toolset compilers, and intel compiler...

Always crashes when clicking ToTrack..  I am out of ideas.



Some other details:
I am testing with the DEMO

This is the order I am starting the race
Testing>Start >ToTrack *crash*


Here is a link to the visual studio project and compiled DLO plugin.

https://drive.google.com/file/d/1N5XgUaZ-iQeCGFYz0Nro2mZupXhfCXWc/view?usp=sharing


Thanks for any help, I think I will just recommend our clients use an older version of KRP for now.

Racer_S

FWIW, I've solved the crashing problem by commenting out this function:


__declspec(dllexport) void Draw(int _iState, int *_piNumQuads, void **_ppQuad, int *_piNumString, void **_ppString)
{

}


I didnt need it in my case anyway. Thanks!

PiBoSo

Quote from: Racer_S on February 14, 2018, 06:46:31 PM
FWIW, I've solved the crashing problem by commenting out this function:


__declspec(dllexport) void Draw(int _iState, int *_piNumQuads, void **_ppQuad, int *_piNumString, void **_ppString)
{

}


I didnt need it in my case anyway. Thanks!

Thank you for the report.

PiBoSo


Please note that, starting with Release8, output plugins must be compiled for 64 bit.

PiBoSo

Example source code updated to add a couple functions to control the replay / live riders and cameras selection.