Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Dec 14, 2018 3:49 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Riddle me this.......
PostPosted: Mon Feb 18, 2013 4:11 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
I have an application the I wrote.
It runs perfectly both in the IDE and compiled.
If compiled and I copy to any other machine... it runs perfectly
If I place it in a DMG and move that DMG to another computer, and install from there.. .it runs perfectly

BUT......

If I move said DMG to my webserver.... Download that DMG (to any of the computers used above). Install from the DOWNLOADED Dmg.... it FAILS the first time it is run..... (was with an Unhandled Nil Exception... now silently).... But runs perfectly after.


So that makes two questions
a) What is different about COPYING a DMG, or DOWNLOADING it
b) Why would it fail ONLY once?


In the meantime I am putting logging points in the code to see if I can determine WHERE it is at when it fails that one and only time


And yes... it is consistent.... if I delete the app, and download it again... it fails again. but just one time for each time downloaded.

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Mon Feb 18, 2013 4:21 pm 
Offline

Joined: Mon May 31, 2010 5:35 am
Posts: 2412
Location: Netherlands
does your web server serve the right mime type?
application/x-apple-diskimage

you server should have this setup, or the browser may think it's some sort of strange file.

_________________
SWORT™
- Windows Vista, Windows XP, Windows 7, Linux Mint 11 and Mac OSX Lion
- REAL Studio Enterprise(latest) and WEB Edition(latest)
- Plugins (MBS Complete, ToringoLib, Einhugur, VanHoek + Some open source plugins)
For Dutch User Groups ask me to enter!


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Mon Feb 18, 2013 4:27 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
The DMG opens just fine..... you can drag the APP to Applications folder just fine....

First time you double click the APPLICATION (not the DMG) it fails
Second time (and everyting afterwards) it works perfectly

So if it were MIME type I would not get a valid DMG to start with

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Mon Feb 18, 2013 5:22 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
What the heck?

When my app runs FIRST TIME (from downloaded DMG) the ORDER of events is DIFFERENT that any other time it is run

0.000 : Start logging ......
0.002 : BEGIN APP OPEN
0.229 : END APP OPEN
0.636 : BEGIN WINMAIN OPEN
0.636 : BEGIN IMAGE NEW
0.637 : >>>> this is where it bombs


EVERY OTHER TIME IT IS RUN... regardless of DMG Download, copy whatever.

Here ACTIVATE RUNS BEFORE OPEN, where above OPEN runs first (which makes more sense)

0.000 : Start logging ......
0.002 : BEGIN APP OPEN
0.361 : END APP OPEN
0.432 : BEGIN WINMAIN ACTIVATE
0.716 : END WINMAIN ACTIVATE
0.978 : BEGIN WINMAIN OPEN
0.979 : BEGIN IMAGE NEW
0.992 : END IMAGE NEW
1.131 : END WINMAIN OPEN


according to the LR

Quote:
When the window first opens, the Open event fires prior to the Activate event. Subsequent activations fire the Activate event but not the Open event.


But that is NOT what is happeining as you can see above...

And NO... I don't have anything refring to the window before then....

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Mon Feb 18, 2013 6:04 pm 
Offline

Joined: Sat Aug 22, 2009 9:44 am
Posts: 315
I'm only guessing, but it might have to do with the "this application was downloaded from the internet, would you like to open it" (or whatever it is) warning? That would only fire once, and might goof with your code order somehow since I don't know how Apple inserts itself in there. Looking at the times it doesn't look like it's popping it up between your Start logging and the crash, but maybe something is going on there. That's the only thing I can think of that would change with downloading it from your server.


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Mon Feb 18, 2013 6:13 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
Good point.. .didn't think about that...

I think I have a work-around...

In App Open I set a flag to 0
In Win Open I 'OR' it with 1
In Win Activate I 'OR' it with 2
the instant it becomes 3 (after going though BOTH OPEN/ACTIVATE in any order)... I THEN initialize things, and set that flag to 99 so it won't do it again.

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Mon Feb 18, 2013 7:30 pm 
Offline

Joined: Sat Aug 22, 2009 9:44 am
Posts: 315
Boy, comment the heck out of that change because can you imagine revisiting it in a year or two? LOL


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Mon Feb 18, 2013 7:36 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
LOL... I did....

But it worked.... no more silent crashes on first run after a download....

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Mon Feb 18, 2013 8:30 pm 
Offline

Joined: Mon Aug 14, 2006 9:33 pm
Posts: 1774
Dave. Please file a feedback case over this. I can imagine that REAL is not aware that the Apple Gatekeeper may be messing with their event order.

_________________
Roger Clary
Class One Software
Educational Software for Lifelong Learning
http://www.classonesoftware.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Mon Feb 18, 2013 8:52 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
Nobody said anything about Gatekeeper.....

This is not Gatekeeper.... not even Mt.Lion

Image

maybe GK would do the same thing maybe not. And it might have to to with what is being done in Open/Activate... perhaps I hit a unique combination.... who knows...

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Mon Feb 18, 2013 9:43 pm 
Offline

Joined: Mon Aug 14, 2006 9:33 pm
Posts: 1774
OIC - So you don't consider it a bug then?

_________________
Roger Clary
Class One Software
Educational Software for Lifelong Learning
http://www.classonesoftware.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Mon Feb 18, 2013 10:04 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
no comment

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Tue Feb 19, 2013 2:13 am 
Offline

Joined: Mon May 30, 2011 12:56 am
Posts: 702
Quote:
I THEN initialize things, and set that flag to 99 so it won't do it again.


ANother way to handle this is to spot the places that use those items that were bombing.
eg an Image that must not be nil

and check for nil before it is used, with a function that initialises it if it is missing.

So:

instead of
p.graphics.forecolor =      //crunch

you have

if p = nil then p = GetMyPicture()
p.graphics.forecolor =


and GetMyPicture becomes 'the way to initialise the image, wherever you first refer to it'


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Tue Feb 19, 2013 8:25 am 
Offline
User avatar

Joined: Sat Nov 11, 2006 2:43 pm
Posts: 1221
Location: This poster has left the forums
Is any of this using threads?

_________________
%Invalidforumsignatureexception% user signature not found


Top
 Profile  
Reply with quote  
 Post subject: Re: Riddle me this.......
PostPosted: Tue Feb 19, 2013 9:04 am 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
pony wrote:
Is any of this using threads?

no

Quote:
ANother way to handle this is to spot the places that use those items that were bombing.
eg an Image that must not be nil

Tried that..... and then nothing ever go initialized.... I need a stable "Ok the window is open, I'm ready to rock and roll event"

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group