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 3222080
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:57:00+00:00 2026-05-17T15:57:00+00:00

My application runs well on HTC HD2 which has Qualcomm 1GHz Snapdragon processor but

  • 0

My application runs well on HTC HD2 which has Qualcomm 1GHz Snapdragon processor but when try to run on Windows professional emulator 6 or PIDION which has ARM processor, it crashes with datatype misalignment exception.

Can anyone please help me out to find why it crashes and how to resolve it.

According to this link, __unaligned should solve the crash but did not work in my case.

  • 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-17T15:57:00+00:00Added an answer on May 17, 2026 at 3:57 pm

    __unaligned isn’t a magic bullet that you should simply start throwing around when you get a misalignment exception. First you have to determine where in the code that exception occurred and then look at why. Are you accessing a pointer that is misaligned? Something like taking a byte array or buffer of some sort and then trying to accedd WORD data from an odd boundary or DWORD data from an address not divisible by 4?

    BYTE buffer[256];
    ....
    DWORD d = *(DWORD*)buffer[3];
    

    Or maybe you have a structure that you have strange packing on?

    #pragma pack(push, 1)
    struct
    {
      BYTE b;
      DWORD d;
    } s;
    #pragma pack(pop)
    

    The key is that you must make aligned accesses. x86 allows you to make unaligned accesses only because it catches the exception for you then does a second, unaligned read. Here’s a quick tutorial, though bear in mind this is for x86, so it shows the CPU “fixing” the misalignment for you. ARM is not so forgiving. You must rearrange or reassembly the data yourself on ARM.

    You likely have to do a memcpy to an aligned address and use the data from there, but without knowing anything about your code, it’s impossible to give much more insight.

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

Sidebar

Related Questions

Our application runs off MySQL, but a client has another application that requires SQL.
The application which runs smoothly on 4.0.1 when was tried on run on 4.2.1
I have an application that runs here http://localhost:10205/ but I need it run locally
I have an ASP.net Application that runs on the internal network (well, actually it's
I recently upgraded from Grails 1.3.7 to Grails 2.0.1. The application runs normal, but
I recently added devise confirmable module to my rails app. My application runs well
I have an ASP.net MVC 2 application that runs well locally. However when I
I would like to develop an application which runs as a background service .
The company I work for has an java application that runs on esmertec jbed
I am processing a word document using mergefield and bookmark.The application runs well while

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.