mavicBreak / DroneZBreak

Change DJI drones flight controller parameters and flash firmwares natively on OSX
81 stars 24 forks source link

suddenly close after upgrading #1

Closed dronething closed 6 years ago

dronething commented 7 years ago

awesome app....there's a glitch after flashing.. while my mavic restart after flashing, app crashed and force to quit by itself. attached the error. dronezbreaklog.txt

mavicBreak commented 7 years ago

Hi! This is the old version and so far there is no known crash during the upgrade process with v0.2. Please report back if you hit the bug with the latest version.

dronething commented 7 years ago

it says The Application "DroneZBreak" can't be opened

mavicBreak commented 7 years ago

Please provide more information when you are describing a problem. Is it the latest version (v0.4)? Which OSX? Have you approved the app in System Preferences › Security & Privacy › (General) ? Have you read the "read me" file?

"It is an unsigned macOS application which is not allowed to run on OSX by default. If you have problem with starting the application go to System Preferences > Security & Privacy > and enable the execution of the app."

dronething commented 7 years ago

Hello, i'm using macosx 10.2.6 sierra latest update. I just download new version and just reinstall the program and replace the old one. Is it okay? Before i don't need to set security in general settings.

On Wed, Aug 23, 2017 at 11:01 PM mavicBreak notifications@github.com wrote:

Latest version (v0.4)? Which OSX? Have you approved the app in System Preferences › Security & Privacy › (General) ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mavicBreak/DroneZBreak/issues/1#issuecomment-324341910, or mute the thread https://github.com/notifications/unsubscribe-auth/AcUywwPWFIvs3j1tKTVmUAyJC1cwOau1ks5sbDC3gaJpZM4O45l0 .

-- -arik-

mavicBreak commented 7 years ago

Should be okay. You should change the security setting if you are prompted to do so, or the application start is restricted.

dronething commented 6 years ago

@mavicBreak okay first I can make new version worked after download by "show package contents" and pick the app and copy to my Applications folder. second, I still got this problem. I can't make command + d working though... here's my video but flashing succeed. perhaps you could make command + d function as button for end user on the gui ? here's my youtube video https://www.youtube.com/watch?v=7Iqj7LW3MLc

mavicBreak commented 6 years ago

Are you sure CMD+D is not working in v0.4? I have just tested it on two different Macbooks with Sierra and it works. Try to press CMD + D after DJI Assistant started or after you clicked "NO" on the message after startup.

dronething commented 6 years ago

yes it's not working there's no files written on desktop after using it.

mavicBreak commented 6 years ago

Very strange but understood. Version 0.5 is rolled out with a debug button :) please try with this one.

dronething commented 6 years ago

tested with latest 0.5 version. now debug button seems work. strangely I don't see unexpected close again with debug = on mode. flashing firmware fine, it seems working but progress bar is stop at 48 percent ... even when upgrade process finished. I tried close button but it won't respond. DZB_log.txt

dronething commented 6 years ago

okay second attempt flashing without debug. now it's working great. screen shot 2017-08-28 at 12 51 43 am great job.

mavicBreak commented 6 years ago

If it does not detect upgrade complete the button remains disabled this is normal. In this case the only option to close the window is to close the app itself or wait until 25 minutes passed and the buttons will be enabled with a message that progress can not be detected.

I already noticed that a new log session is started with drone reboot after the upgrade and DroneZBreak sometimes does not detect upgrade complete message. I will work on this in the next version. Would you be so kind when you do another upgrade/downgrade and the progress stucks please pull upgrade log with the button and attach it? You can even quit and restart DroneZBreak if you know that the upgrade is ready and pull the upgrade log by clicking the button in the Firmware Flashing Utility window. I need to check what is going on in that log when DZB misses the "ready" message.

dronething commented 6 years ago

I tried again just now but it seems I always have complete notifications now. upgrade00.log.txt perhaps I need to remove the app and install it at first time like I did before. I need to sleep and work first. I'll try it again later and when I got stuck again I'll send you another upgrade log. Thanks

mavicBreak commented 6 years ago

Thanks!

dronething commented 6 years ago

@mavicBreak after removing and reinstall, I don't have stuck progress again. instead the program quit unexpectedly and I try reopen and refrlash again and it's succeed 100 percent DZB_log.txt upgrade00.log.txt

oh well when I stuck I'll report it to you. but it's only happened at first time after reinstall

mavicBreak commented 6 years ago

I'm a bit confused. When did it quit unexcpectedly?

dronething commented 6 years ago

@mavicBreak it's only happened first time after fresh install.

dronething commented 6 years ago

@mavicBreak unexpectedly quit usually after mavic restart, I sent mac error report at first post and it's always this kind of reports

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

Perhaps it has something to do with terminal commands?

dronething commented 6 years ago

@mavicBreak okay I check console from utilities... here's the error

Process:               DroneZBreak [627]
Path:                  /Applications/DroneZBreak.app/Contents/MacOS/DroneZBreak
Identifier:            mavicBreak.DroneZBreak
Version:               0.5 (1)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           DroneZBreak [627]
User ID:               501

Date/Time:             2017-08-28 18:36:51.494 +0900
OS Version:            Mac OS X 10.12.6 (16G29)
Report Version:        12
Anonymous UUID:        5E57EA1D-9273-909C-C51C-6B2D599258F6

Time Awake Since Boot: 750 seconds

System Integrity Protection: disabled

Crashed Thread:        10  Dispatch queue: net.ftp.rebekka.cfstream.queue

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called
*** error for object 0x600000019910: Non-aligned pointer being freed (2)

