Jump to content
The Dark Mod Forums

Recommended Posts

Posted (edited)

Fan mission Down by the Riverside gives me a crash to desktop when I click on the book in the sealed study.

Both 2.12 and 2.13 dev have this issue (on my pc).

I'm using Manjaro linux as os.

 

I reported in the fm's thread.

Edited by datiswous
Posted (edited)
On 10/17/2024 at 6:03 PM, duzenko said:

Can you attach a savegame before the click?

savegame download

This is in tdm 2.12

(btw. the savegame has notarget activated in console, but I tested also with notarget disabled > no difference)

 

This is what the console says (maybe it's useful):

WARNING:Couldn't add entity book1_prefarmhouse to inventory of player1
Trying to load image models/darkmod/props/textures/speedpotion from frontend, deferring...
Trying to load image models/darkmod/props/textures/speedpotion from frontend, deferring...
signal caught: Segmentation fault
si_code 1
Trying to exit gracefully..
terminate called after throwing an instance of 'std::shared_ptr<ErrorReportedException>'
double fault Aborted, bailing out
shutdown terminal support
About to exit with code 6

 

Edited by datiswous
Posted

From a very, very layman's point of view, this seg fault looks like a Linux issue to me.

The warning about not being able to add the book to the inventory is a false alarm and happens with every immobile readable.

Posted
33 minutes ago, datiswous said:

Is there a save being made when you click the book?

Because saving being done by the mission crashes some Linux systems.

No, to my knowledge the only thing special about it is that there are hidden objectives that get completed when you reach certain pages.

Posted
1 hour ago, datiswous said:
Trying to load image models/darkmod/props/textures/speedpotion from frontend, deferring...
Trying to load image models/darkmod/props/textures/speedpotion from frontend, deferring...

I found this is actually an important part.

I edited file river_fading_materials.mtr and did /* */ to everything with "speed" in it. Now I could read the book and after, click the potion and teleport.

Posted (edited)

Actually it's only:

tdm_ption_speed_blendaway

that gives the crash.

tdm_ption_speed_blendaway
{
	glass	
	qer_editorimage models/darkmod/props/textures/speedpotion_ed
	specularmap	models/darkmod/props/textures/airpotion_s

    {
        maskcolor                
        map makealpha(textures/glass/glass1)
        alphatest parm5
    }


	{
		blend	diffusemap
		map	models/darkmod/props/textures/speedpotion
		rgb	0.5
		scroll	time * -0.5 , time * .2	
	}

	{
	//	if ( parm11 >= 0.5 ) 
		blend	add
		map	models/darkmod/props/textures/speedpotion
		rgb 	0.2	
		scroll	time * -.7 , time * .2	
		//scale	 2 , 1
	}
    {
        if ( parm11 > 0 )
        blend       gl_dst_color, gl_one
        map         _white
        rgb         0.40 * parm11
    }
    {
        if ( parm11 > 0 )
        blend       add
        map         models/darkmod/props/textures/speedpotion
        rgb         0.15 * parm11
    }

	// TDM Ambient Method Related 
	{							
		if (global5 == 1)		
		blend add				
		map				models/darkmod/props/textures/speedpotion		
		scale			1, 1		
		red				global2	
		green			global3	
		blue			global4	
	}							
	{							
		if (global5 == 2)		
		blend add				
		program	ambientEnvironment.vfp	
		vertexParm		0		1, 1, 1, 1		// UV Scales for Diffuse and Bump	
		vertexParm		1		1, 1, 1, 1	// (X,Y) UV Scale for specular		
		vertexParm		2		global2, global3, global4, 1	
																
		fragmentMap		0		cubeMap env/gen1				
		fragmentMap		1		_flat			// Bump				
		fragmentMap		2		models/darkmod/props/textures/speedpotion			// Diffuse			
		fragmentMap		3		models/darkmod/props/textures/airpotion_s			// Specular			
	}
}

 

Edited by datiswous
Posted (edited)

So I did a bit more research and found that only this code inside material tdm_ption_speed_blendaway gives me a crash:

	// TDM Ambient Method Related 
	{							
		if (global5 == 1)		
		blend add				
		map				models/darkmod/props/textures/speedpotion		
		scale			1, 1		
		red				global2	
		green			global3	
		blue			global4	
	}							
	{							
		if (global5 == 2)		
		blend add				
		program	ambientEnvironment.vfp	
		vertexParm		0		1, 1, 1, 1		// UV Scales for Diffuse and Bump	
		vertexParm		1		1, 1, 1, 1	// (X,Y) UV Scale for specular		
		vertexParm		2		global2, global3, global4, 1	
																
		fragmentMap		0		cubeMap env/gen1				
		fragmentMap		1		_flat			// Bump				
		fragmentMap		2		models/darkmod/props/textures/speedpotion			// Diffuse			
		fragmentMap		3		models/darkmod/props/textures/airpotion_s			// Specular			
	}

The wiki states

Quote

As of TDM 2.08, none of the ambient stages are needed.

Ambient rendering has its own dedicated function in the renderer now, and it doesn't use textures for it.

So maybe you could update the mission by removing that code?

 

Btw. I created subtitles for the mission, so maybe you could wait with an update until I tested them while playing?

Edited by datiswous
  • Like 1
Posted

Yep, we can also remove the frob stages ( parm11 ) since those were replaced with a native solution in 2.11.

Let me know when the subtitles are verified and I'll repack unless @Dragofer wants to do it ?

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Posted (edited)
13 hours ago, nbohr1more said:

It shouldn’t. Maybe there’s a script that uses the global 5 parm?

Like this?

void dematerialise(entity fade_entity, entity glow_entity)		//causes the entity and its accompanying glow entity to 'disappear'
{
    float i;
    for (i=0;i<120;i++)
    {
        fade_entity.setShaderParm(5,i*0.01);
        glow_entity.setShaderParm(5,(i-10)*0.01);
        sys.waitFrame();
    }
}

void materialise(entity fade_entity, entity glow_entity)		//causes the entity and its accompanying glow entity to appear
{
    float i;
    for (i=0;i<120;i++)
    {
        fade_entity.setShaderParm(5,(120-i)*0.01);
	glow_entity.setShaderParm(5,(110-i)*0.01);
        sys.waitFrame();
    }
}

 

Edited by datiswous
Posted

Shader Parms and Global Parms should be distinct. Guess I'll have to check if someone mixed them somewhere in source.

Probably a red herring since we have lots of missions that use shader parm 5 and have obsolete ambient stages.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Posted (edited)

If you wanted to do what's in this code. How would you currently do that?

void dematerialise(entity fade_entity, entity glow_entity)		//causes the entity and its accompanying glow entity to 'disappear'
{
    float i;
    for (i=0;i<120;i++)
    {
        fade_entity.setShaderParm(5,i*0.01);
        glow_entity.setShaderParm(5,(i-10)*0.01);
        sys.waitFrame();
    }
}

void materialise(entity fade_entity, entity glow_entity)		//causes the entity and its accompanying glow entity to appear
{
    float i;
    for (i=0;i<120;i++)
    {
        fade_entity.setShaderParm(5,(120-i)*0.01);
	glow_entity.setShaderParm(5,(110-i)*0.01);
        sys.waitFrame();
    }
}

 

Edit: Actually where can I find more info on shader parameters?

Edited by datiswous
Posted
6 hours ago, datiswous said:

If you wanted to do what's in this code. How would you currently do that?

void dematerialise(entity fade_entity, entity glow_entity)		//causes the entity and its accompanying glow entity to 'disappear'
{
    float i;
    for (i=0;i<120;i++)
    {
        fade_entity.setShaderParm(5,i*0.01);
        glow_entity.setShaderParm(5,(i-10)*0.01);
        sys.waitFrame();
    }
}

void materialise(entity fade_entity, entity glow_entity)		//causes the entity and its accompanying glow entity to appear
{
    float i;
    for (i=0;i<120;i++)
    {
        fade_entity.setShaderParm(5,(120-i)*0.01);
	glow_entity.setShaderParm(5,(110-i)*0.01);
        sys.waitFrame();
    }
}

 

Edit: Actually where can I find more info on shader parameters?

This is a custom script based on shaderParms, whereas all old material definitions contain some code that's based on globalParms. The script has nothing to do with what you find in the material defs and still works the same way today.

  • Like 1
Posted (edited)
2 hours ago, duzenko said:

Does it crash for you after a game restart and quick load?

Yes I tried it many times. It crashes every time.

 

2 hours ago, duzenko said:

After config reset?

Tried that, no difference.

 

There's already a solution here:

It crashes on the ambient stages in the material (which aren't needed, so removing them is a save fix).

I could try a Windows build someday. It probably will work.

 

Thanks for taking a look.

Edited by datiswous
Posted (edited)

Did a bit of further testing.

Line:

program    ambientEnvironment.vfp

is the only thing that makes it crash.

So this code creates no crash:

	// TDM Ambient Method Related 

	{							
		if (global5 == 1)		
		blend add				
		map				models/darkmod/props/textures/speedpotion		
		scale			1, 1		
		red				global2	
		green			global3	
		blue			global4	
	}
							
	{							
		if (global5 == 2)		
		blend add				
//		program	ambientEnvironment.vfp	
		vertexParm		0		1, 1, 1, 1		// UV Scales for Diffuse and Bump	
		vertexParm		1		1, 1, 1, 1	// (X,Y) UV Scale for specular		
		vertexParm		2		global2, global3, global4, 1	
																
		fragmentMap		0		cubeMap env/gen1				
		fragmentMap		1		_flat			// Bump				
		fragmentMap		2		models/darkmod/props/textures/speedpotion			// Diffuse			
		fragmentMap		3		models/darkmod/props/textures/airpotion_s			// Specular			
	}

(I edditted out "program    ambientEnvironment.vfp")

Edited by datiswous
  • Like 1
Posted

I guess it happens when a custom shader is being used which was not used before.
Maybe something related to loading shader happens from the wrong thread. Windows drivers are OK with that but Linux drivers are not.

  • 2 weeks later...
  • 5 months later...
Posted

Probably makes sense to discuss this issue here instead of in the generic Shadows of Northdale 1 thread (where the same issue occured).

I compiled the latest Darkmod source (Debug build) and reproduced the crash with that.

The crash indeed does *not* happen in the main thread, but the "Frontend" thread:

Thread 38 "Frontend" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffb98006c0 (LWP 1220544)]
0x00007ffff48d5d29 in ?? () from /lib/x86_64-linux-gnu/libGLdispatch.so.0
(gdb) bt
#0  0x00007ffff48d5d29 in ?? () from /lib/x86_64-linux-gnu/libGLdispatch.so.0
#1  0x0000000000be43c7 in GLSLProgram::Destroy (this=0x10fe9290)
    at darkmod_src/renderer/backend/GLSLProgram.cpp:61
#2  0x0000000000bece3e in GLSLProgramManager::LoadFromGenerator(char const*, std::function<void (GLSLProgram*)> const&) (this=0x2107cc0 <programManagerInstance>, name=0x7fffb013a1f0 "ambientEnvironment", generator=...)
    at darkmod_src/renderer/backend/GLSLProgramManager.cpp:103
#3  0x0000000000bec407 in GLSLProgramManager::Load (this=0x2107cc0 <programManagerInstance>, name=..., 
    defines=...) at darkmod_src/renderer/backend/GLSLProgramManager.cpp:74
