Hello Guest, Welcome to Apnea Board !
As a guest, you are limited to certain areas of the board and there are some features you can't use.
To post a message, you must create a free account using a valid email address.

or Create an Account


New Posts   Today's Posts

Charts disabled
#11
RE: Charts disabled
I've seen this happen twice before. In each case, the OSCAR_Data file was placed somewhere that Windows did not like and Windows security settings caused this response. In one case, the user had tried to place OSCAR in the Program Files\OSCAR directory. In another case, the user had marked the Documents directory as read-only.

Could you open the debug pane (Help/Troubleshooting/Debug Pane), copy the debug messages, and post them as an attached file?
Useful links
Download OSCAR
Best way to organize charts
How to attach charts to your post

Apnea Board Monitors are members who help oversee the smooth functioning of the Board. They are also members of the Advisory Committee which helps shape Apnea Board's rules & policies. Membership in the Advisory Members group does not imply medical expertise or qualification for advising Sleep Apnea patients concerning their treatment.
Post Reply Post Reply
#12
RE: Charts disabled
I'm going to get this for you tomorrow. Just busy today. I can also look at the code and help write some exception catching so that the user will at least get a message explaining to them that oscar doesn't have file permissions. I was a software developer in a past life. However I don't want to go though the build. I briefly looked at the gitlab build folder, got dizzy and closed it.
Community is people helping each other overcome some adversity. Sometimes it's a hurricane, other times it's a monopolist industry that benefits from keeping people in the dark about their own medical data or scaring them into thinking they aren't capable of managing their own treatment. Thankfully people will always develop community no mater what the adversity is. 
Post Reply Post Reply
#13
RE: Charts disabled
I *might* already have addressed this in a recent change I made (after 1.1.1). The next version of OSCAR will now yell if it's unable to create the OSCAR_Data folder.
Post Reply Post Reply
#14
RE: Charts disabled
I just tested that and it informed me that it could not create the OSCAR_Data folder in Program Files/OSCAR. I wonder if a little more explanatory text would be helpful.

While "could not create" is accurate, it doesn't give any clue as to what the problem might be. Not sure how to solve that in an OS-independent way.
Useful links
Download OSCAR
Best way to organize charts
How to attach charts to your post

Apnea Board Monitors are members who help oversee the smooth functioning of the Board. They are also members of the Advisory Committee which helps shape Apnea Board's rules & policies. Membership in the Advisory Members group does not imply medical expertise or qualification for advising Sleep Apnea patients concerning their treatment.
Post Reply Post Reply
#15
RE: Charts disabled
20245: Debug: Summary open for writing failed
20246: Warning: QIODevice::write (QFile, "E:\\Profiles\me\PRS1_J26211088696E\Events\00000041.001"): device not open
20246: Warning: QIODevice::write (QFile, "E:\\Profiles\me\PRS1_J26211088696E\Events\00000041.001"): device not open
20472: Debug: Finished Importing data 1
20474: Debug: Saving "Philips Respironics" session info "PRS1"
20474: Debug: Couldn't open "E://Profiles/me/PRS1_J26211088696E/Sessions.info" for writing
20474: Debug: Saving "Philips Respironics" "DreamStation Auto CPAP" Summaries
20477: Warning: QIODevice::write (QFile, "E:\\Profiles\me\PRS1_J26211088696E\Summaries.xml.gz"): device not open
20500: Debug: Overview range combo from QDate("2020-04-26") to QDate("2020-07-25") with 90 days
20501: Debug: No Event/Waveform data available for 65


