Bug 91387

Summary: Mesa 10.6.1 implementation error: invalid target in _swrast_choose_texture_sample_func
Product: Mesa Reporter: Michael Godfrey <michaeldgodfrey>
Component: Drivers/DRI/swrastAssignee: mesa-dev
Status: RESOLVED MOVED QA Contact: mesa-dev
Severity: major    
Priority: medium CC: anuj.phogat
Version: 10.6   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: backtrace

Description Michael Godfrey 2015-07-18 17:15:40 UTC
>> plot(1:100)
>> Mesa 10.6.1 implementation error: invalid target in _swrast_choose_texture_sample_func
Please report at https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa
Mesa 10.6.1 implementation error: invalid target in _swrast_choose_texture_sample_func
Please report at https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa
panic: Segmentation fault -- stopping myself...

This occurs using the latest development version of Octave. I suspect
(strongly) that this originates due to an error in the Octave code
which handles mouse events. But, such a user error should not result
in a seg fault in the user program.
Comment 1 Brian Paul 2015-07-20 16:35:49 UTC
Can you debug this a bit to see where this is happening and what the texture target is?

I don't see how this would directly lead to a segfault in Mesa.  After the error message we select the null_sample_func() function for texture sampling, which is a no-op.
Comment 2 Michael Godfrey 2015-07-21 14:22:40 UTC
I believe that the seg fault actually occurs in Octave. I could
run a backtrace but, in any case, other Octave developers can do
this quicker. If it is found that there is a problem in the Mesa
code, they will get back to you.

I just thought that it would be good if you had a look.
Comment 3 Michael Godfrey 2015-07-22 14:19:54 UTC
Created attachment 117297 [details]
backtrace
Comment 4 Brian Paul 2015-07-22 14:34:13 UTC
Ugh, looks like there's some sort of unintended recursion going on here.
I think Anuj might want to take a look at this.
Comment 5 Michael Godfrey 2015-07-22 14:37:07 UTC
I should have added that the graphics in my system is
Intel HD 6000 in an Intel NUC5i5RYH.
Comment 6 Michael Godfrey 2015-07-25 11:56:02 UTC
The Octave developer for this code made a change based on:

I attached a preliminary patch that avoids using the GL_SELECT mechanism when
we are only looking for axes objects. 

This change prevents the seg. fault.

Do you need more information?

Thanks for looking at this problem.
Comment 7 GitLab Migration User 2019-09-18 18:45:36 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/319.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.