Crash due to i18n translation at startup on OSX Mojave (versionning code, Data names translation enabled) #57066

Closed
opened 2018-10-04 18:56:26 +02:00 by Roland Terver · 32 comments

System Information
Macbook pro Retina 13 inch late 2012
Intel HD graphics 4000

Blender Version
2.79 (2.79 2018-10-04, Blender Foundation)

Short description of error
Blender crashes at start

Exact steps for others to reproduce the error
Save user preferences with translation to French enabled. Close and restart Blender.

Blender 2_79 crash.rtf

**System Information** Macbook pro Retina 13 inch late 2012 Intel HD graphics 4000 **Blender Version** 2.79 (2.79 2018-10-04, Blender Foundation) **Short description of error** Blender crashes at start **Exact steps for others to reproduce the error** Save user preferences with translation to French enabled. Close and restart Blender. [Blender 2_79 crash.rtf](https://archive.blender.org/developer/F4937118/Blender_2_79_crash.rtf)
Author

Added subscriber: @Warun

Added subscriber: @Warun

#57822 was marked as duplicate of this issue

#57822 was marked as duplicate of this issue

#57353 was marked as duplicate of this issue

#57353 was marked as duplicate of this issue

Added subscriber: @brecht

Added subscriber: @brecht
Bastien Montagne was assigned by Brecht Van Lommel 2018-10-04 19:14:46 +02:00

On Linux I don't get a crash, but valgrind shows a backtrace in the locale code as well:

==22684== Conditional jump or move depends on uninitialised value(s)
==22684==    at 0xC4135B3: __wmemchr_avx2 (memchr-avx2.S:240)
==22684==    by 0xCD7C2DF: std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::find(wchar_t, unsigned long) const (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==22684==    by 0x387D43E: boost::locale::gnu_gettext::mo_message<wchar_t>::load_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, boost::function<std::vector<char, std::allocator<char> > (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&) (in /home/brecht/dev/build_linux/bin/blender)
==22684==    by 0x387FE43: boost::locale::gnu_gettext::mo_message<wchar_t>::mo_message(boost::locale::gnu_gettext::messages_info const&) (in /home/brecht/dev/build_linux/bin/blender)
==22684==    by 0x38749C0: boost::locale::message_format<wchar_t>* boost::locale::gnu_gettext::create_messages_facet<wchar_t>(boost::locale::gnu_gettext::messages_info const&) (in /home/brecht/dev/build_linux/bin/blender)
==22684==    by 0x386C56F: boost::locale::impl_posix::posix_localization_backend::install(std::locale const&, unsigned int, unsigned int) (in /home/brecht/dev/build_linux/bin/blender)
==22684==    by 0x38680C8: boost::locale::localization_backend_manager::impl::actual_backend::install(std::locale const&, unsigned int, unsigned int) (in /home/brecht/dev/build_linux/bin/blender)
==22684==    by 0x386387B: boost::locale::generator::generate(std::locale const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const (in /home/brecht/dev/build_linux/bin/blender)
==22684==    by 0x3863FE6: boost::locale::generator::generate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const (in /home/brecht/dev/build_linux/bin/blender)
==22684==    by 0x2B8641C: operator() (generator.hpp:203)
==22684==    by 0x2B8641C: bl_locale_set (boost_locale_wrapper.cpp:64)
==22684==    by 0x251F735: BLT_lang_set (blt_lang.c:278)
==22684==    by 0x179EBF8: WM_init (wm_init_exit.c:200)
On Linux I don't get a crash, but valgrind shows a backtrace in the locale code as well: ``` ==22684== Conditional jump or move depends on uninitialised value(s) ==22684== at 0xC4135B3: __wmemchr_avx2 (memchr-avx2.S:240) ==22684== by 0xCD7C2DF: std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::find(wchar_t, unsigned long) const (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25) ==22684== by 0x387D43E: boost::locale::gnu_gettext::mo_message<wchar_t>::load_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, boost::function<std::vector<char, std::allocator<char> > (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)> const&) (in /home/brecht/dev/build_linux/bin/blender) ==22684== by 0x387FE43: boost::locale::gnu_gettext::mo_message<wchar_t>::mo_message(boost::locale::gnu_gettext::messages_info const&) (in /home/brecht/dev/build_linux/bin/blender) ==22684== by 0x38749C0: boost::locale::message_format<wchar_t>* boost::locale::gnu_gettext::create_messages_facet<wchar_t>(boost::locale::gnu_gettext::messages_info const&) (in /home/brecht/dev/build_linux/bin/blender) ==22684== by 0x386C56F: boost::locale::impl_posix::posix_localization_backend::install(std::locale const&, unsigned int, unsigned int) (in /home/brecht/dev/build_linux/bin/blender) ==22684== by 0x38680C8: boost::locale::localization_backend_manager::impl::actual_backend::install(std::locale const&, unsigned int, unsigned int) (in /home/brecht/dev/build_linux/bin/blender) ==22684== by 0x386387B: boost::locale::generator::generate(std::locale const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const (in /home/brecht/dev/build_linux/bin/blender) ==22684== by 0x3863FE6: boost::locale::generator::generate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const (in /home/brecht/dev/build_linux/bin/blender) ==22684== by 0x2B8641C: operator() (generator.hpp:203) ==22684== by 0x2B8641C: bl_locale_set (boost_locale_wrapper.cpp:64) ==22684== by 0x251F735: BLT_lang_set (blt_lang.c:278) ==22684== by 0x179EBF8: WM_init (wm_init_exit.c:200) ```

@brecht not sure why that’s on my desk? Your valgrind backtrace does not have much in common with the original error (orig error is a crash while trying to translate datablock ID name somewhere in versioning code, when reading 'home' .blend file at startup). Not sure what to do with valgrind stuff, not even sure that’s not a false positive, in any case that’s very deep in boost library… In any case, cannot reproduce any crash here on debian64 with own build.

@Warun I’d kind of expect that starting Blender with --factory-startup command-line option, you’d get no crash? If that’s the case, can you please attach here your startup .blend file? Thanks.

@brecht not sure why that’s on my desk? Your valgrind backtrace does not have much in common with the original error (orig error is a crash while trying to translate datablock ID name somewhere in versioning code, when reading 'home' .blend file at startup). Not sure what to do with valgrind stuff, not even sure that’s not a false positive, in any case that’s very deep in boost library… In any case, cannot reproduce any crash here on debian64 with own build. @Warun I’d kind of expect that starting Blender with `--factory-startup` command-line option, you’d get no crash? If that’s the case, can you please attach here your startup .blend file? Thanks.
Author

Hi,

I used October 4 version, can't get it to start, don't know where to look for the .blend file...

Hi, I used October 4 version, can't get it to start, don't know where to look for the .blend file...

Did you try to run it with --factory-startup command-line option?

Did you try to run it with `--factory-startup` command-line option?
Author

Hi Bastien,

I did. What I just get is the icon bumping in the dock... Same as if I use the icon to launch blender.

Hi Bastien, I did. What I just get is the icon bumping in the dock... Same as if I use the icon to launch blender.
Author

With the version, blender-2.79.0-git20181006.6e08b01bd9a-x86_64, I managed to get it to start.

without --factory-startup, crash
with --factory-startup start is OK.

Here is the file I saved.untitled.blend

With the version, blender-2.79.0-git20181006.6e08b01bd9a-x86_64, I managed to get it to start. without --factory-startup, crash with --factory-startup start is OK. Here is the file I saved.[untitled.blend](https://archive.blender.org/developer/F4958764/untitled.blend)
Author

Any News?

Any News?

@Warun pushed a potential fix, please check with tomorrow's build from buildbot. If that does not do it, am afraid you'll have to settle with a re-initialization of your user preferences… :/

@Warun pushed a potential fix, please check with tomorrow's build from buildbot. If that does not do it, am afraid you'll have to settle with a re-initialization of your user preferences… :/

Added subscriber: @LARK

Added subscriber: @LARK

It seems another user still has the same issue on today's build.

What could give a hint is running this from the terminal and attaching the output here:

locale -a

@mont29, it probably doesn't solve the core of the issue, but I think the exception handling in bl_locale_pgettext may be wrong too? It should be catching the bad cast but isn't. Maybe it should be:

-    catch(std::bad_cast const &e) {
+    catch(const std::bad_cast &e) {

-    catch(std::exception const &e) {
+    catch(const std::exception &e) {
It seems another user still has the same issue on today's build. What could give a hint is running this from the terminal and attaching the output here: ``` locale -a ``` @mont29, it probably doesn't solve the core of the issue, but I think the exception handling in `bl_locale_pgettext` may be wrong too? It should be catching the bad cast but isn't. Maybe it should be: ``` - catch(std::bad_cast const &e) { + catch(const std::bad_cast &e) { - catch(std::exception const &e) { + catch(const std::exception &e) { ```

Don’t remember writing those exceptions, but indeed seems const is at the wrong place. Though I really doubt this will fix things here…

@LARK @Warun Please also try to start blender with --factory-startup, enable again translation (including data names translation), and create a new ID. Does it also crash in that case?

Don’t remember writing those exceptions, but indeed seems const is at the wrong place. Though I really doubt this will fix things here… @LARK @Warun Please also try to start blender with `--factory-startup`, enable again translation (including data names translation), and create a new ID. Does it also crash in that case?

Fixing the exceptions should at least stop it from crashing, but the translation would still be wrong.

Fixing the exceptions should at least stop it from crashing, but the translation would still be wrong.
Author

Hi,

I tested without "--factory-startup" on blender-2.79.0-git20181023.86dbbd156fa-x86_64 => Crash
with "--factory-startup" => no crash.
I can change the language to French... But what do mean exactly by "create a new ID"?

Hi, I tested without "--factory-startup" on blender-2.79.0-git20181023.86dbbd156fa-x86_64 => Crash with "--factory-startup" => no crash. I can change the language to French... But what do mean exactly by "create a new ID"?

@Warun arg sorry, did the fix in 2.8 only, now pushed to master as well ( 35d7211bfa ).

@Warun arg sorry, did the fix in 2.8 only, now pushed to master as well ( 35d7211bfa ).
Author

Hi, I tested blender-2.79.0-git20181025.65d4314b8e4-x86_64...
same result

Hi, I tested blender-2.79.0-git20181025.65d4314b8e4-x86_64... same result
Author

Hi,

Tested, blender-2.79.0-git20181031.5490708c399-x86_64 still crashing...

Hi, Tested, blender-2.79.0-git20181031.5490708c399-x86_64 still crashing...

Can you attach the crash log from the new build? The original crash is supposed to be fixed, so it may be happening somewhere else now.

Can you attach the crash log from the new build? The original crash is supposed to be fixed, so it may be happening somewhere else now.
Author

Hi,
{F5327538}Here it is....

Hi, {[F5327538](https://archive.blender.org/developer/F5327538/Blender_crash_2.79_2018-10-31_a.rtf)}Here it is....

proper link (since impossible to edit comments ;) ): Blender crash 2.79 2018-10-31_a.rtf

proper link (since impossible to edit comments ;) ): [Blender crash 2.79 2018-10-31_a.rtf](https://archive.blender.org/developer/F5327538/Blender_crash_2.79_2018-10-31_a.rtf)
Author

This comment was removed by @Warun

*This comment was removed by @Warun*

Same issue as in original crash it’d seem…

@brecht I really do not know what to do here, this error makes no sense to me, we are supposed to catch (and discard) all exceptions… :/

Same issue as in original crash it’d seem… @brecht I really do not know what to do here, this error makes no sense to me, we are supposed to catch (and discard) **all** exceptions… :/

@Warun eeeeeeek! please never ever do that, walls of text make tasks totally unreadable! removed your comment.

@Warun eeeeeeek! please never ever do that, walls of text make tasks totally unreadable! removed your comment.
Author

Well as the attachment didn't work for you... I thought it would help...

Well as the attachment didn't work for you... I thought it would help...
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

for future reference, when you drag in an attachment make sure the { and } have a space around it changing your comment from

Hi,
{F5327538}Here it is....

to

Hi,
{F5327538} Here it is....

will make the attachment show up properly .

for future reference, when you drag in an attachment make sure the { and } have a space around it changing your comment from ``` Hi, {F5327538}Here it is.... ``` to ``` Hi, {F5327538} Here it is.... ```` will make the attachment show up properly .

Added subscribers: @JoanCastiblanco, @mont29, @lichtwerk

Added subscribers: @JoanCastiblanco, @mont29, @lichtwerk
Bastien Montagne changed title from Daily build of Blend 2.79 crashes on OSX Mojave to Crash due to i18n translation at startup on OSX Mojave (versionning code, Data names translation enabled) 2018-11-14 11:12:52 +01:00

This issue was referenced by fa0fcbe4d6

This issue was referenced by fa0fcbe4d6ca3f183f02395fe9ba18fb5ea87748

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#57066
No description provided.