Bug 6085 - Blender crashes on r300 when right clicking on an item
Summary: Blender crashes on r300 when right clicking on an item
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: General (show other bugs)
Version: XOrg git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-02 11:24 UTC by Adam K Kirchhoff
Modified: 2006-06-19 15:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Backtrace from Blender crash (3.30 KB, text/plain)
2006-04-19 01:39 UTC, Adam K Kirchhoff
no flags Details

Description Adam K Kirchhoff 2006-03-02 11:24:21 UTC
If I start up blender (2.41, built on February 7th) and just right click on the
light source on the camera, and blender will segfault (happens with two
different machines and three different video cards: 9600AS, 9800 Pro, X700)

This is what gdb shows:



(gdb) run
Starting program: /usr/bin/blender-bin
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1216275968 (LWP 11368)]
(no debugging symbols found)
(no debugging symbols found)
Using Python version 2.3
*********************************WARN_ONCE*********************************
File r300_ioctl.c function r300Clear line 555
CB_DPATH has been enabled.
Please let me know if this introduces new instabilities.
***************************************************************************
*********************************WARN_ONCE*********************************
File r300_render.c function r300Fallback line 805
fallback:ctx->Line.SmoothFlag
***************************************************************************
*********************************WARN_ONCE*********************************
File r300_render.c function r300Fallback line 802
fallback:ctx->Line.StippleFlag
***************************************************************************
*********************************WARN_ONCE*********************************
File r300_vertexprog.c function t_dst_index line 193
Unknown output 13
***************************************************************************
*********************************WARN_ONCE*********************************
File r300_render.c function r300Fallback line 784
fallback:ctx->RenderMode != GL_RENDER
***************************************************************************

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1216275968 (LWP 11368)]
0xb75c688b in _swrast_choose_texture_sample_func (ctx=0x88e2fa0, t=0x1)
    at swrast/s_texfilter.c:2644
2644       if (!t || !t->Complete) {
(gdb) bt
#0  0xb75c688b in _swrast_choose_texture_sample_func (ctx=0x88e2fa0, t=0x1)
    at swrast/s_texfilter.c:2644
#1  0xb75a1f50 in _swrast_update_texture_samplers (ctx=0x88e2fa0)
    at swrast/s_context.c:427
#2  0xb75a2047 in _swrast_validate_derived (ctx=0x88e2fa0)
    at swrast/s_context.c:458
#3  0xb75a1bc4 in _swrast_validate_line (ctx=0x88e2fa0, v0=0xa7420a60,
    v1=0xa7420b04) at swrast/s_context.c:320
#4  0xb75a2120 in _swrast_Line (ctx=0x88e2fa0, v0=0xa7420a60, v1=0xa7420b04)
    at swrast/s_context.c:507
#5  0xb75f2787 in swsetup_line (ctx=0x88e2fa0, v0=16, v1=17)
    at swrast_setup/ss_triangle.c:278
#6  0xb756189c in _tnl_RenderClippedLine (ctx=0x88e2fa0, ii=16, jj=17)
    at tnl/t_vb_render.c:250
#7  0xb7562446 in clip_line_4 (ctx=0x88e2fa0, v0=16, v1=17, mask=13 '\r')
    at t_vb_cliptmp.h:169
#8  0xb755c78f in clip_render_line_loop_verts (ctx=0x88e2fa0, start=0,
    count=4, flags=50) at t_vb_rendertmp.h:136
#9  0xb7561a3c in run_render (ctx=0x88e2fa0, stage=0x8a697d8)
    at tnl/t_vb_render.c:319
#10 0xb754e8f3 in _tnl_run_pipeline (ctx=0x88e2fa0) at tnl/t_pipeline.c:162
#11 0xb75863ab in _tnl_flush_vtx (ctx=0x88e2fa0) at tnl/t_vtx_exec.c:281
#12 0xb75818b1 in _tnl_FlushVertices (ctx=0x88e2fa0, flags=1)
---Type <return> to continue, or q <return> to quit---
    at tnl/t_vtx_api.c:873
#13 0xb74f9b71 in _mesa_LoadMatrixf (m=0x8e3f4bc) at main/matrix.c:341
#14 0xb7c06794 in glLoadMatrixf (m=0x8e3f4bc) at glapitemp.h:1530
#15 0x081a17b1 in bwin_load_viewmatrix ()
#16 0x081a1995 in myloadmatrix ()
#17 0x0824871e in draw_object ()
#18 0x081eaf4c in view3d_opengl_select ()
#19 0x08140088 in mouse_select ()
#20 0x081c9c84 in scrarea_do_winhandle ()
#21 0x08137886 in screenmain ()
#22 0x08105693 in main ()
(gdb) quit

