Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Hi

I've just started porting an application from Brew 3.1.5 to Brew MP but have run into problems.

I went through the steps of converting mif and brx files into cif and car. I changed my build procedure to use the correct include directories. The application still depends on deprecated APIs. I intend to change that but since Brew MP is backwards compatible I want to test my application first.

However when I start the simulator and point out the mif directory I get duplicate entries of my application in the Application Manager and when I try to run I get an error box with this header:

"Cannot Run Applicat..."

and in the box:

"An error occurred when starting the application."

The logger says:

2010/07/30 14:44:38 68 (0x1) IMODULE_CI of 0x1009FF6 failed *DLLModLoade 126 3
2010/07/30 14:44:38 69 No file to play *soundeffect 554 3

I have since then tried to use the loader to install the application which go rid of the duplicate entry in the appmgr, but the error remains.

Since Brew MP should be binary backwards compatible I tried to load the mif and dll I built and ran on the 3.1.5 simulator some months ago (that is without any changes). But I get the same error.

I'm stumped, what have I missed or done wrong?

Hello,
The duplicated app entries in the App Mgr would indicate multiple mifs. Can you confirm that you indeed only have a single mif in the simulation fs? Simplest way to do this as you're not running a new build in the IDE and shipping to the Simulator, is to copy the app binaries (dll, mif, etc) to the sim target folder as applicable, all of the binaries it would go to somewhere like this:
c:\Brew MP\Targets\Candybar (1.0.2.410)\fs\usermods\
Double check that you don't have your app also in the fs:\sys location as well as this can cause the dup entry and confuse the simulator as to what apps are truly installed.
Let me know if this helps out. Once your in the phase of API swapping, testing your app in the simulator should be much more intuitive.
Regards,
Brian

Hello,
The duplicated app entries in the App Mgr would indicate multiple mifs. Can you confirm that you indeed only have a single mif in the simulation fs? Simplest way to do this as you're not running a new build in the IDE and shipping to the Simulator, is to copy the app binaries (dll, mif, etc) to the sim target folder as applicable, all of the binaries it would go to somewhere like this:
c:\Brew MP\Targets\Candybar (1.0.2.410)\fs\usermods\
Double check that you don't have your app also in the fs:\sys location as well as this can cause the dup entry and confuse the simulator as to what apps are truly installed.
Let me know if this helps out. Once your in the phase of API swapping, testing your app in the simulator should be much more intuitive.
Regards,
Brian

Brian P. wrote:The duplicated app entries in the App Mgr would indicate multiple mifs.
This is now solved. After removing my target and recreating it, I have no problems with duplicate entries. I suppose I had managed to install in both BDSMods and UserMods.
Brian P. wrote:Let me know if this helps out. Once your in the phase of API swapping, testing your app in the simulator should be much more intuitive.
I managed to figure it out. The problem was that I have two apps, one which exports an extension that the other application uses. However I only installed the one which uses the extension. But given the somewhat uninformative error message and the fact that I couldn't even trigger a breakpoint in "AEEMod_Load" I though the simulator wouldn't even try to load my DLL.
Installing both apps made it work!
Oh well, my bad. Thanks for helping.

Brian P. wrote:The duplicated app entries in the App Mgr would indicate multiple mifs.
This is now solved. After removing my target and recreating it, I have no problems with duplicate entries. I suppose I had managed to install in both BDSMods and UserMods.
Brian P. wrote:Let me know if this helps out. Once your in the phase of API swapping, testing your app in the simulator should be much more intuitive.
I managed to figure it out. The problem was that I have two apps, one which exports an extension that the other application uses. However I only installed the one which uses the extension. But given the somewhat uninformative error message and the fact that I couldn't even trigger a breakpoint in "AEEMod_Load" I though the simulator wouldn't even try to load my DLL.
Installing both apps made it work!
Oh well, my bad. Thanks for helping.

I have ported my application from Brew 3.1.5 (just had to change the include paths) and am getting the same error. message from Simulator 6.0.19.1325. My application is built using Visual Studio Express 2010 and does not hit a breakpoint set in AEEMod_Load. The only thing logged is:
 