and another reports I saw on console Mac

Process:               DroneZBreak [561]
Path:                  /Applications/DroneZBreak.app/Contents/MacOS/DroneZBreak
Identifier:            mavicBreak.DroneZBreak
Version:               0.5 (1)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           DroneZBreak [561]
User ID:               501

Date/Time:             2017-08-28 18:29:11.934 +0900
OS Version:            Mac OS X 10.12.6 (16G29)
Report Version:        12
Anonymous UUID:        5E57EA1D-9273-909C-C51C-6B2D599258F6

Time Awake Since Boot: 290 seconds

System Integrity Protection: disabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [0]

it seems like random ... both of them was in the same day when I try fresh install the app and reflash firmwares, but I see nothing suspicious on DZB log

mavicBreak commented 6 years ago

I can not replicate this unfortunately. I have just released v0.6 with several fixes and added some extra lines for logging. If you get this error again please upload DZB log I might see something in it...

dronething commented 6 years ago

Just tested it in my break time... still suddenly close crash.. hmmm I wonder perhaps because i was using my eGPU. I will try using internal GPU. DZB_log.txt here is Mac report error log. dronezbreaklog.txt I also record my activities. you can see here so you will know when the app suddenly close. http://www.youtube.com/watch?v=ZCZFKSnpN9I

dronething commented 6 years ago

okay just tested using internal gpu . same result after deleting app and reinstall fresh. v.06 perhaps it's my system I guess.... my SIP is disabled though. I'll try enabling sip later. gonna work first.

mavicBreak commented 6 years ago

Okay it's clear that the FTP stream is crashing when the drone disconnects. Which firmware are you flashing to Mavic exactly? Is it from a github repo? Is it a reflash on the same fw or you are flashing a different version? Can you pls try if the same crash happens or not when you are flashing the remote controller? Its faster.

mavicBreak commented 6 years ago

I released 0.7 with some possible crash fix. Please try with that one when you have time.

dronething commented 6 years ago

@mavicBreak I just downgrade and upgrade my controller from 700 to 550 and rollback again from 550 to 700 using your latest version 0.7 . yup I always use fw from GitHub repo. it seems no problem.. . install progress working fine, no crash so far. I'll take a bath first then I'll refresh my magic again after this. here is the log for controller DZB_log.txt upgrade00.log.txt

dronething commented 6 years ago

okay now I got stuck progress at 48% then crash when reflashing my mavic to 700. flashing succeed, only the app quit unexpectedly ... I'll try downgrade and upgrade again .. here's the log for refreshing and stuck at 48% DZB_log.txt upgrade00.log.txt

dronething commented 6 years ago

okay finished but quit unexpectedly downgrading from 700 to 550 using v.07 DZB_log.txt upgrade00.log.txt

mavicBreak commented 6 years ago

I don't know why but it looks like the FTP stream kills it for you. Unfortunately I can't replicate this on two MacBook Airs nor on a MacBook Pro. I did several attempts with Mavic from 700 to 550 on different devices with different OSX versions, never quit. Strange. Which Mac do you have?

dronething commented 6 years ago

I'm using Mac mini late 2012, well this happened only after fresh install though :D only happened once after one times quit . then later would be normal

mavicBreak commented 6 years ago

Finally I catched the crash with live debug mode during a downgrade. I found something in the 3rd party FTP library. There is an unsafe method of reading data stream. I modified the code and already did three flashings without errors. I will continue tomorrow and if it doesn't throw an error I will put it into the next update.

dronething commented 6 years ago

@mavicBreak that's great news. I still not testing firmware 1000 though. Will this app support that firmware version?

mavicBreak commented 6 years ago

Should work without any glitch but of course there is no NFZ and some other params. Downgrade is the same. Only Spark fw .600 got this anti-rollback feature but DZB knows the trick.

dronething commented 6 years ago

@mavicBreak cool. I'm gonna try it.

mavicBreak commented 6 years ago

@dronething v0.8 is out with ability to unlock Spark if it locked but also with stability fixes for upgrade monitoring. I changed a great part of the code and in the last few days I did not experience any crash. Maybe I was just lucky :) please use this version from now.

dronething commented 6 years ago

@mavicBreak will do... downloading now

dronething commented 6 years ago

@mavicBreak just try downgrade from 0.700 to 0.400 .drone is not downgrading but app said upgrade complete. there are no error showed as you promised. DZB_log.txt upgrade00.log.txt

dronething commented 6 years ago

@mavicBreak report update, with debug on downgrading firmware not working but showed no error and processed 100 percent success. with debug off, the 0.8 working flawless and has 100 process complete . well done upgrade00.log.txt

mavicBreak commented 6 years ago

Wow its a bit confusing :) so is there a situation now when downgrade/upgrade is not working? can you pls re-download the binary from github as I pushed a silent update with the same version.

dronething commented 6 years ago

@mavicBreak only when I push debug on before upgrading / downgrading . not working but app said it's 100% completed.i'll try re download the bin after I comment this.

dronething commented 6 years ago

@mavicBreak re download as your instructed, now I see warning you add before flashing. Cool add. yes. it seems working now with debug on. 2 thumbs up here's all log using latest with debug on. upgrade00.log.txt DZB_log.txt and I believe this bug has been conquered.

mavicBreak commented 6 years ago

so the flashing does not start if debug is off??

dronething commented 6 years ago

@mavicBreak before yes. but tried second time after you asked to re download again now it's working.

mavicBreak commented 6 years ago

Super.