Jump to content
The Dark Mod Forums

Background Image


Recommended Posts

I get a segfault with the latest build.

 

Thread [1] (Suspended: Signal 'SIGSEGV' received. Description: Segmentation fault.)	
38 <symbol is not available> 0x74786574	
37 OpenGLShader::construct() at /workspace/darkradiant/radiant/render/backend/OpenGLShader.cpp:405 0x08235331	
36 OpenGLShader::realise() at /workspace/darkradiant/radiant/render/backend/OpenGLShader.cpp:103 0x082355c5	
35 OpenGLShaderCache::realise() at /workspace/darkradiant/radiant/renderstate.cpp:506 0x081197a5	
34 TexturesMap::realise() at /workspace/darkradiant/plugins/textures/TexturesCache.cpp:466 0xb62f96a8	
33 Textures_Realise() at /workspace/darkradiant/radiant/textures.cpp:28 0x08139524	
32 GlobalGL_sharedContextCreated() at /workspace/darkradiant/radiant/mainframe.cpp:2609 0x080a6a5f	
31 glwidget_context_created() at /workspace/darkradiant/libs/gtkutil/glwidget.cpp:201 0x0823e776	
30 g_cclosure_marshal_VOID__VOID()  0xb785a423	
29 g_closure_invoke()  0xb784e79f	
28 g_signal_stop_emission()  0xb785d2ea	
27 g_signal_emit_valist()  0xb785eb19	
26 g_signal_emit()  0xb785ee89	
25 gtk_widget_realize()  0xb7d1f3d1	
24 glwidget_enable_gl() at /workspace/darkradiant/libs/gtkutil/glwidget.cpp:229 0x0823e6ba	
23 g_cclosure_marshal_VOID__OBJECT()  0xb785adb7	
22 g_closure_invoke()  0xb784e79f	
21 g_signal_stop_emission()  0xb785d2ea	
20 g_signal_emit_valist()  0xb785eb19	
19 g_signal_emit()  0xb785ee89	
18 gtk_widget_set_parent_window()  0xb7d1b1ac	
17 gtk_frame_new()  0xb7bf8fc5	
16 gtk_container_forall()  0xb7badc36	
15 gtk_widget_set_parent_window()  0xb7d1b1f4	
14 gtk_box_reorder_child()  0xb7b74fd8	
13 gtk_container_forall()  0xb7badc36	
12 gtk_widget_set_parent_window()  0xb7d1b1f4	
11 gtk_box_reorder_child()  0xb7b75009	
10 gtk_container_forall()  0xb7badc36	
9 gtk_widget_set_parent_window()  0xb7d1b1f4	
8 _gtk_widget_propagate_hierarchy_changed()  0xb7d1b6fd	
7 gtk_widget_set_parent()  0xb7d1faa3	
6 gtk_notebook_insert_page_menu()  0xb7c51a17	
5 gtk_notebook_insert_page()  0xb7c51cee	
4 GroupDialog_addPage() at /workspace/darkradiant/radiant/groupdialog.cpp:152 0x0808f489	
3 MainFrame::Create() at /workspace/darkradiant/radiant/mainframe.cpp:2290 0x080afed1	
2 MainFrame() at /workspace/darkradiant/radiant/mainframe.cpp:2059 0x080b0c72	
1 main() at /workspace/darkradiant/radiant/main.cpp:532 0x08096868

 

The fault occurs on the following line in OpenGLShader.cpp

 

else
{
  state.m_texture = m_shader->getTexture()->texture_number;

  state.m_state = RENDER_FILL|RENDER_TEXTURE|RENDER_DEPTHT
EST|RENDER_COLOURWRITE|RENDER_LIGHTING|R
E
NDER_SMOOTH;
  if((m_shader->getFlags() & QER_CULL) != 0) // *** SEGFAULT HERE ****
  {
	if(m_shader->getCull() == IShader::eCullBack)
	{
	  state.m_state |= RENDER_CULLFACE;

 

I would guess that m_shader is NULL or invalid in this case, although GDB isn't helping much.

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Ok, my build seems to work, but I'll try to look into it.

 

(I changed the Texture* pointers to boost::shared_ptr yesterday, I don't think I changed the shader, but it's most probably related to it.)

 

Edit: Oh boy, another HashedCache (I just checked, this is one of the two last instances).

 

Edit2:If m_shader was invalid or NULL, how could the texture be retrieved in the first place? There is another access of m_shader two statements before the crashing one.

Link to comment
Share on other sites

I can't reproduce it, maybe I should install Ubuntu again...

 

One thing I added was the ShaderLibrary along with some methods. Its results aren't used at the moment, although there are some calls to it in shaders.cpp::Try_Shader_ForName(). Maybe these corrupt something, but I couldn't say why this would be the case.

 

I can comment out these calls if you want me to and commit them.

Link to comment
Share on other sites

I will try a full rebuild, that sometimes clears out errors. If not, I would almost be tempted to look into removing those QER_ flags, I'm pretty sure they are not actually used for anything significant (but I would have to check).

 

I also have a future task to get rid of those raw IShader pointers and replace them with boost::shared_ptr<IShader>. This will mean getting rid of the internal reference counting (IShader::IncRef() etc) and let shared_ptr take care of that automatically.

Link to comment
Share on other sites

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

    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...