BREW Logger Version 4.0.3.1163306 FileLogging Thread StartedTimeStamp    Message    FileName    Line #    Sev.    Qty    Drop Count    Total Messages2011/12/23 19:43:52 76    ISettings returned:     16ISettings returned:     16    LuaContext.cpp    4973    3    0    0    762011/12/23 19:44:07 77    (0x1) IMODULE_CI of 0x102C58C failed    DLLModLoader.c    126    3    0    0    772011/12/23 19:44:07 78     No file to play    soundeffectsactor.c    554    3    0    0    78
When I build it using the BREW 3.1.5 headers and AEEAppGen.c, AEEModGen.c, it runs (but then can't get any keyboard input for some reason) and when I run it in the BREW 3.1.5 Simulator or on a BREW 3.1.[45] handset it works perfectly.
 
My application has no dependencies.
 
I could not install the BREW MP Visual Studio plugin as it didn't recognize my Visual Studio installation.
 
What can I do to debug / fix this ?
 

I have ported my application from Brew 3.1.5 (just had to change the include paths) and am getting the same error. message from Simulator 6.0.19.1325. My application is built using Visual Studio Express 2010 and does not hit a breakpoint set in AEEMod_Load. The only thing logged is:
 
BREW Logger Version 4.0.3.1163306 FileLogging Thread StartedTimeStamp    Message    FileName    Line #    Sev.    Qty    Drop Count    Total Messages2011/12/23 19:43:52 76    ISettings returned:     16ISettings returned:     16    LuaContext.cpp    4973    3    0    0    762011/12/23 19:44:07 77    (0x1) IMODULE_CI of 0x102C58C failed    DLLModLoader.c    126    3    0    0    772011/12/23 19:44:07 78     No file to play    soundeffectsactor.c    554    3    0    0    78
When I build it using the BREW 3.1.5 headers and AEEAppGen.c, AEEModGen.c, it runs (but then can't get any keyboard input for some reason) and when I run it in the BREW 3.1.5 Simulator or on a BREW 3.1.[45] handset it works perfectly.
 
My application has no dependencies.
 
I could not install the BREW MP Visual Studio plugin as it didn't recognize my Visual Studio installation.
 
What can I do to debug / fix this ?
 

if 0x102C58C is the classid of your App, the Module Create Instance of your class is failing.
check if the DLL file is created & is placed in the proper location from where the App runs.

if 0x102C58C is the classid of your App, the Module Create Instance of your class is failing.
check if the DLL file is created & is placed in the proper location from where the App runs.

Hi,
yes that is the classid of my app and it has created the mif, dll and bar files in directory usermods/timecard (which is the name of the application). I put breakpoints in AEEStatic_ModNew and AEEMod_CreateInstance but they weren't hit either.
 
Thanks
 

Hi,
yes that is the classid of my app and it has created the mif, dll and bar files in directory usermods/timecard (which is the name of the application). I put breakpoints in AEEStatic_ModNew and AEEMod_CreateInstance but they weren't hit either.
 
Thanks
 

I think I figured out what is causingAEECls_CreateInstance to fail but why does setting a breakpoint in Visual Studio not work ? And how do I debug my application in that case ?
Now I'm getting a different error "Install Package is failed with error code 17" when I try to load the application - how do I fix this ?
 

I think I figured out what is causingAEECls_CreateInstance to fail but why does setting a breakpoint in Visual Studio not work ? And how do I debug my application in that case ?
Now I'm getting a different error "Install Package is failed with error code 17" when I try to load the application - how do I fix this ?
 

17 could be EINVALIDFORMAT or EEXIST.
try cleaning the build & re-installing the package.

17 could be EINVALIDFORMAT or EEXIST.
try cleaning the build & re-installing the package.

Thank you. Yes, it turned out that error was caused by using tar instead of BMPPackager to create the package file - there is some subtle difference - perhaps the Loader expects the files in a certain order.
So now my application starts and complains that there isn't enough space to write its files (it manages to create one but should create several). It doesn't give this error when I run it with the same mif and bar file but with the dll file compiled for BREW 3.1.4 and it creates all of its files.
 
This would probably be easier to debug if I could successfully set breakpoints in my program and then step through it in the debugger - that is my biggest problem. Any idea  why  breakpoints don't work ?
 Thanks for your help.
 

Thank you. Yes, it turned out that error was caused by using tar instead of BMPPackager to create the package file - there is some subtle difference - perhaps the Loader expects the files in a certain order.
So now my application starts and complains that there isn't enough space to write its files (it manages to create one but should create several). It doesn't give this error when I run it with the same mif and bar file but with the dll file compiled for BREW 3.1.4 and it creates all of its files.
 
This would probably be easier to debug if I could successfully set breakpoints in my program and then step through it in the debugger - that is my biggest problem. Any idea  why  breakpoints don't work ?
 Thanks for your help.
 

Okay, I found out that Visual Studio Express is deliberately crippled by Microsoft so the BREW MP plugin won't work -
https://developer.brewmp.com/forum/visual-studio-express-brew-mp
 
but does that mean there is no way to get breakpoints to work with Visual Studio Express and the BREW MP Simulator ? They work fine with Visual Studio Express and the BREW 3.1.5 simulator.
 
 

Okay, I found out that Visual Studio Express is deliberately crippled by Microsoft so the BREW MP plugin won't work -
https://developer.brewmp.com/forum/visual-studio-express-brew-mp
 
but does that mean there is no way to get breakpoints to work with Visual Studio Express and the BREW MP Simulator ? They work fine with Visual Studio Express and the BREW 3.1.5 simulator.
 
 

not sure if it will work but you may tto look at this.
http://www.ninjatrader.com/support/forum/showthread.php?t=15671

not sure if it will work but you may tto look at this.
http://www.ninjatrader.com/support/forum/showthread.php?t=15671

Thanks. I tried it but it made no difference. Visual Studio starts the simulator (which it did already) and it runs my app but doesn't hit the breakpoints, even though it's definitely executing those lines of code.
Looks like I might have to try porting my project to Eclipse :-(
 

Thanks. I tried it but it made no difference. Visual Studio starts the simulator (which it did already) and it runs my app but doesn't hit the breakpoints, even though it's definitely executing those lines of code.
Looks like I might have to try porting my project to Eclipse :-(