Fermium / datalogger

The Datalogger physicists deserve
0 stars 0 forks source link

if usb subprocess crashes, the interface does not reset correctly #98

Closed ddavidebor closed 6 years ago

ddavidebor commented 7 years ago

The interface does not reset correctly if subprocess crashes, the loader mouse pointer spins indefinetly and the UI is greyed out

screen shot 2017-09-01 at 23 43 49

  usb.on('message',(data)=>{
    switch(data.action){
      case 'error':
        mainWindow.webContents.send('usb-error', {});

        break;
       //other cases [..]
    }
  });

usb.on('exit',(code,n)=>{
  mainWindow.webContents.send('usb-error', {});
  console.log('usb exited with exit code', code);
});

 usb.on('disconnect',(code,n)=>{
  mainWindow.webContents.send('usb-error', {});
  console.log('usb disconnected with exit code', code);
});

Those are the three codes that generate an error. Please note they could be launched in rapid succession.

tested against bortoworks

ddavidebor commented 7 years ago

Maybe i'm stupid and i broke this just on bortoworks ?

ddavidebor commented 7 years ago

nah i think it's broken in develop also