Page MenuHome

transform window crashes blender
Closed, ResolvedPublic

Description

system information
windows xp 64 and windows 7 64 and ati radeon x1900gt

Blender Version
Broken: Blender 2.69 r61232
Worked: Blender 2.XX rXXXXXX

Short description of error
when you type a value in transform window in "N" shortcut it crashes blender
Exact steps for others to reproduce the error
open blender in default settings, change the units from none to metric in scene panel, then change value from standard 1m to other for instance type zero. that action crashes blender

Details

Type
Bug

Event Timeline

daniel (midan) added a project: BF Blender.
daniel (midan) set Type to Bug.
daniel (midan) added a subscriber: daniel (midan).
daniel (midan) created this task.
daniel (midan) claimed this task.
daniel (midan) raised the priority of this task from to Needs Triage by Developer.

"then change value from standard 1m to other for instance type zero" I interpreted that as trying to enter 0 in the scale value

For me it will not let me enter 0. And everything I enter appears to work as expected in build of d36a416 / 2013-11-16 08:50

Crash happens also with me. Should be easy to repro: Add a plane, press n and change the size of x or y and right after you press the enter, blender should crash. Dump available if needed.

Callstack:
0041f8fc 01a8f5a2 00010003 00000000 07f005f8 blender!Freestyle::TVertex::frontEdgeB+0xe
0041f90c 01a8f76f 00000001 00000000 07f005f8 blender!GHOST_WindowWin32::loadCursor+0xb2 [g:\blender25\blender\intern\ghost\intern\ghost_windowwin32.cpp @ 1027]
0041f91c 01a989a3 019174ea 084a06e4 018e681f blender!GHOST_WindowWin32::setWindowCursorShape+0x3f [g:\blender25\blender\intern\ghost\intern\ghost_windowwin32.cpp @ 1087]
0041f940 0155b74d 10a9ea70 04940788 00000000 blender!GHOST_Window::setCursorShape+0x13 [g:\blender25\blender\intern\ghost\intern\ghost_window.cpp @ 150]
0041f958 0155b825 00000000 0041f973 d582d466 blender!ui_but_get_fcurve+0x2d [g:\blender25\blender\source\blender\editors\interface\interface_anim.c @ 64]
0041fa64 013d1924 0105d72c 0825f2d4 08129614 blender!ui_but_anim_expression_set+0x15 [g:\blender25\blender\source\blender\editors\interface\interface_anim.c @ 115]
0041fa88 013d3412 00000000 0105d72c 0825f2d4 blender!wm_handler_ui_call+0xc4 [g:\blender25\blender\source\blender\windowmanager\intern\wm_event_system.c @ 416]
0041fab4 013d350f 0105d72c 08182298 0105d72c blender!wm_handlers_do_intern+0x1e2 [g:\blender25\blender\source\blender\windowmanager\intern\wm_event_system.c @ 1868]
0041fac8 013d4803 08182298 0818210c 081821fc blender!wm_handlers_do+0xf [g:\blender25\blender\source\blender\windowmanager\intern\wm_event_system.c @ 1950]
0041fb80 013c9681 0105d72c 0105d72c 00000000 blender!wm_event_do_handlers+0x1d3 [g:\blender25\blender\source\blender\windowmanager\intern\wm_event_system.c @ 2196]
0041fb90 013c3849 0105d72c 00000000 00000000 blender!WM_main+0x11 [g:\blender25\blender\source\blender\windowmanager\intern\wm.c @ 462]
0041fbb0 02feb7a5 00000001 01052378 010523c0 blender!main+0x389 [g:\blender25\blender\source\creator\creator.c @ 1724]
0041fbf8 75eb336a fffde000 0041fc44 77229f72 blender!__tmainCRTStartup+0xfb [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 266]

WARNING: Stack unwind information not available. Following frames may be wrong. 0041fc04 77229f72 fffde000 766a28ad 00000000 KERNEL32!BaseThreadInitThunk+0x12 0041fc44 77229f45 02feb7fc fffde000 00000000 ntdll_771f0000!RtlInitializeExceptionChain+0x63 0041fc5c 00000000 02feb7fc fffde000 00000000 ntdll_771f0000!RtlInitializeExceptionChain+0x36

Tested again with latest from git. Does not crash anymore.

daniel (midan) added a comment.EditedNov 18 2013, 8:17 PM

for me it still does crash blender. I tried r61240 win x64 from builder.blender.org

in official 2.69 from blender.org r60995 it works and there are no crashes

Brecht Van Lommel (brecht) removed daniel (midan) as the assignee of this task.
Brecht Van Lommel (brecht) triaged this task as Confirmed, Medium priority.

I could redo this issue as well on OS X, but it does not happen consistently. Went through a full git bisect only to end up at an unrelated commit and figuring out the crash does not always happen with the same steps.

Valgrind shows some conditional jumps based on uninitialized value: http://www.pasteall.org/48200

Will look into it.

P.S. Didn't manage to redo crash, but this might be related,.

Developer note.
Found a culptir of that jump caused on uninitialized memory. String is being allocated in stack, and some content is being strcpy-ed on it. Then strtolower is called on the whole string, without taking null-terminator into account.

Here's the patch which solves this issue: http://www.pasteall.org/48212/diff but not sure whether it was intended to be able to strlower chars after null-terminator? @Campbell Barton (campbellbarton), maybe you know?

@Brecht Van Lommel (brecht), i still failed to reproduce the crash here and don't see any other warnings in valgrind. Mind checking crash with this patch applied?

@Sergey Sharybin (sergey), this crash would be new in rB87cc890aef53c4660448b1125dc0c40a187ae1f2, so worth fixing but probably not the reported problem.

I'm having trouble reproducing the crash at the moment, even with revisions around the date I made the comment. I can try a few more things later, but if someone can test if the issue still exists in the latest Windows builds on http://builder.blender.org/download/ that would be useful.

I cannot confirm a crash here with 122e2b4. (Windows 7 x64).

@daniel (midan), please re-test the crash with latest build from buildbot and tell us whether it is still an issue for you! :)

The problem does not occur any more. I checked on Win XP x64, ATI x1900GT and Win 7 x64 , Quadro FX 1700. blender build from 18th december

Thanks for testing, let's assume it is fixed then.