Re: Upgrading 32-bit Mac apps to 64-bit
Paul Young <[email protected]>
| Newsgroups | gmane.comp.lang.realbasic.user |
|---|---|
| Message-ID | <[email protected]> |
I used the Xojo sale to buy another Mac license for Xojo for this year. So, I am now debugging and compiling my test app in Xojo 2017 Release 1.1. I have found nothing that I recognize would cause an exception when I click the Red Close button on Window1. I added a Menu Handler for File \ Quit in the App area with Quit as the code. I can step through the code without seeing an exception until I click on the Red Close button on Window1. At that point, the app closes and frequently an exception is thrown. When compiled for 64-bits, using File \ Quit now quits the app 100% of the time (run of 20 launches) without throwing an exception but closing the app using the Red Close button of Window1 throws an exception about 50% of the time. Does this suggest anything new to anyone? Paul Young, CSoM > On May 23, 2017, at 5:32 PM, Claudius Sailer <[email protected]> wrote: > > good idea.... > > I had a FileQuit in the MenuHandler without code. I deleted it, now it works in Debug and in compiled version. > I thought I need this MenuHandler also without code ๐๐๐ > >> Am 21.05.2017 um 23:48 schrieb Jon Ogden <[email protected]>: >> >> Sounds like you don't have code to quit in your >> Menu handler. >> >> Sent from my iPhone >> >>> On May 21, 2017, at 3:54 PM, Claudius Sailer <[email protected]> wrote: >>> >>> all my 64Bit compiled Applications are running fine, but when I press Command-Q or select it in the Menu when I started them in debug mode no reaction. I have to kill it during Xojo. >>> >>> Sorry I didn't know this "new" possibilities System.debuglog ๐๐๐ thanks for this hint. >>> >>>> Am 21.05.2017 um 22:49 schrieb Jon Ogden <[email protected]>: >>>> >>>> MsgBox might not be the best thing as it interrupts the flow of events. What might be better are system.debuglog messages. >>>> >>>> Also, I have no problem quitting my 64 bit apps from the debugger. >>>> >>>> Sent from my iPhone >>>> >>>>> On May 21, 2017, at 3:47 PM, Claudius Sailer <[email protected]> wrote: >>>>> >>>>> Hello, >>>>> >>>>> I know it is painful, but when you can't find it, add MsgBox commands to your code. Than you can see until everything is fine and when it crashes. >>>>> >>>>> MsgBox "Step 1" >>>>> >>>>> MsgBox "Step 2" >>>>> >>>>> and so on. So you can possibly find the problem easier. >>>>> >>>>> I know that it is actually a problem that debug mode in 64Bit can't finished correctly. >>>>> >>>>> Claudius >>>>> >>>>>> Am 21.05.2017 um 22:31 schrieb Paul Young <[email protected]>: >>>>>> >>>>>> Jon, >>>>>> >>>>>> Would an instance of a method cause this? If so, how would one close/cancel/etc. the instance? >>>>>> >>>>>> Paul >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> On May 21, 2017, at 3:07 PM, Jon Ogden <[email protected]> wrote: >>>>>>> >>>>>>> Paul, >>>>>>> >>>>>>> You can always look in the docs. But there is something in an object of code that is in your window or app that is not closing before the app tries to close. Make sure you have no circular references and make sure that all of your things like AddHandler references are undone. Some reference to something is being left open. >>>>>>> >>>>>>> Jon >>>>>>> >>>>>>> Sent from my iPhone >>>>>>> >>>>>>>> On May 21, 2017, at 1:59 PM, Paul Young <[email protected]> wrote: >>>>>>>> >>>>>>>> Nothing significant to report after: >>>>>>>> >>>>>>>> a. making sure all integers are Int64 >>>>>>>> >>>>>>>> b. making sure all other Windows are closed before running the Window1.Close code >>>>>>>> >>>>>>>> c. stopping the one timer that is running in Window1 (Timer1.Mode = 0) >>>>>>>> >>>>>>>> d. stepping through the code (no problems until Window1 is closed and then, occasionally, an exception is thrown) >>>>>>>> >>>>>>>> Is there an article available that summarizes changes to make to 32-bit code before compiling to 64-bit code? >>>>>>>> >>>>>>>> Thanks in advance. >>>>>>>> >>>>>>>> Paul Young, CSoM >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>> On May 20, 2017, at 1:09 PM, Jon Ogden <[email protected]> wrote: >>>>>>>>> >>>>>>>>> Thinking about this further, this is my educated guess. >>>>>>>>> >>>>>>>>> The 32 bit framework shut things down in a certain order and you relied on that in your code to close out all your objects. The 64 bit framework is handling all that differently so the order you relied on before is now different. So some object is calling on or relying on some other object that is already closed. When that happens things crash. >>>>>>>>> >>>>>>>>> You'll just have to step through things to figure it out. Don't rely on the framework doing things in a specific order. >>>>>>>>> >>>>>>>>> Sent from my iPhone >>>>>>>>> >>>>>>>>>> On May 20, 2017, at 12:01 PM, Jon Ogden <[email protected]> wrote: >>>>>>>>>> >>>>>>>>>> You have something in your code that is not truly 64 bit compatible. Maybe you are using a 32 bit integer some place where you should be using 64 bit. >>>>>>>>>> >>>>>>>>>> There's not much that one can tell from that. But it looks to me like some object isn't closing correctly. >>>>>>>>>> >>>>>>>>>> You don't have to do much to make 64 bit work. But you do have to adjust some things. >>>>>>>>>> >>>>>>>>>> I would try stepping through the code when closing your app to find the thing causing the problem. It has likely always been there but Xojo and the 32 bit framework was a little more forgiving. >>>>>>>>>> >>>>>>>>>> Sent from my iPhone >>>>>>>>>> >>>>>>>>>>> On May 20, 2017, at 11:00 AM, Paul Young <[email protected]> wrote: >>>>>>>>>>> >>>>>>>>>>> I am using a MacBook Pro running macOS Sierra Version 10.12.4 to upgrade my first six 32-bits Mac apps to 64-bits. >>>>>>>>>>> >>>>>>>>>>> Each of the six apps worked fine when compiled for 32-bits. >>>>>>>>>>> >>>>>>>>>>> Because my Mac Xojo license expired late last year, I used Xojo 2017 Release 1.1 to test the apps in the IDE for 64-bits and then compiled them for 64-bits using Xojo 2016 Release 3. >>>>>>>>>>> >>>>>>>>>>> Launching each app twenty times, I recorded an exception upon close 20% to 50% of the time. >>>>>>>>>>> >>>>>>>>>>> The Console log shows: โService exited dur to signal: Segmentation fault: 11 sent by exc handler (0). >>>>>>>>>>> >>>>>>>>>>> Can someone tell me in simple English what this means? >>>>>>>>>>> >>>>>>>>>>> Thanks in advance. >>>>>>>>>>> >>>>>>>>>>> Paul Young, CSoM _______________________________________________ Xojo forum: https://forum.xojo.com/