Page MenuHome

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

Description

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.

Event Timeline

Brecht Van Lommel (brecht) triaged this task as Confirmed, Medium priority.

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)
Bastien Montagne (mont29) lowered the priority of this task from Confirmed, Medium to Needs Information from User.Oct 4 2018, 9:12 PM

@Brecht Van Lommel (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.

@Roland Terver (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.

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?

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.

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.

@Roland Terver (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… :/

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

@Bastien Montagne (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…

@LillyArk (LillyArk) @Roland Terver (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.

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"?

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

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

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.

proper link (since impossible to edit comments ;) ):

This comment was removed by Bastien Montagne (mont29).
Bastien Montagne (mont29) raised the priority of this task from Needs Information from User to Normal.Nov 1 2018, 7:28 PM

Same issue as in original crash it’d seem…

@Brecht Van Lommel (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… :/

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

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

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 .

Bastien Montagne (mont29) renamed this task 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) .