Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7159475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:14:15+00:00 2026-05-28T13:14:15+00:00

i have an error that i dont understand why appear, the most weird is

  • 0

i have an error that i dont understand why appear, the most weird is that happens sometimes but lately happens always, the code that i use is the same and i dont have make any changes to it, in fact i dont execute any code in the start of the application, i use buttons , so i dont get a reason with this error please help me, the error is a dialog that say:

Native extension Error: there are packaging errors/warning. Check each native extension in the Flex Build Packaging Page for each target platform. would you like to continue?

And when i click yes the program dont start, the debbuger show me the line:

[SWF] SerialCOMGame.swf – 2,121,630 bytes after decompression

but never start, i am using RS232 library for serial communication, before of get this error this work fine but i dont know what happen, my C code is:

/*
 * NativeSerialComunication.c
 *
 *  Created on: Jan 10, 2012
 *      Author: Diego Fernando
 */
#include "NativeSerialComunication.h"
int comport = 0;
int baudrate = 57600;
int buffsize = 4096;
unsigned char buffer[4096];
uint32_t comportOpened = 0;
FREObject IsSupported(FREContext ctx, void* functionData, uint32_t argc,
        FREObject argv[]) {
    FREObject result;
    uint32_t isSuppoerted = 1;
    FRENewObjectFromBool(isSuppoerted, &result);
    return result;
}

int startCOMListener() {
    if (!OpenComport(comport, baudrate)) {
        comportOpened = 1;
        return 1;
    }
    return 0;
}

void stopCOMListener() {
    CloseComport(comport);
    comportOpened = 0;
}

void COMListener(FREContext ctx) {
    uint8_t compbytes = 0;
    while (comportOpened) {
        compbytes = PollComport(comport, buffer, buffsize);
        FREDispatchStatusEventAsync(ctx, (const uint8_t *) "listening for data",(const uint8_t *)"datalistening");
        if (compbytes) {
            FREDispatchStatusEventAsync(ctx, (const uint8_t *) buffer,
                    (const uint8_t *) "datareceived");
        }
        Sleep(100);
    }
}
FREObject startSerialListener(FREContext ctx, void* functionData, uint32_t argc,
        FREObject argv[]) {
    FREObject result;
    if (startCOMListener()) {
        CreateThread((LPSECURITY_ATTRIBUTES) NULL, 0,(LPTHREAD_START_ROUTINE) COMListener, ctx, 0, NULL);
        FREDispatchStatusEventAsync(ctx, (const uint8_t *) "listener started",
                                    (const uint8_t *) "listenerstarted");
    }
    FRENewObjectFromBool(comportOpened, &result);
    return result;
}

FREObject stopSerialListener(FREContext ctx, void* functionData, uint32_t argc,
        FREObject argv[]) {
    FREObject result;
    stopCOMListener();
    FRENewObjectFromBool(comportOpened, &result);
    return result;
}

FREObject sendDataToSerialPort(FREContext ctx, void* functionData,
        uint32_t argc, FREObject argv[]) {
    FREObject result;
    uint32_t dataSended = 0;
    uint32_t dataToSend = 0;
    FREGetObjectAsUint32(argv[0],&dataToSend);
    printf("data to be sended %d",dataToSend);

    if (comportOpened && !SendByte(comport,dataToSend)) {
        dataSended = 1;
    }
    FRENewObjectFromBool(dataSended, &result);
    return result;
}

void MyContextInitializer(void* extData, const uint8_t* ctxType, FREContext ctx,
        uint32_t* numFunctionsToSet, const FRENamedFunction** functionsToSet) {

    *numFunctionsToSet = 4;

    FRENamedFunction* func = (FRENamedFunction*) malloc(
            sizeof(FRENamedFunction) * 4);
    func[0].name = (const uint8_t*) "isSupported";
    func[0].functionData = 0;
    func[0].function = &IsSupported;

    func[1].name = (const uint8_t*) "sendDataToSerialPort";
    func[1].functionData = 0;
    func[1].function = &sendDataToSerialPort;

    func[2].name = (const uint8_t*) "startSerialListener";
    func[2].functionData = 0;
    func[2].function = &startSerialListener;

    func[3].name = (const uint8_t*) "stopSerialListener";
    func[3].functionData = 0;
    func[3].function = &stopSerialListener;

    /*func[1].name = (const uint8_t*) "sayHelloWorld";
     func[1].functionData = 0;
     func[1].function = &sayHelloWorld;*/

    *functionsToSet = func;
}

void MyContextFinalizer(FREContext ctx) {
    return;
}

void initializer(void** extDataToSet,
        FREContextInitializer* ctxInitializerToSet,
        FREContextFinalizer* ctxFinalizerToSet) {
    extDataToSet = 0; // This example does not use any extension data.
    *ctxInitializerToSet = &MyContextInitializer;
    *ctxFinalizerToSet = &MyContextFinalizer;

}

void finalizer(void** extDataToSet) {
    stopCOMListener();
    return;
}

And this is my ActionScript code that use the native C code:

package com.nativeserialcomunication.driver
{
    import flash.events.EventDispatcher;
    import flash.events.IEventDispatcher;
    import flash.events.StatusEvent;
    import flash.external.ExtensionContext;

    public class NativeSerialComunication extends EventDispatcher
    {
        private var extensionContext:ExtensionContext;
        private var isSerialListenerStarted:Boolean = false;
        public function NativeSerialComunication(target:IEventDispatcher=null)
        {
            super(target);
            extensionContext =ExtensionContext.createExtensionContext("com.nativeserialcomunitacion.driver.NativeSerialComunitation","");
            extensionContext.addEventListener(StatusEvent.STATUS,statusHandle);
        }

        public function init():void{
            if(extensionContext.call("startSerialListener") as Boolean){
                isSerialListenerStarted = true;
                trace("serial listener started");
            }
            else{
                trace("no serial listener started");
            }
        }

        public function statusHandle(event:StatusEvent):void{
            trace("the event ("+event.level+") received, data:"+event.code);
        }

        public function isSupported():Boolean{
            return extensionContext.call("isSupported") as Boolean;
        }

        public function sendDataToSerialPort(data:uint):Boolean{
            return extensionContext.call("sendDataToSerialPort",data) as Boolean;
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:14:16+00:00Added an answer on May 28, 2026 at 1:14 pm

    The native extension package checkbox for your target platform(s) may need to be checked.

    Navigate to:

    Project Properties -> Flex Build Packaging -> Apple iOS (or Android, etc.)

    Select the Native Extensions tab and make sure “Package” is checked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably a dum error that can be fixed in seconds but have
I have a syntax error that I don't know how to fix. This is
I have this error that is keeping me from moving forward. I basically have
I have an odd error that you guys will hopefully be able to help
I have a silly error that I am unable to resolve. I try to
I have a javascript error that occurs on my site, Im pretty sure I
I have a WCF error handler that uses the IErrorHandler interface. In the HandleError
I have to debug some error that is db related and have been continuously
I have a really frustrating error that I've spent hours looking at and cannot
Hi have made this function which is made to replicate an error that I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.