Active Member Exygo 1088 Posted October 23, 2017 Active Member Share Posted October 23, 2017 (edited) Hello guys, I made this thread to inform you about a little bug that I found. Some of you maybe didn't know about it or just simply don't have it or it happens just for some video cards. I thought this may be useful for some users so this is the info. This bug is also on official servers too. How to reproduce the bug Set the resolution to a higher one in config.exe, for me it happens with resolutions above 1280x800(I used 1440x900 to reproduce the bug) The bug is from one of the assert functions in binary src and only happens when you move your character with W A S D keys, if you move it using just mouse cursor everything is fine. You can see the error if you reproduce the bug with the binary compiled on DEBUG mode. Bug preview: Spoiler Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
Active+ Member Abel(Tiger) 1193 Posted October 23, 2017 Active+ Member Share Posted October 23, 2017 I had that bug too, for me was a python problem . (For me not just freeze, it was like some windows are opened and opened again) In uiplayergauge.py result of some operations was NaN and tried to put Gauge on NaN position. eg.: (x - self.GetWidth()/2 = NaN). Try to use this file: https://ghostbin.com/paste/8kf22 1 1 Link to comment Share on other sites More sharing options...
Active Member Exygo 1088 Posted October 23, 2017 Author Active Member Share Posted October 23, 2017 2 hours ago, Abel(Tiger) said: For me not just freeze, it was like some windows are opened and opened again Like the renderer stopped working https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
PeaceMaker 121 Posted June 26, 2019 Share Posted June 26, 2019 (edited) On 10/23/2017 at 3:04 PM, Exygo said: Hello guys, I made this thread to inform you about a little bug that I found. Some of you maybe didn't know about it or just simply don't have it or it happens just for some video cards. I thought this may be useful for some users so this is the info. This bug is also on official servers too. How to reproduce the bug Set the resolution to a higher one in config.exe, for me it happens with resolutions above 1280x800(I used 1440x900 to reproduce the bug) The bug is from one of the assert functions in binary src and only happens when you move your character with W A S D keys, if you move it using just mouse cursor everything is fine. You can see the error if you reproduce the bug with the binary compiled on DEBUG mode. Bug preview: Reveal hidden contents Have anyone been able to fix this bug ? Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Active Member Exygo 1088 Posted June 26, 2019 Author Active Member Share Posted June 26, 2019 void CCamera::SetViewMatrix() { m_v3View = m_v3Target - m_v3Eye; D3DXVECTOR3 v3CenterRay = -m_v3View; CalculateRoll(); m_fDistance = D3DXVec3Length(&m_v3View); if (std::isnan(m_fDistance)) // 19 august 2018 { std::string s_m_fDistance = std::to_string(m_fDistance); //CScreen s; s.UpdateViewMatrix(); // scos TraceError("SetViewMatrix : m_fDistance is NaN, value %s", s_m_fDistance.c_str()); } assert(m_fDistance >= 0); // problem Not fixed but actually found where is the problem, it happens mostly when you move the character a lot near bridges using only mouse not WASD. The problem is still on the official servers if I am not wrong I remember long time ago I checked and they got the problem too. 1 https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
PeaceMaker 121 Posted June 27, 2019 Share Posted June 27, 2019 On 6/26/2019 at 11:36 AM, Exygo said: void CCamera::SetViewMatrix() { m_v3View = m_v3Target - m_v3Eye; D3DXVECTOR3 v3CenterRay = -m_v3View; CalculateRoll(); m_fDistance = D3DXVec3Length(&m_v3View); if (std::isnan(m_fDistance)) // 19 august 2018 { std::string s_m_fDistance = std::to_string(m_fDistance); //CScreen s; s.UpdateViewMatrix(); // scos TraceError("SetViewMatrix : m_fDistance is NaN, value %s", s_m_fDistance.c_str()); } assert(m_fDistance >= 0); // problem Not fixed but actually found where is the problem, it happens mostly when you move the character a lot near bridges using only mouse not WASD. The problem is still on the official servers if I am not wrong I remember long time ago I checked and they got the problem too. Kinda hard to track it down as i use nvidia . But thanks ill look it up Link to comment Share on other sites More sharing options...
Honorable Member Distraught 5881 Posted October 28, 2019 Honorable Member Share Posted October 28, 2019 i didnt check it yet in its original context but u said it was an assertion... actually it's the purpose of them (they only get triggered in debug mode as they're for the developers) but by looking at what u copied here, the easiest solution would be to clamp the distance like changing this part m_fDistance = D3DXVec3Length(&m_v3View); if (std::isnan(m_fDistance)) // 19 august 2018 { std::string s_m_fDistance = std::to_string(m_fDistance); //CScreen s; s.UpdateViewMatrix(); // scos TraceError("SetViewMatrix : m_fDistance is NaN, value %s", s_m_fDistance.c_str()); } assert(m_fDistance >= 0); // problem to this one line m_fDistance = std::max(0, D3DXVec3Length(&m_v3View)) ; as its just about rendering we dont have to be really strict and it should actually solve the problem Link to comment Share on other sites More sharing options...
sss221 0 Posted April 30 Share Posted April 30 On 10/28/2019 at 5:32 AM, Distraught said: i didnt check it yet in its original context but u said it was an assertion... actually it's the purpose of them (they only get triggered in debug mode as they're for the developers) but by looking at what u copied here, the easiest solution would be to clamp the distance like changing this part m_fDistance = D3DXVec3Length(&m_v3View); if (std::isnan(m_fDistance)) // 19 august 2018 { std::string s_m_fDistance = std::to_string(m_fDistance); //CScreen s; s.UpdateViewMatrix(); // scos TraceError("SetViewMatrix : m_fDistance is NaN, value %s", s_m_fDistance.c_str()); } assert(m_fDistance >= 0); // problem to this one line m_fDistance = std::max(0, D3DXVec3Length(&m_v3View)) ; as its just about rendering we dont have to be really strict and it should actually solve the problem m_fDistance = std::fmax(0, D3DXVec3Length(&m_v3View)) ; assert(m_fDistance >= D3DXVec3Length(&m_v3View)); to be more precise, like this Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now