CQ-editor icon indicating copy to clipboard operation
CQ-editor copied to clipboard

openGl error and crash Manjaro

Open ecjohnsoniv opened this issue 3 years ago • 7 comments

I have been trying to use CadQuery with the CQ-editor, I have installed both with conda and via the pip install and binary method detailed in the Readme. Every time I get everything installed I have the same problem, it gives me the following error:

' TKOpenGl | Type: Other | ID: 0 | Severity: Medium | Message: OpenGl_Window::CreateWindow: window Visual is incomplete: no stencil buffer ' The editor will initially load load basic objects like a box, but if you add a small degree of complexity it will freeze and crash. I have updated my drivers according to my drivers and run run benchmaks without problem. I have also googled to no avail and scowered the arch and openGl wikis.

CPU: AMD Ryzen 5 2600 (12) @ 3.400GHz GPU: NVIDIA GeForce GTX 1070

ecjohnsoniv avatar Aug 20 '22 09:08 ecjohnsoniv

Which operating system?

jmwright avatar Aug 20 '22 11:08 jmwright

NVM, it's in the title.

jmwright avatar Aug 20 '22 11:08 jmwright

I cannot reproduce a crash on Manjaro. Could you upload the problematic script?

lorenzncode avatar Aug 20 '22 21:08 lorenzncode

The warning is likely not related to the issue. I get it on my system too.

sob., 20 sie 2022, 23:46 użytkownik Lorenz @.***> napisał:

I cannot reproduce a crash on Manjaro. Could you upload the problematic script?

— Reply to this email directly, view it on GitHub https://github.com/CadQuery/CQ-editor/issues/363#issuecomment-1221414619, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKVOYU4L2GFMBPFXPWNKWLV2FG33ANCNFSM57C5QOHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

adam-urbanczyk avatar Aug 21 '22 09:08 adam-urbanczyk

This script crashed the program

` import cadquery as cq

def winger(size): x = size * 5 y = size * 1 z = size * 3 result = cq.Workplane().box(x, y, z, centered=False) #tube = cq.Workplane().cylinder(1, 5) #result = result.union(tube) return result

final = cq.Workplane()

many = 3 for i in range(many): new = winger(5).rotate([0,0,0], [0,0,1], i*(360/many)) final = result.union(new)

tube = cq.Workplane().cylinder(1, 5)

#result = winger(5) show_object(final) show_object(tube)

`

ecjohnsoniv avatar Aug 21 '22 19:08 ecjohnsoniv

I took a guess at the indentation (To format code or text into its own distinct block, use triple backticks) and removed the comments.

I also changed this line from: final = result.union(new) to final = final.union(new) in order to resolve NameError: name 'result' is not defined

I could not reproduce the crash with the following:


import cadquery as cq

def winger(size):
    x = size * 5
    y = size * 1
    z = size * 3
    result = cq.Workplane().box(x, y, z, centered=False)
    return result

final = cq.Workplane()

many = 3
for i in range(many):
    new = winger(5).rotate([0,0,0], [0,0,1], i*(360/many))
    final = final.union(new)

tube = cq.Workplane().cylinder(1, 5)

show_object(final)
show_object(tube)

If rendering is slow for some models, and consumes large memory (see issue 286 not a crash), you can try increasing the Deviation value in CQ-Editor Preferences. See 3DViewer->Deviation. The default is 1e-05. Try say 1e-3.

lorenzncode avatar Aug 22 '22 21:08 lorenzncode

Ok, will do. Thanks for the help.

ecjohnsoniv avatar Aug 25 '22 09:08 ecjohnsoniv