Hangup on 256 Gosubs in 18X

Peterlen

New Member
On my desktop computer I am running Program Editor Version 5.2. It completely hangs when I configure 256 gosubs for an 18X.

I also have a laptop which is happy to configure 256 gosubs.

Both are running XP Pro and the same Program Editor software.
 

hippy

Technical Support
Staff member
Seems strange and I've never seen that before. At what point does it 'hang' when you click on the 256 Gosub option, when you Syntax Check, try to download or elsewhere ?

There may have been some issue in installation. Perhaps uninstalling, deleting everything in the install directory ( C:\Program Files\Programming Editor by default ), and re-installing may fix the problem.
 

Peterlen

New Member
It hangs right after I first startup the progamming editor. It shows the Options panel. I select 18X and change the 16 gosubs it shows to 256 gosubs. When I click Apply it hangs.

It really hangs properly. I can still cancel the program using the cancel button but when I restart the program it is immediately hung. The opening splash screen is displayed with (not responding) in the title bar. I have to reboot to get it to start again.

I removed the program using Windows control panel and made sure the Programming Editor folder was deleted, then reinstalled the editor. No change.

Both operating systems show Microsoft Windows XP Professional, Version 5.1.2600 Service Pack 2 Build 2600 in the System Information panel.
 

Technical

Technical Support
Staff member
We've never heard of it before either! The 16/256 gosub is just an internal flag change so unlikely to cause a hang by itself. Upon 'Apply' the software does attempt to write the new settings into the Registry, but that should be allowed unless you have some strange security setup.

What happens if you cancel the options dialog without changing?
 

Peterlen

New Member
Thank you for your posts, my apologies for a delayed response. You have driven me to do a full analysis of the problem which I should have done in the first place if I hadn't been convinced it was a problem with 256 Gosubs.

I now have a fuller understanding of the problem and I have a work-around, but not a fix. Just in case you are interested I will tell what I have found.

Firstly, when does it occur? Three actions can bring it on

1. Changing anything on the Options panel and pushing Apply.
2. Pushing OK with or without changing anything
3. When Cancel is pushed, it does not happen. But, if I subsequently close the
Program Editor and reopen it, it is immediately hung.

Once hung, I can close it by clicking the top, right-hand cancel button on the Options Panel or the main Program Editor screen. However, Windows cannot close it and produces an End Program - Programming Editor window with the options of End Now or Cancel. End Now closes the Program Editor. If it is subsequently reloaded, it is hung immediately. Only rebooting solves the problem.

The work-around I discovered accidentally, as usual.

When it is hung, without closing the Program Editor, I restart the computer. It closes down my MP3 player (which was loaded first) then displays a window End Program - Progedit.exe which has a growing bar and the words Ending program. Please wait. There is an End Now button.

If I close this window, not using the End Now button, Program Editor usually puts up a window saying Run time error '5' and closes. When I reload Program Editor I can change anything on the Options Panel and push any button I like. It never hangs. And, of course, I can compile a program with over 16 Gosubs.

However, after rebooting the computer the change problem is back, but at least it has loaded the options I entered while I could.

The problem is unlikely to be in your software but if you have any pointers on where to look I would appreciate them.

I have done nothing to the standard security nor loaded any but my standard software. The main software I use is the Program Editor, an AV package called Avira, a PCB design tool called Target, an old MP3 player called Xing and some solitaire type card games. I reloaded the OS and all my software in January this year. I don't download odd software, I have settled on my operating environment and stick with it.

Thanks very much for your help.
 

Harry2

New Member
According to the programming manual, the limit for the 18X is 255 not 256. That could just be a typing error though.

A supplementary question -- why does selecting 18X as the picaxe option not automatically select 255 or 256 ?
 

hippy

Technical Support
Staff member
Welcome to the PICAXE forum.

SETINT ( whether used or not ) reserves a GOSUB for itself which knocks one off the total. That GOSUB is 'invisibly inserted' between commands whenever an interrupt occurs.

The choice of 16 or 256 could be considered arbitrary - there are pro's and con's to each - if it defaulted to 256, people would ask why it doesn't default to 16. There is a slight balance in favour of 16, and I'd expect resistance to changing something which has been 'standard' during the Programming Editor's history.
 
Top