Figured out the problem. It is a rare one as it only deals with multi page apps that gain control in ways other than the apps menu.
If you've ever looked at ram page $83, or the extra if you only have 1, you might have seen that it starts out with all the bytes numbered chronologically. At first glance, this seems stupid, but what it actually is, is the app base page table. Each byte corresponds to a flash page and the value of it is the base page of the app.
There's normally no problem because I believe Ti-OS fixes this when an app is run. But when it gets called in a strange way, i.e. hooks calling Catalog Help or a program returning to DCS7, it doesn't get fixed. So if the table is destroyed, any inter-app bcall is going to crash. Which only happen on the rare multi-page apps.
It's a very simple fix, just add bcall(_fillBasePageTable) whenever control returns from somewhere besides the app.
If you've ever looked at ram page $83, or the extra if you only have 1, you might have seen that it starts out with all the bytes numbered chronologically. At first glance, this seems stupid, but what it actually is, is the app base page table. Each byte corresponds to a flash page and the value of it is the base page of the app.
There's normally no problem because I believe Ti-OS fixes this when an app is run. But when it gets called in a strange way, i.e. hooks calling Catalog Help or a program returning to DCS7, it doesn't get fixed. So if the table is destroyed, any inter-app bcall is going to crash. Which only happen on the rare multi-page apps.
It's a very simple fix, just add bcall(_fillBasePageTable) whenever control returns from somewhere besides the app.