Indirect Rendering works just fine.
Comment 1 Aapo Tahkola 2006-03-02 11:50:54 UTC
(In reply to comment #0)
> *********************************WARN_ONCE*********************************
> File r300_render.c function r300Fallback line 784
> fallback:ctx->RenderMode != GL_RENDER
> ***************************************************************************

This fallback also makes gl-117 to hang my machine.
Comment 2 popolon 2006-03-03 00:44:46 UTC
Have the same problem with Blender 2.40, before 2.40, the bug looked like the
r200 blender bug, blender screen was totaly broken after clicking (bug #5601).
Comment 3 popolon 2006-03-03 01:00:17 UTC
I forgot to say than the crash on blender occur only when selecting an object
with right mouse button. Selecting only a face (in edit mode) works well.
Comment 4 popolon 2006-03-22 10:54:56 UTC
After recent changes in CVS (last week ?) blender don't crash anymore with r300 DRI.
There are still some related bugs, an object can be moved with right mouse
button, but it's impossible to select another one on 3d view, it's possible on
tree view, that give blender a minimum usable with r300 DRI. Some times (don't
know exactly which one), the shape become strange, when moving/scaling it with
right mouse button.   
Comment 5 Aapo Tahkola 2006-03-22 11:39:50 UTC
(In reply to comment #4)
> After recent changes in CVS (last week ?) blender don't crash anymore with
r300 DRI.

Disabled it because of the gl-117 issue.
I wonder why other drivers dont hit this, or do they?

> There are still some related bugs, an object can be moved with right mouse
> button, but it's impossible to select another one on 3d view, it's possible on
> tree view, that give blender a minimum usable with r300 DRI. Some times (don't
> know exactly which one),

Could be something broken with depth/stencil reads.
Cube uses same trick to determine where bullets hit AFAIK.

> the shape become strange, when moving/scaling it with
> right mouse button.   

Comment 6 Adam K Kirchhoff 2006-03-22 12:03:58 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > After recent changes in CVS (last week ?) blender don't crash anymore with
> r300 DRI.
> 
> Disabled it because of the gl-117 issue.
> I wonder why other drivers dont hit this, or do they?

Neither the r200 or r100 drivers have this problem.
Comment 7 Aapo Tahkola 2006-03-31 12:57:49 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > There are still some related bugs, an object can be moved with right mouse
> > button, but it's impossible to select another one on 3d view, it's possible on
> > tree view, that give blender a minimum usable with r300 DRI. Some times (don't
> > know exactly which one),
> 
> Could be something broken with depth/stencil reads.
> Cube uses same trick to determine where bullets hit AFAIK.

I believe this has been fixed now.
Comment 8 Adam K Kirchhoff 2006-04-19 01:35:52 UTC
No, it doesn't appear to be completely fixed.  Now blender crashes when it's
first launched, even before selecting the camera.  I'll upload a new backtrace.
Comment 9 Adam K Kirchhoff 2006-04-19 01:39:05 UTC
Created attachment 5362 [details]
Backtrace from Blender crash
Comment 10 Jacek Poplawski 2006-05-07 22:13:42 UTC
I think it may be fixed now...

After clicking on light source:
- on r300 with current (2006.05.07) CVS - works correctly
- on r300 with older CVS - Blender crashes 
- on mga (and IIRC on r200) with xorg 7.0 - rendering goes broken
Comment 11 popolon 2006-05-08 21:38:20 UTC
On recent CVS, selection of objects works, blender doesn't crash.
 
But there still are vertex selections bugs. I make some test today after
updating drm and dri from cvs, and I found a mean to skip the vertex selection bug.

When vertex are selected by bouding box (Border select, B key) :
* If the selection is made in flat draw type, the result is crappy (some
hazardous vectors are selected, no complete face) :
* If the selection is made in wireframe mode, the result is 100% OK
Here the screenshot of the two case :

http://popolon.free.fr/Selection_bug.png

For users, using wireframe mode for selecting (modeling objecs) and coming back
in flat/shaded mode for moving or scene design is a good temporary trick.
Comment 12 Jacek Poplawski 2006-05-10 21:49:35 UTC
On my r300 (Radeon 9800 Pro) and current Mesa/drm CVS there are two problems
with Blender:
- it is possible to crash everything by opening rendering window and switch to
main window (I did it few times)
- selection circle (bb) is not rendered correctly 
Comment 13 popolon 2006-05-12 02:49:10 UTC
I'm using 9600SE, not 9800, but

> - it is possible to crash everything by opening rendering window and switch to
> main window (I did it few times)
I dot it a lot (on blender 2.40 & 2.41 without any problems). In few hours of
usage only one crash occured, but I don't know exaclty the case.

> - selection circle (bb) is not rendered correctly 
Is it the same bug that in my case with rectangle selection (b) => vertex
selected are bad (see the picture of my bug report) or is the circle itself that
isn't correctly rendered ? (In this case, I don't have the problem).

I compiled blender myself in both case and use glibc-2.2.5, gcc-3.2.3 and a cvs
version of Xfree downloaded few days(weeks ?) before official 6.8.9/6.7 release.
Comment 14 Adam K Kirchhoff 2006-06-10 14:53:33 UTC
Any objections if I close this bug?  I'm not experiencing the blender crashes
any more.

Comment 15 Vinícius Dias dos Santos 2006-06-19 15:22:08 UTC
(In reply to comment #14)
> Any objections if I close this bug?  I'm not experiencing the blender crashes
> any more.

Me neither with a R300 ND (AIW 9700 pro), and the selections cases. 
Comment 16 Adam K Kirchhoff 2006-06-19 15:35:47 UTC
Appears to be fixed in CVS.


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.