Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/notes/bugfix-19420.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Fix crash on startup when resuming android app after quit
4 changes: 4 additions & 0 deletions engine/src/dskmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
#include "font.h"
#include "stacksecurity.h"
#include "system.h"
#include "eventqueue.h"

////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -114,6 +115,9 @@ bool X_init(int argc, MCStringRef argv[], MCStringRef envp[])
// MW-2012-02-23: [[ FontRefs ]] Initialize the logical font table module.
MCLogicalFontTableInitialize();

// Initialize the event queue
MCEventQueueInitialize();

////

MCswapbytes = byte_swapped();
Expand Down
7 changes: 7 additions & 0 deletions engine/src/em-dc-mainloop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
#include "system.h"
#include "font.h"
#include "util.h"
#include "eventqueue.h"

#include <arpa/inet.h>

Expand Down Expand Up @@ -143,6 +144,12 @@ X_init(int argc,
goto error_cleanup;
}

// Initialize the event queue
if (!MCEventQueueInitialize())
{
goto error_cleanup;
}

/* ---------- More globals */

/* executable file name */
Expand Down
3 changes: 3 additions & 0 deletions engine/src/globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,9 @@ int X_close(void)
// Cleanup the parentscript stuff
MCParentScript::Cleanup();

// Finalize the event queue
MCEventQueueFinalize();

// MW-2012-02-23: [[ LogFonts ]] Finalize the font table module.
MCLogicalFontTableFinalize();
// MW-2012-02-23: [[ FontRefs ]] Finalize the font module.
Expand Down
4 changes: 4 additions & 0 deletions engine/src/mblmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
#include "redraw.h"
#include "system.h"
#include "font.h"
#include "eventqueue.h"

////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -105,6 +106,9 @@ bool X_init(int argc, MCStringRef argv[], int envc, MCStringRef envp[])
// MW-2012-02-23: [[ FontRefs ]] Initialize the logical font table module.
MCLogicalFontTableInitialize();

// Initialize the event queue
MCEventQueueInitialize();

// MM-2014-02-10: [[ LipOpenSSL 1.0.1e ]] Attempt load revsecurity library on Java side.
#if defined(TARGET_SUBPLATFORM_ANDROID)
extern bool revandroid_loadExternalLibrary(MCStringRef p_external, MCStringRef& r_filename);
Expand Down
4 changes: 4 additions & 0 deletions engine/src/srvmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
#include "uidc.h"
#include "font.h"
#include "libscript/script.h"
#include "eventqueue.h"

////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -377,6 +378,9 @@ bool X_init(int argc, MCStringRef argv[], MCStringRef envp[])
// MW-2012-02-23: [[ FontRefs ]] Initialize the logical font table module.
MCLogicalFontTableInitialize();

// Initialize the event queue
MCEventQueueInitialize();

////

// Create the basic locale and the system locale
Expand Down