Looks like the exception error is caught already, just need to put in a pop-up telling the user that it need to allow oscar write access.
Community is people helping each other overcome some adversity. Sometimes it's a hurricane, other times it's a monopolist industry that benefits from keeping people in the dark about their own medical data or scaring them into thinking they aren't capable of managing their own treatment. Thankfully people will always develop community no mater what the adversity is. 
Post Reply Post Reply
#16
RE: Charts disabled
bool Machine:ConfusedaveSessionInfo()
{
   if (info.type == MT_JOURNAL) return false;
   if (sessionlist.size() == 0) return false;

   qDebug() << "Saving" << info.brand << "session info" << info.loadername;
   QString filename = getDataPath() + "Sessions.info";
   QFile file(filename);
   if (!file.open(QFile::WriteOnly)) {
       qDebug() << "Couldn't open" << filename << "for writing";
       return false;
   }

I'm scrolling thru the code. There is allot of it when it;s the first time.
There is a bunch of places where it tries to open a file and then checks to see if it's open. if it's not it output to debug. but says nothing to the user. and just continues.
But then i found places where it just trys to open the file and doesn't even check.

bool Session::StoreEvents()
{
   QString path = s_machine->getEventsPath();
   QDir dir;
   dir.mkpath(path);
   QString filename = path+QString().sprintf("%08lx.001", s_session);

   QFile file(filename);
   file.open(QIODevice::WriteOnly);

   QByteArray headerbytes;



 
I think the traditional way is to do a try / catch like this
try {
   file.open (QFile::WriteOnly);
 
   while (something);
   Do some stuff.
 }
 catch (const ifstream::failure& e) {
    qDebug() << "Couldn't open" << filename << "for writing";
 }
file.close();

Probably best and wouldn't take much work to go thru the code search for all these open files, reads and write and block them in a try catch. send a message to the user and then send the actual os expecption to the debug. I mean all we see here that oscar couldn't open the file, we don't see why. If we had it in a try catch we could see why.
Community is people helping each other overcome some adversity. Sometimes it's a hurricane, other times it's a monopolist industry that benefits from keeping people in the dark about their own medical data or scaring them into thinking they aren't capable of managing their own treatment. Thankfully people will always develop community no mater what the adversity is. 
Post Reply Post Reply
#17
RE: Charts disabled
rebirth the issue here is your trying to write the OSCAR_DATA to the SD card rather than your PC this causes OSCAR to get completely confused


Pick a location on your PC for the data the default location is

C:\Users\Username\My Documents\OSCAR_Data

make sure the OSCAR_Data directory exists then launch OSCAR with the --datadir switch as below to change its data directory

c:\>cd \Program Files\OSCAR
c:\Program Files\OSCAR>OSCAR --datadir "C:\Users\Username\My Documents\OSCAR_Data"
Post Reply Post Reply
#18
RE: Charts disabled
Jas, 
My SD card isn't even in the computer at this time. 
My E:\ is not my SD card. It's my reg harddrive. my C:\ is soildstat and only for the OS. nothing else will fit. 
Beside, my comments about the code hold true no matter where OSCAR is trying to write. It's traditional to do file IO in a try/catch so that for WHATEVER reason there may be an IO issue, the OS will throw and exception, OSCAR will catch it and output the error to the log file.
Community is people helping each other overcome some adversity. Sometimes it's a hurricane, other times it's a monopolist industry that benefits from keeping people in the dark about their own medical data or scaring them into thinking they aren't capable of managing their own treatment. Thankfully people will always develop community no mater what the adversity is. 
Post Reply Post Reply
#19
RE: Charts disabled
rebirth: I appreciate your suggestions and have put this on our list of things to do [Mantis #258]. I'm in the middle of some other issues right now, but I think this should be fairly high priority after I get done with the current tasks.
Useful links
Download OSCAR
Best way to organize charts
How to attach charts to your post

Apnea Board Monitors are members who help oversee the smooth functioning of the Board. They are also members of the Advisory Committee which helps shape Apnea Board's rules & policies. Membership in the Advisory Members group does not imply medical expertise or qualification for advising Sleep Apnea patients concerning their treatment.
Post Reply Post Reply
#20
RE: Charts disabled
I get it, i'm over my head busy too. But if you want help, I can help out as much as I have time here and there.
Community is people helping each other overcome some adversity. Sometimes it's a hurricane, other times it's a monopolist industry that benefits from keeping people in the dark about their own medical data or scaring them into thinking they aren't capable of managing their own treatment. Thankfully people will always develop community no mater what the adversity is. 
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Organizing OSCAR charts TinySteve 4 432 09-03-2024, 04:07 PM
Last Post: TinySteve
  Mask Pressure Chart shows disabled bobm278 4 498 08-09-2024, 06:07 PM
Last Post: bobm278
  Can't View Daily Charts LuminousOne 19 1,306 07-15-2024, 02:21 PM
Last Post: LuminousOne
Question Oscar words and charts overlaying each other antied77 1 350 06-22-2024, 07:36 PM
Last Post: Crimson Nape
  Oscar words and charts overlaying each other antied77 0 368 06-22-2024, 11:39 AM
Last Post: antied77
  Charts display time that two hours ahead of actual hypopneac 2 472 04-25-2024, 10:58 PM
Last Post: hypopneac
  Adding charts to Overview? bstabens 1 709 11-24-2023, 08:32 AM
Last Post: pholynyk


New Posts   Today's Posts


About Apnea Board

Apnea Board is an educational web site designed to empower Sleep Apnea patients.