1
$\begingroup$

My script got error when it ran python script in use blender opengl(bgl).
Below python script.

# -*- coding: utf-8 -*-

import bgl

view = bgl.Buffer(bgl.GL_INT, 4)
bgl.glGetIntegerv(bgl.GL_VIEWPORT, view)
print(view)

Do script as follows.

$ blender -b -noaudio -P test.py

Here is my environments.

MacOSX 10.11.4
MacBook Air (13-inch Early 2014)
blender-2.77a-OSX_10.6-x86_64

Here is crash report.

# Blender 2.77 (sub 0), Commit date: 2016-04-05 18:12, Hash abf6f08

# backtrace
0   blender                             0x0000000100baa46a BLI_system_backtrace + 58
1   blender                             0x00000001001549fa blender_crash_handler + 362
2   libsystem_platform.dylib            0x00007fff9beea52a _sigtramp + 26
3   ???                                 0x00007fff60260568 0x0 + 140734806492520
4   blender                             0x000000010057fb92 Method_GetIntegerv + 66
5   blender                             0x00000001026d7b88 PyCFunction_Call + 280
6   blender                             0x00000001027518d5 PyEval_EvalFrameEx + 26149
7   blender                             0x0000000102755265 _PyEval_EvalCodeWithName + 2421
8   blender                             0x000000010274b231 PyEval_EvalCode + 81
9   blender                             0x000000010277bf41 PyRun_FileExFlags + 209
10  blender                             0x00000001005508e2 python_script_exec + 610
11  blender                             0x000000010015600a run_python_file + 122
12  blender                             0x0000000100b51620 BLI_argsParse + 192
13  blender                             0x000000010015479a main + 3594
14  blender                             0x000000010015397c start + 52
15  ???                                 0x0000000000000005 0x0 + 5

Any suggestions?
Thx.

$\endgroup$
  • $\begingroup$ what error did you get? on my machine the output of your script is Buffer(GL_BYTE, [0, 0, 0, 0]) $\endgroup$ – user2816 May 19 '16 at 6:22
  • 1
    $\begingroup$ @R00t thx your reply. edit my question and write crash report. $\endgroup$ – tomoyaigarashi May 19 '16 at 6:28
  • $\begingroup$ I'm using 2.77 (not 2.77a) and it didn't crash for me, If you have another version of blender that is not alpha, test with it and see if blender still crashes, or wait until someone else tests your code and see if they have the same error. $\endgroup$ – user2816 May 19 '16 at 6:34
  • $\begingroup$ I used same ver 2.77(not 2.77a). but it got error. I will wait someone else test my script. Thx for everything. $\endgroup$ – tomoyaigarashi May 19 '16 at 7:14
  • 4
    $\begingroup$ @R00t The 'a' in '2.77a' does not mean 'alpha'. 'a' and 'b' releases of blender are versions of blender that have been re-released to fix bugs. 2.77a is a more up to date version that 2.77. $\endgroup$ – Ray Mairlot May 19 '16 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.