Loading docs in built version

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

Loading docs in built version

Postby monte » Tue Jun 02, 2015 1:36 am

Howdy, what do I need to do to have the dictionary stack load the docs from the repo? At the moment the dictionary stack appears blank. I'm hoping there's a way now that the docs have been updated.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 1554
Joined: Fri Jan 13, 2012 1:47 am

Re: Loading docs in built version

Postby monte » Tue Jun 02, 2015 2:56 am

OK, After ensuring that I'd built revbrowser I set gREVDevelopment to true and found I'm getting an execution error "creation failed" on:
Code: Select all
put revBrowserOpenCEF(the windowId of this stack, tUrl) into tID


This means MCCefBrowserInstantiate is returning null and I believe this is caused by the built version not containing the CEF framework.

I tried adding an extra copy files rule to add the framework from the prebuilt directory to the LiveCode-Community target and got a crash so maybe there's some other issue.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 1554
Joined: Fri Jan 13, 2012 1:47 am

Re: Loading docs in built version

Postby livecodeian » Tue Jun 02, 2015 11:27 am

@monte: Which branch are you building from? The current develop branch does not yet include the required libcef binaries in the prebuilt fetch script. For now I'd suggest copying the required files from an installed version.

LibCEF requires us to place the framework files within the app bundle at specific locations:

Code: Select all
LiveCode-Community.app/
   Contents/
      Frameworks/
         Chromium Embedded Framework.framework/*
         revbrowser-cefprocess.app
         revbrowser-cefprocess EH.app
         revbrowser-cefprocess NP.app
livecodeian
 
Posts: 6
Joined: Mon Apr 22, 2013 3:29 pm
Location: Edinburgh

Re: Loading docs in built version

Postby monte » Wed Jun 03, 2015 9:05 am

Hi @livecodeian

I seem to have /prebuilt/lib/libcef/mac/Chromium Embedded Framework.framework perhaps that's from running fetch from a different branch?

Anyway, I can't seem to get any combination of the built cefprocess and this libCEF in prebuilt nor copying all 4 from a LC install to work. They all crash. Any other ideas?

Code: Select all
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.chromium.ContentShell.framework   0x0def9d17 cef_time_delta + 353191
1   org.chromium.ContentShell.framework   0x0df1d01e cef_time_delta + 497326
2   org.chromium.ContentShell.framework   0x0de8b29f cef_log + 127
3   com.runrev.revbrowser            0x0a0a1299 cef_log + 73 (libcefstubs_osx.cpp:1825)
4   com.runrev.revbrowser            0x0a116624 cef::logging::LogMessage::~LogMessage() + 148 (cef_logging.cc:176)
5   com.runrev.revbrowser            0x0a116667 cef::logging::LogMessage::~LogMessage() + 23 (cef_logging.cc:177)
6   com.runrev.revbrowser            0x0a0a445b CefExecuteProcess(CefMainArgs const&, CefRefPtr<CefApp>, void*) + 251 (libcef_dll_wrapper.cc:126)
7   com.runrev.revbrowser            0x0a083089 MCCefInitialise() + 505 (cefbrowser.cpp:165)
8   com.runrev.revbrowser            0x0a0832ff MCCefBrowserInitialise() + 143 (cefbrowser.cpp:212)
9   com.runrev.revbrowser            0x0a083df1 MCCefBrowserInstantiate(int) + 17 (cefbrowser.cpp:889)
10  com.runrev.revbrowser            0x0a078dd8 commonBrowserOpen(bool, bool, char**, int, char**, int*, int*) + 184 (revbrowser.cpp:826)
11  com.runrev.revbrowser            0x0a0790e1 revBrowserOpenCef(char**, int, char**, int*, int*) + 113 (revbrowser.cpp:868)
12  com.runrev.revbrowser            0x0a0806ac ExternalWrapperObjCCall(void (*)(char**, int, char**, int*, int*), char**, int, char**, int*, int*) + 172 (external.h:637)
13  com.runrev.revbrowser            0x0a07ba3c void ExternalWrapperObjC<&(revBrowserOpenCef(char**, int, char**, int*, int*))>(char**, int, char**, int*, int*) + 188 (external.h:654)
14  com.runrev.livecode              0x0026d3bf MCExternalV0::Handle(MCObject*, Handler_type, unsigned int, MCParameter*) + 879 (externalv0.cpp:325)
15  com.runrev.livecode              0x000c4a5a MCExternalHandlerList::Handle(MCObject*, Handler_type, __MCName*, MCParameter*) + 218 (external.cpp:229)
16  com.runrev.livecode              0x0022634e MCStack::handle(Handler_type, __MCName*, MCParameter*, MCObject*) + 494 (stack.cpp:3032)
17  com.runrev.livecode              0x00226436 MCStack::handle(Handler_type, __MCName*, MCParameter*, MCObject*) + 726 (stack.cpp:3051)
18  com.runrev.livecode              0x00383a08 MCKeywordsExecCommandOrFunction(MCExecContext&, bool, MCHandler*, MCParameter*, __MCName*, unsigned short, unsigned short, bool, bool) + 1432 (exec-keywords.cpp:234)
19  com.runrev.livecode              0x000c3d97 MCFuncref::eval_ctxt(MCExecContext&, MCExecValue&) + 167 (express.cpp:850)
20  com.runrev.livecode              0x002fd072 MCExecContext::EvaluateExpression(MCExpression*, Exec_errors, MCExecValue&) + 130 (exec.cpp:728)
21  com.runrev.livecode              0x00053aa0 MCPut::exec_ctxt(MCExecContext&) + 80 (cmds.cpp:1386)
22  com.runrev.livecode              0x00133c2e MCHandler::exec(MCExecContext&, MCParameter*) + 2190 (handler.cpp:452)
23  com.runrev.livecode              0x001adff0 MCObject::exechandler(MCHandler*, MCParameter*) + 624 (object.cpp:885)
24  com.runrev.livecode              0x001af0aa MCObject::handleself(Handler_type, __MCName*, MCParameter*) + 314 (object.cpp:1056)
25  com.runrev.livecode              0x0022627f MCStack::handle(Handler_type, __MCName*, MCParameter*, MCObject*) + 287 (stack.cpp:3018)
26  com.runrev.livecode              0x0003a51a MCCard::handle(Handler_type, __MCName*, MCParameter*, MCObject*) + 570 (card.cpp:1473)
27  com.runrev.livecode              0x001ac4ab MCObject::message(__MCName*, MCParameter*, unsigned char, unsigned char, unsigned char) + 651 (object.cpp:2086)
28  com.runrev.livecode              0x002366da MCStack::openrect(MCRectangle const&, Window_mode, MCStack*, Window_position, Object_pos) + 4442 (stack2.cpp:2418)
29  com.runrev.livecode              0x002dce80 MCInterfaceExecSubwindow(MCExecContext&, MCStack*, MCStack*, MCRectangle, int, int, int) + 240 (exec-interface.cpp:2793)
30  com.runrev.livecode              0x002dd700 MCInterfaceExecOpenStack(MCExecContext&, MCStack*, int) + 192 (exec-interface.cpp:2891)
31  com.runrev.livecode              0x00090702 MCSubwindow::exec_ctxt(MCExecContext&) + 834 (cmdss.cpp:2873)
32  com.runrev.livecode              0x00133c2e MCHandler::exec(MCExecContext&, MCParameter*) + 2190 (handler.cpp:452)
33  com.runrev.livecode              0x001adff0 MCObject::exechandler(MCHandler*, MCParameter*) + 624 (object.cpp:885)
34  com.runrev.livecode              0x001af0aa MCObject::handleself(Handler_type, __MCName*, MCParameter*) + 314 (object.cpp:1056)
35  com.runrev.livecode              0x0022627f MCStack::handle(Handler_type, __MCName*, MCParameter*, MCObject*) + 287 (stack.cpp:3018)
36  com.runrev.livecode              0x000b495f MCDispatch::handle(Handler_type, __MCName*, MCParameter*, MCObject*) + 639 (dispatch.cpp:322)
37  com.runrev.livecode              0x00226436 MCStack::handle(Handler_type, __MCName*, MCParameter*, MCObject*) + 726 (stack.cpp:3051)
38  com.runrev.livecode              0x00226436 MCStack::handle(Handler_type, __MCName*, MCParameter*, MCObject*) + 726 (stack.cpp:3051)
39  com.runrev.livecode              0x0003a51a MCCard::handle(Handler_type, __MCName*, MCParameter*, MCObject*) + 570 (card.cpp:1473)
40  com.runrev.livecode              0x001af28f MCObject::handle(Handler_type, __MCName*, MCParameter*, MCObject*) + 191 (object.cpp:1103)
41  com.runrev.livecode              0x00383a58 MCKeywordsExecCommandOrFunction(MCExecContext&, bool, MCHandler*, MCParameter*, __MCName*, unsigned short, unsigned short, bool, bool) + 1512 (exec-keywords.cpp:240)
42  com.runrev.livecode              0x0024ade6 MCComref::exec_ctxt(MCExecContext&) + 150 (statemnt.cpp:540)
43  com.runrev.livecode              0x00133c2e MCHandler::exec(MCExecContext&, MCParameter*) + 2190 (handler.cpp:452)
44  com.runrev.livecode              0x001adff0 MCObject::exechandler(MCHandler*, MCParameter*) + 624 (object.cpp:885)
45  com.runrev.livecode              0x001af0aa MCObject::handleself(Handler_type, __MCName*, MCParameter*) + 314 (object.cpp:1056)
46  com.runrev.livecode              0x001af223 MCObject::handle(Handler_type, __MCName*, MCParameter*, MCObject*) + 83 (object.cpp:1096)
47  com.runrev.livecode              0x001ac4ab MCObject::message(__MCName*, MCParameter*, unsigned char, unsigned char, unsigned char) + 651 (object.cpp:2086)
48  com.runrev.livecode              0x001ac1fb MCObject::message_with_valueref_args(__MCName*, void*) + 123 (object.cpp:2121)
49  com.runrev.livecode              0x003cded1 MCButton::mup(unsigned short, bool) + 3889 (button.cpp:1517)
50  com.runrev.livecode              0x0003922e MCCard::mup(unsigned short, bool) + 190 (card.cpp:850)
51  com.runrev.livecode              0x00225368 MCStack::mup(unsigned short, bool) + 136 (stack.cpp:1154)
52  com.runrev.livecode              0x003be6c6 MCPlatformHandleMouseUp(MCPlatformWindow*, unsigned int, unsigned int) + 374 (desktop.cpp:402)
53  com.runrev.livecode              0x003b129c MCPlatformCallbackSendMouseUp(MCPlatformWindow*, unsigned int, unsigned int) + 60 (platform.cpp:217)
54  com.runrev.livecode              0x003910ef MCMacPlatformHandleMousePress(unsigned int, bool) + 831 (mac-core.mm:1620)
55  com.runrev.livecode              0x003aa9c1 MCMacPlatformWindow::ProcessMousePress(int, bool) + 49 (mac-window.mm:1758)
56  com.runrev.livecode              0x003aa979 -[com_runrev_livecode_MCWindowView handleMousePress:isDown:] + 281 (mac-window.mm:1472)
57  com.runrev.livecode              0x003a795f -[com_runrev_livecode_MCWindowView mouseUp:] + 223 (mac-window.mm:647)
58  com.apple.AppKit                 0x99169871 -[NSWindow _reallySendEvent:isDelayedEvent:] + 676
59  com.apple.AppKit                 0x98a4ef9a -[NSWindow sendEvent:] + 526
60  com.apple.AppKit                 0x98a4b594 -[NSApplication sendEvent:] + 4765
61  com.runrev.livecode              0x0038c6a2 -[com_runrev_livecode_MCApplication sendEvent:] + 418 (mac-core.mm:88)
62  com.runrev.livecode              0x0038e9c3 MCPlatformWaitForEvent(double, bool) + 1043 (mac-core.mm:764)
63  com.runrev.livecode              0x003b6ed7 MCScreenDC::wait(double, unsigned char, unsigned char) + 647 (desktop-dc.cpp:881)
64  com.runrev.livecode              0x0029cbfa X_main_loop_iteration() + 314 (dskmain.cpp:330)
65  com.runrev.livecode              0x003bdb2a MCPlatformHandleApplicationRun(bool&) + 26 (desktop.cpp:118)
66  com.runrev.livecode              0x003b0f37 MCPlatformCallbackSendApplicationRun(bool&) + 23 (platform.cpp:88)
67  com.runrev.livecode              0x0038d71b -[com_runrev_livecode_MCApplicationDelegate runMainLoop] + 91 (mac-core.mm:353)
68  com.apple.Foundation             0x98487166 __NSFireDelayedPerform + 489
69  com.apple.CoreFoundation         0x97752006 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
70  com.apple.CoreFoundation         0x97751ab4 __CFRunLoopDoTimer + 1316
71  com.apple.CoreFoundation         0x977cd54f __CFRunLoopDoTimers + 351
72  com.apple.CoreFoundation         0x97709531 __CFRunLoopRun + 2081
73  com.apple.CoreFoundation         0x97708aa6 CFRunLoopRunSpecific + 390
74  com.apple.CoreFoundation         0x9770890b CFRunLoopRunInMode + 123
75  com.apple.HIToolbox              0x9808b8f8 RunCurrentEventLoopInMode + 262
76  com.apple.HIToolbox              0x9808b503 ReceiveNextEventCommon + 192
77  com.apple.HIToolbox              0x9808b42c _BlockUntilNextEventMatchingListInModeWithFilter + 99
78  com.apple.AppKit                 0x98977721 _DPSNextEvent + 742
79  com.apple.AppKit                 0x98976dc5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 350
80  com.apple.AppKit                 0x9896b77c -[NSApplication run] + 907
81  com.runrev.livecode              0x00391b7d main + 941 (mac-core.mm:2033)
82  com.runrev.livecode              0x00002e75 start + 53
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 1554
Joined: Fri Jan 13, 2012 1:47 am

Re: Loading docs in built version

Postby monte » Thu Sep 03, 2015 10:24 pm

I had another go at trying to get this working last night but it seems it doesn't like me. I had a build error on the copy to Frameworks build phase because it's looking for the framework in prebuilt/lib/mac and it's in prebuilt/lib/libcef/mac. I fixed and now the dictionary appears to get past the black stack stage but not much further. @LCfraser I guess it needs to be changed in the gyp file somewhere too...

The Xcode console contains:
Code: Select all
Unable to load library: libcef.so
Unable to load library: libcef.so


Here's what I'm seeing:
Screenshot 2015-09-04 07.21.23.png
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 1554
Joined: Fri Jan 13, 2012 1:47 am

Re: Loading docs in built version

Postby livecodeali » Fri Sep 04, 2015 4:37 pm

Try copying the Frameworks folder from _build/mac/Debug into the _build/mac/Debug/LiveCode-Community.app package, in its Contents/ directory
livecodeali
Livecode Staff Member
Livecode Staff Member
 
Posts: 111
Joined: Thu Apr 18, 2013 2:48 pm

Re: Loading docs in built version

Postby monte » Sat Sep 05, 2015 6:50 am

Thanks for looking at this @livecodeali

I tried that and I get this crash:

Code: Select all
0   org.chromium.ContentShell.framework   0x0faf9d17 cef_time_delta + 353191
1   org.chromium.ContentShell.framework   0x0fb1d01e cef_time_delta + 497326
2   org.chromium.ContentShell.framework   0x0fa8b29f cef_log + 127
3   com.runrev.revbrowser            0x0b88ef39 cef_log + 73 (libcefstubs.cpp:1825)
4   com.runrev.revbrowser            0x0b8046c4 cef::logging::LogMessage::~LogMessage() + 148 (cef_logging.cc:176)
5   com.runrev.revbrowser            0x0b804707 cef::logging::LogMessage::~LogMessage() + 23 (cef_logging.cc:177)
6   com.runrev.revbrowser            0x0b882e7b CefExecuteProcess(CefMainArgs const&, CefRefPtr<CefApp>, void*) + 251 (libcef_dll_wrapper.cc:126)
7   com.runrev.revbrowser            0x0b7d9eb9 MCCefInitialise() + 505 (cefbrowser.cpp:165)
8   com.runrev.revbrowser            0x0b7da12f MCCefBrowserInitialise() + 143 (cefbrowser.cpp:212)
9   com.runrev.revbrowser            0x0b7dac11 MCCefBrowserInstantiate(int) + 17 (cefbrowser.cpp:889)
10  com.runrev.revbrowser            0x0b7f3d98 commonBrowserOpen(bool, bool, char**, int, char**, int*, int*) + 184 (revbrowser.cpp:826)
11  com.runrev.revbrowser            0x0b7f40a1 revBrowserOpenCef(char**, int, char**, int*, int*) + 113 (revbrowser.cpp:868)
12  com.runrev.revbrowser            0x0b7f691d void ExternalWrapper<&(revBrowserOpenCef(char**, int, char**, int*, int*))>(char**, int, char**, int*, int*) + 93 (external.h:594)
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 1554
Joined: Fri Jan 13, 2012 1:47 am

Re: Loading docs in built version

Postby livecodeali » Sun Sep 06, 2015 2:27 pm

Ah it computes the api_hash in CefExecuteProcess and crashes if it doesn't match CEF_API_HASH_PLATFORM. I'm not entirely sure how to solve that.. there is some kind of incompatibility in versions somewhere.
livecodeali
Livecode Staff Member
Livecode Staff Member
 
Posts: 111
Joined: Thu Apr 18, 2013 2:48 pm

Re: Loading docs in built version

Postby livecodeali » Sun Sep 06, 2015 2:40 pm

Maybe try and make sure everything in that folder is the most recently built version?
livecodeali
Livecode Staff Member
Livecode Staff Member
 
Posts: 111
Joined: Thu Apr 18, 2013 2:48 pm

Re: Loading docs in built version

Postby monte » Mon Sep 07, 2015 1:18 am

@livecodeali I have added a copy file phase to the development target to take the framework and the cef apps from the Frameworks directory in the build folder which is where the browser target copies them to. Not sure how it couldn't be the most updated. Do you hit this error too or is it just me?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 1554
Joined: Fri Jan 13, 2012 1:47 am

Re: Loading docs in built version

Postby livecodeali » Mon Sep 07, 2015 9:20 am

I used to hit this error on my laptop at home. I'm not sure what has changed though, as I don't seem to be seeing it anymore.
livecodeali
Livecode Staff Member
Livecode Staff Member
 
Posts: 111
Joined: Thu Apr 18, 2013 2:48 pm

Re: Loading docs in built version

Postby monte » Tue Sep 08, 2015 12:22 am

One thing is that the browser project in the copy phase was looking for `/prebuilt/lib/mac/Chromium Embedded Framework.framework` but after doing a fresh fetch mine is at `/prebuilt/lib/libcef/mac/Chromium Embedded Framework.framework` so I changed the project so it compiled but perhaps you guys have a different version installed in `/prebuilt/lib/mac/Chromium Embedded Framework.framework` and the fetch is the thing that's broken?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 1554
Joined: Fri Jan 13, 2012 1:47 am

Re: Loading docs in built version

Postby livecodeali » Tue Sep 08, 2015 9:44 am

Ah yes interesting... I have CEF v39.0.2171.95 in prebuilt/lib/mac which is the correct version I think, whereas I have v37.0.2062.58 in prebuilt/lib/libcef/mac
livecodeali
Livecode Staff Member
Livecode Staff Member
 
Posts: 111
Joined: Thu Apr 18, 2013 2:48 pm

Re: Loading docs in built version

Postby monte » Tue Sep 08, 2015 11:33 am

Aha! I had the fetched file in the fetched directory which caused the script to not try again but the file must have been corrupted because trying to unarchive gets this:

Code: Select all
tar -jxf CEF-39.0.2171.95-mac-Universal.tar.bz2
lib/mac///Chromium Embedded Framework.framework/Chromium Embedded Framework: (Empty error message)
tar: Error exit delayed from previous errors.


So... delete the file, fetch, see the framework is now the right version, clean and build revbrowser and dev and it works! yay!
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/
monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
 
Posts: 1554
Joined: Fri Jan 13, 2012 1:47 am

Re: Loading docs in built version

Postby LCMark » Wed Sep 09, 2015 10:31 am

@livecodeali: Is there a way we could check this at build time to ensure people know there's a problem?
LCMark
Livecode Staff Member
Livecode Staff Member
 
Posts: 923
Joined: Thu Apr 11, 2013 11:27 am

Next

Return to Engine Contributors

Who is online

Users browsing this forum: No registered users and 1 guest