#4  0x0000000000cc642f in GLSL_LoadMaterialStageProgram (name=0x7ffed4053f40 "ambientEnvironment")
    at darkmod_src/renderer/resources/Material.cpp:783
#5  0x0000000000cc9602 in idMaterial::ParseStage (this=0x7ffed40069b0, src=..., trpDefault=TR_REPEAT)
    at darkmod_src/renderer/resources/Material.cpp:1568
#6  0x0000000000ccd04e in idMaterial::ParseMaterial (this=0x7ffed40069b0, src=...)
    at darkmod_src/renderer/resources/Material.cpp:2470
#7  0x0000000000ccd626 in idMaterial::Parse (this=0x7ffed40069b0, 
    text=0x7fffb97eda30 "\n\npainting03_L\n{\n\tqer_editorimage\tmodels/darkmod/props/textures/painting03_l_d_ed\n\twood\n\n\tdiffusemap\tmodels/darkmod/props/textures/painting03_l_d\n\tbumpmap\t\tmodels/darkmod/props/textures/painting01_loc"..., textLength=1329)
    at darkmod_src/renderer/resources/Material.cpp:2559
#8  0x000000000049631d in idDeclLocal::ParseLocal (this=0x57c0bd0)
    at darkmod_src/framework/DeclManager.cpp:2318
