locked
Application works good on the device but falls on the emulator RRS feed

  • Question

  • Hi everyone,

    I have following problem.

    My application contains about 30 screens, SQLite database, and resco ui elements (http://www.resco.net/developer/support/samples.aspx?p=WindowsMobile&comp=UIElements). Application was created for windows mobile device, where works good. When start this application on the emulator, for few steps (about 10 screens, and don't matter on order) falls and return: "Unhandled exception occurred. Application will close".

    extract logs:

    1. first crash error: [2012-12-19 22:56:06.000] <2103934022> [WARNING] System.TypeLoadException: File or assembly name 'Stock, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', or one of its dependencies, was not found.
    ......
    .....
    ...

    2. second crash error: [2012-12-19 23:08:14.000] <1573494114> [WARNING] System.TypeLoadException: File or assembly name 'Inventory, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', or one of its dependencies, was not found. 

    3. third crash error: [2012-12-19 23:13:09.000] <-578189130> [WARNING] System.TypeLoadException: File or assembly name 'Missing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', or one of its dependencies, was not found.
    ... and so on. And physically all of this dll files are there.

     I use this tools:

    • Microsoft Visual Stuido 2008 C#
    • Windows Mobile 6.5.3 Professional DTK
    • Resco UI.elements
    • Windows Mobile Device Center
    • Internal DLL file: SQLite.Interop.084.dll

    I will also pleased for some ideas. Thx for response. ;)

    Wednesday, March 6, 2013 9:16 AM

Answers

  • On Wed, 6 Mar 2013 09:16:08 +0000, Kyreo wrote:

    Hi everyone,

    I have following problem.

    My application contains about 30 screens, SQLite database, and resco ui elements (http://www.resco.net/developer/support/samples.aspx?p=WindowsMobile&comp=UIElements). Application was created for windows mobile device, where works good. When start this application on the emulator, for few steps (about 10 screens, and don't matter on order) falls and return: "Unhandled exception occurred. Application will close".

    extract logs:

    1. first crash error: [2012-12-19 22:56:06.000] <2103934022> [WARNING] System.TypeLoadException: File or assembly name 'Stock, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', or one of its dependencies, was not found.
    ......
    .....
    ...

    2. second crash error: [2012-12-19 23:08:14.000] <1573494114> [WARNING] System.TypeLoadException: File or assembly name 'Inventory, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', or one of its dependencies, was not found. 

    3. third crash error: [2012-12-19 23:13:09.000] <-578189130> [WARNING] System.TypeLoadException: File or assembly name 'Missing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', or one of its dependencies, was not found.
    ... and so on. And physically all of this dll files are there.

     I use this tools:

    * Microsoft Visual Stuido 2008 C#
    * Windows Mobile 6.5.3 Professional DTK
    * Resco UI.elements
    * Windows Mobile Device Center
    * Internal DLL file: SQLite.Interop.084.dll

    I will also pleased for some ideas. Thx for response. ;)

    Two  possibilities that can be tiresome, but effective

    1) Step through your program using the debugger

    2) Scatter  message boxes (Win32 MessageBox function) through your code. You can use the
    FILE and LINE macros to tell you what line popped up each box. Start with a few boxes
    scattered in code that runs from the start of your program to where you think it crashes.
    Each time your program crashes, add a few more message boxes between the last one you saw
    and the first one you didn't see. With a little luck, you'll fairly soon narrow down the
    parts of your source code where the crash occurs. And then you can put a break point just
    past one of the message boxes and step through your code.

    3) If you're not so lucky, the symptom will be a crash in one line of code, but the bug is
    actually in another part of your program. In particular, uninitialized pointers cause such
    symptoms. You'll get some clue by checking the value of any pointers, strings, etc. used
    anywhere near the line where the crash occurs. You can then add ASSERTs to any code that
    might set these pointers, etc. You could put breaks to check for any changes in these
    values, but I found that these kinds of breaks r-e-a-l-l-y s-l-o-w execution.

    My hunch is you'll find the problem is a bug in your code that just happens to not show
    symptoms on real devices.

    -----------------------------------------
    To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

    Robert E. Zaret
    PenFact, Inc.
    20 Park Plaza, Suite 400
    Boston, MA 02116
    www.penfact.com
    r_z_aret@pen_fact.com
    Useful reading (be sure to read its disclaimer first):
       http://catb.org/~esr/faqs/smart-questions.html

    • Marked as answer by Jesse Jiang Friday, March 22, 2013 8:24 AM
    Friday, March 8, 2013 6:21 PM

