Application crashes in some contexts

I say in advance that this is a weird issue, I hope then to be clear and exhaustive. I’m working on Win + CodeWarrior. I developed an quite simple application to work as demo for a mobile application. The problem I’m having is to make it run properly on other computers. To be honest, also on my computer, it doesn’t always work.

The application basically loads and map many external images in .bmp format 4 greys and trace with cout the progress. When it crashes, it does it during the loading of the images.

Basically:

  • when run from CodeWarrior it always works
  • when launched by double clicking the .exe in the project folder, it crashes.
  • when launched by command line in the project folder, it works
  • when launched by double clicking in different local folder, it works on my computers, not on a friend one
  • when launched by double clicking in a usb key, it works on one of my computers, not the other one

Unfortunately I don’t feel to show the application in public, but I could eventually send it privately.
A part that, I was wondering if you have an idea on which could be the issue or at least how to debug it.

I’m definitely interested on knowing the portability issues of OF applications.

Please let me know if I haven’t been clear on something.

Thanks, chr

hi -

can you please post the code which is crashing?

There are several reasons why code might work in some cases and not in others, but at first glance, I don’t think this is a problem with OF - (I’ve found for the most part that the apps are super portable) - but perhaps with something else. My first guess is an un-initialized variable (ie, you define a variable but it’s not initialized, so that the value is always different when you run the app), but there are plenty of things it could be.

I would need to see the code and where it crashes to answer further… so please post it if you can, or send a pm…

thanks
zach

Considering I’m a newbie its definitely easier it is because my bad code than OF :slight_smile:

Check your inbox.

Thanks, chr

** just an update that we have been debugging this by pm, and I think the problem is an unallocated variable in ofImage, and it’s a change we will add to the svn later today:

  
  
freeImageBitmap(){  
bmp 	= NULL;  
}  
  

should be :

  
  
freeImageBitmap(){  
bmp 	= NULL;  
pixels 	= NULL;  
}  
  

we’ll add it to the codebase / SVN so that it makes into the next release. It something we never saw - we were stress testing ofImage alot, but in a very conventional way it seems now. thanks for putting the pressure on OF!

zach