#9  0x000000000049263f in idDeclManagerLocal::FindType (this=0x16fdc00 <declManagerLocal>, type=DECL_MATERIAL, 
    name=0x7ffed40c03f0 "painting03_l", makeDefault=true)
    at darkmod_src/framework/DeclManager.cpp:1235
#10 0x0000000000494300 in idDeclManagerLocal::FindMaterial (this=0x16fdc00 <declManagerLocal>, 
    name=0x7ffed40c03f0 "painting03_l", makeDefault=true)
    at darkmod_src/framework/DeclManager.cpp:1633
#11 0x000000000049f3ed in idDeclSkin::Parse (this=0x7ffed4034ad0, 
    text=0x7fffb97ee290 "\n\nportrait_with_skull02_torn\n{\nmodel models/darkmod/decorative/wall/painting01.lwo\nmodel models/darkmod/decorative/wall/painting01_m.lwo\nmodel models/darkmod/decorative/wall/painting01_l.lwo\nmodel mod"..., textLength=404) at darkmod_src/framework/DeclSkin.cpp:78
#12 0x000000000049631d in idDeclLocal::ParseLocal (this=0x59f3e10)
    at darkmod_src/framework/DeclManager.cpp:2318
#13 0x000000000049263f in idDeclManagerLocal::FindType (this=0x16fdc00 <declManagerLocal>, type=DECL_SKIN, 
    name=0x7ffed408bc6c "portrait_with_skull02_torn", makeDefault=true)
    at darkmod_src/framework/DeclManager.cpp:1235
