cef_1.1180.832 OSX 10.7 Locale could not be found...

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

cef_1.1180.832 OSX 10.7 Locale could not be found...

Postby karl » Wed Jan 30, 2013 1:09 pm

I am on Mac OSX 10.7 and loading the cef and my custom dylib via JNI so I do not have an app bundle... according to the docs for CefSettings.locales_dir_path
This value is ignored on Mac OS X where pack files are always loaded from the app bundle Resources directory.


So how can I change this loading behavior? I've tried quite a few things but always end up with the error:

[0130/095203:WARNING:resource_bundle.cc(209)] locale_file_path.empty()
[0130/095203:FATAL:cef_context.cc(415)] Check failed: !loaded_locale.empty(). Locale could not be found for en

From Googling I see only 2 options...
1) Specify the setting pack_loading_disabled=true and create my own CefResourceBundleHandler
The problem with this is I cannot find any examples or documentation on how to implement my own CefResourceBundleHandler

2) Download the CEF source and edit cef_context.cc changing method CefResourceBundleDelegate::GetPathForLocalePack
The problem with this is I don't even know if it will work and building from source looks like it's going to be very difficult.

I have searched high and low for an answer to this but I have been unable to find one. Sorry if this has been posted before as I could not find it using the forum search tools or google.

Thanks for your help!
karl
Newbie
 
Posts: 2
Joined: Wed Jan 30, 2013 12:56 pm

Re: cef_1.1180.832 OSX 10.7 Locale could not be found...

Postby magreenblatt » Wed Jan 30, 2013 3:08 pm

#2 should work and it's not very difficult to build from source. Here are the instructions: http://code.google.com/p/chromiumembedd ... ndBuilding
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: cef_1.1180.832 OSX 10.7 Locale could not be found...

Postby karl » Wed Jan 30, 2013 9:04 pm

Thanks, building wasn't horrible I change the method to:
Code: Select all
  virtual FilePath GetPathForLocalePack(const FilePath& pack_path, const std::string& locale) OVERRIDE {
     if(!context_->settings().pack_loading_disabled){
        if(context_->settings().locales_dir_path.length > 0){
           std::stringstream lprojStringStream;
           lprojStringStream << locale << ".lproj";
    
           FilePath pathToLocaleFile;
           pathToLocaleFile = pathToLocaleFile.Append(CefString(&context_->settings().locales_dir_path));
           pathToLocaleFile = pathToLocaleFile.Append(lprojStringStream.str());
           pathToLocaleFile = pathToLocaleFile.Append("locale.pak");
           return pathToLocaleFile;
        }else{
           return pack_path;
        }
     }
     return FilePath();
  }


So that parts working. Now I'm getting "Invalid memory access of location 0x0 eip=0x1a3b857d".

Which I'm hoping is because I checked out the code as
Code: Select all
svn co http://chromiumembedded.googlecode.com/svn/branches/1180/cef1/ cef
(missing the @832 to match up with the binary release).

My signal catcher is printing the following, any chance you've seen something like this? You think checking out the source as revision 832 would help?
Code: Select all
Invalid memory access of location 0x0 eip=0x19691560
Caught signal 10 (SIGBUS)
stack trace:
4   libcef.dylib                        0x196986ab cef_zip_reader_create + 314907
5   libcef.dylib                        0x196985cb cef_zip_reader_create + 314683
6   libcef.dylib                        0x19cf6560 cef_time_delta + 200160
7   libcef.dylib                        0x19cf63d5 cef_time_delta + 199765
8   libcef.dylib                        0x19cb5a5e _ZN6webkit5npapi25CarbonPluginWindowTracker29DestroyDummyWindowForDelegateEPvP15OpaqueWindowPtr + 463134
9   libcef.dylib                        0x19b57383 cef_zip_reader_create + 5290739
10  libcef.dylib                        0x1a828b28 cef_time_delta + 11940776
11  libcef.dylib                        0x1a85a813 cef_time_delta + 12144787
12  libcef.dylib                        0x1a860e33 cef_time_delta + 12170931
13  libcef.dylib                        0x1a3b27dc cef_time_delta + 7262300
14  libcef.dylib                        0x1a3b2b3b cef_time_delta + 7263163
15  libcef.dylib                        0x1a4987a9 cef_time_delta + 8204329
16  AppKit                              0x963221ec -[NSAnimation(NSInternal) _advanceTimeWithTimer:] + 409
17  Foundation                          0x9392dbab __NSFireTimer + 166
18  CoreFoundation                      0x9b1792a6 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
19  CoreFoundation                      0x9b178c37 __CFRunLoopDoTimer + 743
20  CoreFoundation                      0x9b157cd0 __CFRunLoopRun + 1888
21  CoreFoundation                      0x9b1571dc CFRunLoopRunSpecific + 332
22  CoreFoundation                      0x9b157088 CFRunLoopRunInMode + 120
23  HIToolbox                           0x90562543 RunCurrentEventLoopInMode + 318
24  HIToolbox                           0x905698ab ReceiveNextEventCommon + 381
25  HIToolbox                           0x9056971a BlockUntilNextEventMatchingListInMode + 88
26  AppKit                              0x96148ee8 _DPSNextEvent + 678
27  AppKit                              0x96148752 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 113
28  libawt.jnilib                       0x12104255 -[NSApplicationAWT nextEventMatchingMask:untilDate:inMode:dequeue:] + 132
29  AppKit                              0x96144ac1 -[NSApplication run] + 911
30  libawt.jnilib                       0x12102578 +[AWTStarter startAWT:] + 2019
31  libawt.jnilib                       0x12101d45 -[CPerformer perform] + 259
32  CoreFoundation                      0x9b1b6d11 -[NSObject performSelector:withObject:] + 65
33  Foundation                          0x93924e0c __NSThreadPerformPerform + 503
34  CoreFoundation                      0x9b12e13f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
35  CoreFoundation                      0x9b12daf6 __CFRunLoopDoSources0 + 246
36  CoreFoundation                      0x9b1579c8 __CFRunLoopRun + 1112
37  CoreFoundation                      0x9b1571dc CFRunLoopRunSpecific + 332
38  CoreFoundation                      0x9b157088 CFRunLoopRunInMode + 120
39  java                                0x000051af java + 16815
40  java                                0x00004bd3 java + 15315
41  java                                0x00002329 java + 4905
42  ???                                 0x00000007 0x0 + 7


Thanks for your help
karl
Newbie
 
Posts: 2
Joined: Wed Jan 30, 2013 12:56 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 201 guests