All replies

  • You probably want to enable loader log and see what is going on. Here's how

    http://blogs.msdn.com/b/stevenpr/archive/2005/02/28/381744.aspx


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Wednesday, March 6, 2013 4:54 PM
  • Yes, I try debug using dotTrace diagnostic software and logger is enabled , this message is from logger and is last message before application fall:

    error: [2012-12-19 22:56:06.000] <2103934022> [WARNING] System.TypeLoadException: File or assembly name 'Stock, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', or one of its dependencies, was not found.

    Thursday, March 7, 2013 8:27 AM
  • On Wed, 6 Mar 2013 09:16:08 +0000, Kyreo wrote:

    Hi everyone,

    I have following problem.

    My application contains about 30 screens, SQLite database, and resco ui elements (http://www.resco.net/developer/support/samples.aspx?p=WindowsMobile&comp=UIElements). Application was created for windows mobile device, where works good. When start this application on the emulator, for few steps (about 10 screens, and don't matter on order) falls and return: "Unhandled exception occurred. Application will close".

    extract logs:

    1. first crash error: [2012-12-19 22:56:06.000] <2103934022> [WARNING] System.TypeLoadException: File or assembly name 'Stock, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', or one of its dependencies, was not found.
    ......
    .....
    ...

    2. second crash error: [2012-12-19 23:08:14.000] <1573494114> [WARNING] System.TypeLoadException: File or assembly name 'Inventory, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', or one of its dependencies, was not found. 

    3. third crash error: [2012-12-19 23:13:09.000] <-578189130> [WARNING] System.TypeLoadException: File or assembly name 'Missing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null', or one of its dependencies, was not found.
    ... and so on. And physically all of this dll files are there.

     I use this tools:

    * Microsoft Visual Stuido 2008 C#
    * Windows Mobile 6.5.3 Professional DTK
    * Resco UI.elements
    * Windows Mobile Device Center
    * Internal DLL file: SQLite.Interop.084.dll

    I will also pleased for some ideas. Thx for response. ;)

    Two  possibilities that can be tiresome, but effective

    1) Step through your program using the debugger

    2) Scatter  message boxes (Win32 MessageBox function) through your code. You can use the
    FILE and LINE macros to tell you what line popped up each box. Start with a few boxes
    scattered in code that runs from the start of your program to where you think it crashes.
    Each time your program crashes, add a few more message boxes between the last one you saw
    and the first one you didn't see. With a little luck, you'll fairly soon narrow down the
    parts of your source code where the crash occurs. And then you can put a break point just
    past one of the message boxes and step through your code.

    3) If you're not so lucky, the symptom will be a crash in one line of code, but the bug is
    actually in another part of your program. In particular, uninitialized pointers cause such
    symptoms. You'll get some clue by checking the value of any pointers, strings, etc. used
    anywhere near the line where the crash occurs. You can then add ASSERTs to any code that
    might set these pointers, etc. You could put breaks to check for any changes in these
    values, but I found that these kinds of breaks r-e-a-l-l-y s-l-o-w execution.

    My hunch is you'll find the problem is a bug in your code that just happens to not show
    symptoms on real devices.

    -----------------------------------------
    To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).

    Robert E. Zaret
    PenFact, Inc.
    20 Park Plaza, Suite 400
    Boston, MA 02116
    www.penfact.com
    r_z_aret@pen_fact.com
    Useful reading (be sure to read its disclaimer first):
       http://catb.org/~esr/faqs/smart-questions.html

    • Marked as answer by Jesse Jiang Friday, March 22, 2013 8:24 AM
    Friday, March 8, 2013 6:21 PM