#14 0x0000000000494382 in idDeclManagerLocal::FindSkin (this=0x16fdc00 <declManagerLocal>, 
    name=0x7ffed408bc6c "portrait_with_skull02_torn", makeDefault=true)
    at darkmod_src/framework/DeclManager.cpp:1643
--Type <RET> for more, q to quit, c to continue without paging--
#15 0x000000000055a6bb in idEntity::Event_SetSkin (this=0x7ffed408d324, 
    skinname=0x7ffed408bc6c "portrait_with_skull02_torn")
    at darkmod_src/game/Entity.cpp:7114
#16 0x0000000000987646 in idClass::ProcessEventArgPtr (this=0x7ffed408d324, ev=0x1f5ef00 <EV_SetSkin>, 
    data=0x7fffb97ee600) at darkmod_src/game/gamesys/Callbacks.cpp:26
#17 0x0000000000a5a847 in idInterpreter::CallEvent (this=0x7ffed408b444, func=0x7ffff7961388, argsize=132)
    at darkmod_src/game/script/Script_Interpreter.cpp:817
#18 0x0000000000a5b1f7 in idInterpreter::Execute (this=0x7ffed408b444)
    at darkmod_src/game/script/Script_Interpreter.cpp:1091
#19 0x0000000000a6a0ce in idThread::Execute (this=0x7ffed408b414)
    at darkmod_src/game/script/Script_Thread.cpp:949
#20 0x0000000000561c23 in idEntity::FrobAction (this=0x16762504, frobMaster=true, isFrobPeerAction=false)
    at darkmod_src/game/Entity.cpp:9544
#21 0x000000000067d033 in idPlayer::PerformFrob (this=0x156bf4e4, impulseState=EPressed, target=0x16762504, 
    allowUseCurrentInvItem=true) at darkmod_src/game/Player.cpp:11843
