Cross-platform SDK and HTML5 tools for mobile app development
X
 

[SOLVED THANKS]Program runs with debugconfiguration well, but closes just after 1 Second in releaseconfiguration

7 posts / 0 new
Last post
rolftrack
rolftrack's picture
Offline
Mobile Conjurer
Joined: 20 May 2012
Posts:
[SOLVED THANKS]Program runs with debugconfiguration well, but closes just after 1 Second in releaseconfiguration

Hi!

Mosync 3.0.2 Windows: This happends with MY SELF WRITTEN program:

1a. "Debug" configuration, "Debug" launch type:

==> Black MoRE.EXE Screen

==> Message: org. eclipse.core.runtime.coreException

        Error creating session Assertion failed: sExecutingCommand, file c:/slave/buildScripts/temp_g2eW/source/tools/debugger/debugger.cpp, line 432

2a. "Release configuraton, "Debug" launch type:

==> the same happends as Item 1a.

3a. "Debug" configuration, "Run" launch type:

==> This works fine :-))))))

4a."Release configuraton, "Release" launch type:

==> it will close automaticly after a half second!

==> I can detect a "myEvent.type == EVENT_TYPE_CLOSE", but i dont know where it comes from!

Mosync 3.0.2 Windows: This happends with an EXAMPLE PROGRAM like MOTRIS

 1b. "Debug" configuration, "Debug" launch type:

 ==> Mosync Panic 40054

2b. "Release configuraton, "Debug" launch type:

 ==> Message:The Build Config is not intendet for debugging   // I Think this is normal. 

3b. "Debug" configuration, "Run" launch type:

==> This works fine :-))))))

4b."Release configuraton, "Release" launch type:

==> This works fine to :-))))))

 

Any Ideas? Thanks and greetings.

Rolf

 

 

rolftrack
rolftrack's picture
Offline
Mobile Conjurer
Joined: 20 May 2012
Posts:
Hi Sam! Is memory corruption

Hi Sam!

Is memory corruption a hardware problem or made by myself with my program?

There is nothing different if I switch "dead code eleminatin on". But I found a Sting that I declared but dit not use in my program. It seems that ther are a lot of interisting options in mosync which are better switcht on . Is there a tutorial about these options?

Before I use my Input_Loop I delete all events, that happends during an animation. But I think this is O.K.

// here is an Animation.......

     MAEvent MyoldEvent;
    while (maGetEvent(&MyoldEvent)) {

    }

// now my normal Input_Loop follows

Thanks

Rolf

Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:
Yeah, I think you need to be

Yeah, I think you need to be careful here.  What you've probably got is some memory corruption.  When you change the code, you are changing the corruption to a non-vital part of the code.  There doesn't seem to be a functional difference in your code, which I think makes this more likely.  

Another option could be dead code elimination - have you got that switched on in release mode?

rolftrack
rolftrack's picture
Offline
Mobile Conjurer
Joined: 20 May 2012
Posts:
Hello! I think I have a

Hello!

I think I have a solution, but I dont know why?

This is a part of my "buggy"(only in release config) program !

MAEvent MyEvent;

int gewahlt = 0;

do {

 maWait(200); //nach 200ms weiter

 maGetEvent(&MyEvent) // THIS DIT NOT WORK with release config

 if (MyEvent.type == EVENT_TYPE_POINTER_PRESSED) {

 //

 draw();

 //

 } else if (MyEvent.type == EVENT_TYPE_CLOSE) {

 // This seems to be called severel times if the FIFO is emty

 maExit(0);

 }

 } while (gewahlt != 1);

 

This is my bugfree ( in release and debug config) new program!

 MAEvent MyEvent;

 int gewahlt = 0;

 do {

 maWait(200); //nach 200ms weiter

 if (maGetEvent(&MyEvent) > 0) { // THIS WORKS whith release config

 if (MyEvent.type == EVENT_TYPE_POINTER_PRESSED) {

 //

 draw();

 //

 } else if (MyEvent.type == EVENT_TYPE_CLOSE) {

 // This seems never be called if the FIFO is emty

 maExit(0);

 }

 }

 } while (gewahlt != 1);


Thanks


Rolf

 

Mattias Bybro
mattiasb's picture
Offline
Mobile Wizard
Joined: 20 Jan 2010
Posts:
Hi Rolf, I might have

Hi Rolf,

I might have misunderstood the problem here, so I list the 4 possible combinations of configuration/launch types and maybe you can confirm that I understood things correctly?

"Debug" configuration, "Debug" launch type: This should always work, but it did not? (Your item 3 above.)

"Debug" configuration, "Run" launch type: Should also work, is this item 1 above?

"Release configuraton, "Debug" launch type: Normally, trying this will issue a warning and continuing execution will end up in a crash. Is this item 2 above? (Note: you can setup the project in ways to suppress this warning, probably not the case with your project.)

"Release configuraton, "Release" launch type: Should work. Item 2?

Regards,

Mattias

rolftrack
rolftrack's picture
Offline
Mobile Conjurer
Joined: 20 May 2012
Posts:
Hi Abi Waquas,Hi Mattias

Hi Abi Waquas,Hi Mattias Bybro!

I have edited my Question for more information!

Thanks for your answers!

Greetings Rolf

Abi Waqas
abi's picture
Offline
Mobile Sorcerer
Joined: 3 May 2010
Posts:
Hi rofltrack, we need more

Hi rofltrack,

we need more information to reproduce this problem and look into it. What release/version of MoSync are you running on? Mac or Windows? what program you tested it for? is it every program or any specific program and what memory settings you have for the program you tried it for?

Any help is appreciated.

Cheers

Login or register to post comments