Closed exander77 closed 11 years ago
Ignore it? Compile as release?
Is it a crash or just an assert?
Sent from Windows Mail
From: Ensiform Sent: May 4, 2013 6:52 PM To: Razish/OpenJK Subject: Re: [OpenJK] Crash while playing - G2API_CopyGhoul2Instance (#196)
Ignore it? Compile as release?
— Reply to this email directly or view it on GitHub.
I had precisely the same problem. I fixed it by commenting out the failing assert. Seems to have fixed the issue with no ill effects.
It seems odd to have an assert that can be consistently ignored without issue.
The underlying cause of the assert needs to be investigated but I'm pretty sure it's due to the lack of an efx file.
Sent from my Windows Phone
From: cadika-orademailto:notifications@github.com Sent: 5/9/2013 5:09 PM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Crash while playing - G2API_CopyGhoul2Instance (#196)
I had precisely the same problem. I fixed it by commenting out the failing assert. Seems to have fixed the issue with no ill effects.
Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/196#issuecomment-17689969
I'm still a bit green on more advanced C++ and very new to such a large codebase, so pardon my ignorance.
If it is an error that can come and go completely ignored without causing any obvious problems, can it not just be ignored? What sort of risks might be involved in ignoring it?
On Thursday, May 9, 2013, eezstreet wrote:
The underlying cause of the assert needs to be investigated but I'm pretty sure it's due to the lack of an efx file.
Sent from my Windows Phone
From: cadika-orade<mailto:notifications@github.com <javascript:_e({}, 'cvml', 'notifications@github.com');>> Sent: 5/9/2013 5:09 PM To: Razish/OpenJK<mailto:OpenJK@noreply.github.com <javascript:_e({}, 'cvml', 'OpenJK@noreply.github.com');>> Cc: eezstreet<mailto:eezstreet@live.com <javascript:_e({}, 'cvml', 'eezstreet@live.com');>> Subject: Re: [OpenJK] Crash while playing - G2API_CopyGhoul2Instance (#196)
I had precisely the same problem. I fixed it by commenting out the failing assert. Seems to have fixed the issue with no ill effects.
Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/196#issuecomment-17689969
— Reply to this email directly or view it on GitHubhttps://github.com/Razish/OpenJK/issues/196#issuecomment-17697517 .
If it is an error that can come and go completely ignored without causing any obvious problems, can it not just be ignored?
Because there may be non-obvious problems.
There is no ill cause of the assert. The modelindex isn't even used anywhere other than the assert. And is set legitimately to -1 by gamecode.
Which leads me to wonder what the purpuse of the code was in the first place.
On Friday, May 10, 2013, Ensiform wrote:
There is no ill cause of the assert. The modelindex isn't even used anywhere other than the assert. And is set legitimately to -1 by gamecode.
— Reply to this email directly or view it on GitHubhttps://github.com/Razish/OpenJK/issues/196#issuecomment-17724610 .
Judging by the comment next to the assertion in the code, G2API_CopyGhoul2Instance used to be able to copy specific models from the Ghoul2 instance -- I seem to remember the Solder of Fortune 2 SDK code doing this. They disabled this in JK2 and JKA, so the assertion is checking that coders aren't relying on the SoF2 functionality. As @ensiform said, the modelIndex isn't used, but previously giving modelIndex == -1 copied all models. Now, all models are copied regardless.
So it should be safe to remove the assertion :)
Fascinating. Thank you!
On Friday, May 10, 2013, Alex Lo wrote:
Judging by the comment next to the assertion in the code, G2API_CopyGhoul2Instance used to be able to copy specific models from the Ghoul2 instance -- I seem to remember the Solder of Fortune 2 SDK code doing this. They disabled this in JK2 and JKA, so the assertion is checking that coders aren't relying on the SoF2 functionality. As @ensiformhttps://github.com/ensiformsaid, the modelIndex isn't used, but previously giving modelIndex == -1 copied all models. Now, all models are copied regardless.
— Reply to this email directly or view it on GitHubhttps://github.com/Razish/OpenJK/issues/196#issuecomment-17725126 .
The code calling it needs to be fixed then.
Sent from my Windows Phone
From: cadika-orademailto:notifications@github.com Sent: 5/10/2013 11:01 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Crash while playing - G2API_CopyGhoul2Instance (#196)
Fascinating. Thank you!
On Friday, May 10, 2013, Alex Lo wrote:
Judging by the comment next to the assertion in the code, G2API_CopyGhoul2Instance used to be able to copy specific models from the Ghoul2 instance -- I seem to remember the Solder of Fortune 2 SDK code doing this. They disabled this in JK2 and JKA, so the assertion is checking that coders aren't relying on the SoF2 functionality. As @ensiformhttps://github.com/ensiformsaid, the modelIndex isn't used, but previously giving modelIndex == -1 copied all models. Now, all models are copied regardless.
— Reply to this email directly or view it on GitHubhttps://github.com/Razish/OpenJK/issues/196#issuecomment-17725126 .
Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/196#issuecomment-17725254
Probably this line in code/game/g_combat.cpp, line 2059:
gi.G2API_CopyGhoul2Instance( ent->ghoul2, limb->ghoul2, 0 );
Model index is 0 there though, not -1
Sent from my Windows Phone
From: Alex Lomailto:notifications@github.com Sent: 5/10/2013 11:47 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Crash while playing - G2API_CopyGhoul2Instance (#196)
Probably this line in code/game/g_combat.cpp, line 2059:
gi.G2API_CopyGhoul2Instance( ent->ghoul2, limb->ghoul2, 0 );
Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/196#issuecomment-17727966
Exactly, it should be -1, and not 0. (The assertion makes sure that the modelIndex is -1)
Oh right. Yeah, simple/easy fix. I do think that the SoF2 functionality should be restored at some point though.
Sent from my Windows Phone
From: Alex Lomailto:notifications@github.com Sent: 5/10/2013 11:59 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Crash while playing - G2API_CopyGhoul2Instance (#196)
Exactly, it should be -1, and not 0. (The assertion makes sure that the modelIndex is -1)
Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/196#issuecomment-17728673
I am not familiar with SoF2 or any Tech3-based games other than Jedi Academy.
Exactly what is that functionality, from the player's point of view?
It's more for coder's convenience (and probably would be a bit more efficient too). The player wouldn't notice any difference if it was restored or not.
There is potential for more features here with Ghoul 2.
Sent from my Windows Phone
From: Alex Lomailto:notifications@github.com Sent: 5/10/2013 3:10 PM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Cc: eezstreetmailto:eezstreet@live.com Subject: Re: [OpenJK] Crash while playing - G2API_CopyGhoul2Instance (#196)
It's more for coder's convenience (and probably would be a bit more efficient too). The player wouldn't notice any difference if it was restored or not.
Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/196#issuecomment-17738970
If we're going to port back SoF2 functionality of Ghoul2, we best make a new issue for it, otherwise I'm closing this as the concern at hand has been dealt with.
It happens while killing this guy by saber: code/ghoul2/G2_API.cpp:1854: void G2API_CopyGhoul2Instance(CGhoul2Info_v&, CGhoul2Info_v&, int): Assertion `modelIndex==-1' failed.