Real Studio [2001 R4.3] app crashing on Windows 8

We wrote an application originally designed to run in a Linux environment. For years this app has worked without crashing. We recently changed our target to Windows 8 development. Compiled the App as an exe, booted it up on the device, and had mixed results.

Often it will freeze or crash randomly, for seemingly no reason. Most of the interface seems to work up until the program randomly dies out.

Should we update our Real Studio or would that not be a possible cause for this issue?

I’d also check to make sure you are not calling or declaring something that is Linux specific and that is what is causing the Windows version to choke.

I had that happen to me, when I ported an OSX project to windows… I forgot to wrap a few things in “#If TargetOSX”

and I think you meant RS2011r4.3 not RS2001r4.3

Try to avoid tight loops. Windows 7 and 8 hate that and will declare the app to be crashed. Always try to release some resources back to the OS so the OS knows that the program is still responsive.

You do not need to update to test your app in the IDE.

Please explain and give an example of keeping the OS responsive. Thanks

some ideas:

Put some code into a thread if possible.

use a timer to do the work in ‘small chunks’ (e.g. if you have 6 million things to do, use a timer that fires now and then, and does 1000 things, records how far it got, then ends until triggered again.

(frowned upon but sometimes…) Add an app.doevents inside the loop.
Now if you have a loop of 1 million things, you don’t want to call app.doevents 1 million times.
if its a for x = , for y = sort of thing, you only put the app.doevents in the outer loop
And you can make sure it only gets called now and then using MOD

eg for x = 1 to 1000000 //stuff if x mod 2000 = 0 then app.doevents next

Consider creating a small helper app to do the work. e.g. write some data to disc, launch a console app to process it and write the result to disc then die. Pick up the results when they are available using the main app.

I think Im having a similar problem. I have a windows 10 PC and I just installed Xojo 2015 r3.1 and tried to run an older file from real studio in it and after I press run it compiles the windows and then freezes. I only have a few buttons on the application, nothing fancy. Any idea what’s wrong?

a) Post your code
b) Try with a brand new project
c) Try with another computer

For the record:

REALbasic version 1 to 5.5.5
REALbasic 2005
… Real Studio 2010 to 2012
… Xojo 2013 to

If Xojo compiles fine it means the code is alright. The freeze signals some runtime execution problem. Applications freezing can happen with input-output. Here, I had an app that freezed when I tried to access a network printer that was inaccessible. If your app does any synchronous shell operations or HTTPSocket it can also freeze the UI.

Finally, any tight loop like while/wend or do/Until without timeout can be the culprit. I never use them without something like :

dim startvalue as double = ticks While not this and ticks < startvalue + 10 //do whatever Wend

That way if this never turns true the loop will exit after 1/6th of a second.

I would tend to look at every declare in there that could explain the issue at run time.

Another possible explanation could be a corrupted binary project. That happens and can have strange effects. If you still have RS or if you have a current Xojo license, try loading the project and saving it as XML, then load the XML and see if the issue is still present.