Jump to content

Found a bug with resolution for AMD players


Recommended Posts

  • Active Member

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

SKS0gJDITEGJh2_7XqOxwA.png

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Active+ Member

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

  • Metin2 Dev 1
  • Love 1
Link to comment
Share on other sites

  • Active Member
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

Link to comment
Share on other sites

  • 1 year later...
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

SKS0gJDITEGJh2_7XqOxwA.png

 

Have anyone been able to fix this bug ? 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Active Member
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.

  • Love 1
Link to comment
Share on other sites

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

  • 4 months later...
  • Honorable Member

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) :D 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

WRnRW3H.gif

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 13

      Metin2 Closed Beta Content (2003-2004)

    2. 25

      [SRC] Metin2 on LINUX - The Old Metin2 Project

    3. 2

      United/Club/Midgard serverfiles?

    4. 13

      Metin2 Closed Beta Content (2003-2004)

    5. 13

      Metin2 Closed Beta Content (2003-2004)

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.