#22 0x000000000067d916 in idPlayer::PerformFrob (this=0x156bf4e4)
    at darkmod_src/game/Player.cpp:12047
#23 0x000000000066884c in idPlayer::PerformImpulse (this=0x156bf4e4, impulse=41)
    at darkmod_src/game/Player.cpp:5935
#24 0x00000000006696f4 in idPlayer::EvaluateControls (this=0x156bf4e4)
    at darkmod_src/game/Player.cpp:6347
#25 0x000000000066e72d in idPlayer::Think (this=0x156bf4e4)
    at darkmod_src/game/Player.cpp:7616
#26 0x00000000005ba9dd in idGameLocal::RunFrame (this=0x16b3a40 <gameLocal>, clientCmds=0x7fffb97eebe0, 
    timestepMs=17, minorTic=false) at darkmod_src/game/Game_local.cpp:3397
#27 0x00000000004cac3c in idSessionLocal::RunGameTic (this=0x17055a0 <sessLocal>, timestepMs=17, 
    minorTic=false) at darkmod_src/framework/Session.cpp:2997
#28 0x00000000004cb020 in idSessionLocal::RunGameTics (this=0x17055a0 <sessLocal>)
    at darkmod_src/framework/Session.cpp:3043
#29 0x00000000004cb291 in idSessionLocal::FrontendThreadFunction (this=0x17055a0 <sessLocal>)
    at darkmod_src/framework/Session.cpp:3104
#30 0x00000000004cb6bc in operator() (__closure=0x0, x=0x17055a0 <sessLocal>)
    at darkmod_src/framework/Session.cpp:3186
#31 0x00000000004cb6e4 in _FUN () at darkmod_src/framework/Session.cpp:3188
#32 0x00007ffff769caa4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:447
#33 0x00007ffff7729c3c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

The main thread calls GLimp_SwapBuffers() at the same time:

(gdb) thread 1
[Switching to thread 1 (Thread 0x7ffff7ccf4c0 (LWP 1220498))]
#0  0x00007ffff771b4cd in __GI___poll (fds=0x7fffffffd4e8, nfds=1, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
warning: 29	../sysdeps/unix/sysv/linux/poll.c: No such file or directory
(gdb) bt
#0  0x00007ffff771b4cd in __GI___poll (fds=0x7fffffffd4e8, nfds=1, timeout=1000) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fffd661d9df in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.570.124.04
#2  0x00007fffd6603b11 in ?? () from /lib/x86_64-linux-gnu/libnvidia-glcore.so.570.124.04
#3  0x00007ffff3f7a1ec in ?? () from /lib/x86_64-linux-gnu/libGLX_nvidia.so.0
#4  0x00007ffff3f48500 in ?? () from /lib/x86_64-linux-gnu/libGLX_nvidia.so.0
#5  0x0000000000d95c36 in GLimp_SwapBuffers () at darkmod_src/sys/linux/glimp.cpp:76
#6  0x0000000000bf4ba0 in RB_SwapBuffers () at darkmod_src/renderer/backend/tr_backend.cpp:608
#7  0x000000000074adf1 in R_IssueRenderCommands (frameData=0x1fb31a0 <smpFrameData+96>) at darkmod_src/renderer/RenderSystem.cpp:173
#8  0x000000000074c6e6 in idRenderSystemLocal::EndFrame (this=0x1fa7c60 <tr>, frontEndMsec=0x0, backEndMsec=0x0)
    at darkmod_src/renderer/RenderSystem.cpp:768
#9  0x00000000004c9cb9 in idSessionLocal::UpdateScreen (this=0x17055a0 <sessLocal>, outOfSequence=false) at darkmod_src/framework/Session.cpp:2716
#10 0x000000000047477f in idCommonLocal::Frame (this=0x16de8c0 <commonLocal>) at darkmod_src/framework/Common.cpp:2479
#11 0x0000000000d99481 in main (argc=1, argv=0x7fffffffdd68) at darkmod_src/sys/posix/platform_linux.cpp:490

 

  • Like 1
  • Thanks 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...