Running into bugs in the cloud IDE with lots of files

I am now at 43 cpp / h / ino files in my project, and some bugs are beginning to show:

  • Sometimes the file tabs are all there, sometimes only 6 or so tabs are there (and the one I am currently editing does not show)

  • It is becoming a pain to tell which tab I should select if i can see less than the first letter of the tab/filename

  • The build is starting to be affected: sometimes it does not know when files have changed. I know this because I can see my changes in the editor but during a compile error it shows an old method signature. It usually starts working again if I begin re-changing files in different ways and re-saving. But it is hard to tell which of the many files I need to re-edit.

For more involved projects, the Particle Dev might suit your needs better. Give it a try, shouldn’t be too different.
As for the points you’ve mentioned, @suda might be able to use those :smile:

I have switched over using the atom editor on ubuntu linux.
It was going great for a while.

Now I have suddenly got the error "build didn’t produce binary Error: Command failed: /spark/co…"
Clicking on this shows “there were no compile errors”

Where do I look for more information about whats happening?

I opened the Atom developer console, and after a while I saw two instances of this:

Unhandled promise rejection Rejectedhandled: falseid: 1reported: truevalue: Error: invalid_clientmessage: "invalid_client"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }__proto__: d__proto__: Rejected with error: Error: invalid_client

(anonymous function)events.js:87 emitTwoevents.js:169 emit/home/deadlock/.atom/packages/particle-dev-cloud-functions/node_modules/when/lib/makePromise.js:895 (anonymous function)/home/deadlock/.atom/packages/particle-dev-cloud-functions/node_modules/when/lib/makePromise.js:654 ReportTask.run/home/deadlock/.atom/packages/particle-dev-cloud-functions/node_modules/when/lib/Scheduler.js:70 Scheduler._drain/home/deadlock/.atom/packages/particle-dev-cloud-functions/node_modules/when/lib/Scheduler.js:27 Scheduler.drainnode.js:357 _tickCallback

Not really sure if this is related or not.

Once I realized the Atom editor is a webkit page, it made sense to explore the developer console.

In there I found the full error that is not showing up like it used to and is all being crammed into the truncated status-bar

build didn't produce binary Error: Command failed: /spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/dispatcher.cpp: In member function 'void Dispatcher::setLog(Logger*)':
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/dispatcher.cpp:21:12: warning: deleting object of polymorphic class type 'Logger' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
     delete log;
            ^
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/funcbase.cpp: In member function 'int Funcbase::matchfuncname(const char**, int*)':
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/funcbase.cpp:15:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if (*len < funcname.length() || !s.startsWith(funcname)){
                                ^
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/funcfreemem.cpp: In member function 'virtual int Funcfreemem::tryhandle(String)':
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/funcfreemem.cpp:38:33: warning: narrowing conversion of 'a.String::length()' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
     int size[count] = {a.length()};
                                 ^
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/getclaim.cpp: In member function 'virtual int Getclaim::tryhandle(String)':
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/getclaim.cpp:66:48: warning: narrowing conversion of 'o.String::length()' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
         int sizes[3] = {csize, tsize, o.length()};
                                                ^
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/logbase.cpp: In member function 'void Logbase::setLog(Logger*)':
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/logbase.cpp:7:12: warning: deleting object of polymorphic class type 'Logger' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
     delete log;
            ^
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/resultcoordinator.cpp: In member function 'int ResultCoordinator::add(char**, int*, int)':
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/resultcoordinator.cpp:104:22: warning: 'u' may be used uninitialized in this function [-Wmaybe-uninitialized]
         if (sizes[x] > u->maxsize){
                      ^
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/savedata.cpp: In function 'void base64_encode(const unsigned char*, unsigned int, char*, int)':
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/savedata.cpp:47:17: warning: 'char_array_4[0]' is used uninitialized in this function [-Wuninitialized]
   unsigned char char_array_4[4];
                 ^
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/savedata.cpp:47:17: warning: 'char_array_4[1]' is used uninitialized in this function [-Wuninitialized]
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/savedata.cpp:47:17: warning: 'char_array_4[2]' is used uninitialized in this function [-Wuninitialized]
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/savedata.cpp:47:17: warning: 'char_array_4[3]' is used uninitialized in this function [-Wuninitialized]
../../../build/target/user/platform-6-m/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2//libuser.a(dispatcher.o): In function `Dispatcher::setLog(Logger*)':
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/dispatcher.cpp:27: undefined reference to `vtable for Logger'
../../../build/target/user/platform-6-m/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2//libuser.a(logbase.o): In function `Logbase::setLog(Logger*)':
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/logbase.cpp:8: undefined reference to `vtable for Logger'
../../../build/target/user/platform-6-m/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2//libuser.a(logger.o): In function `Logger::Logger()':
/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/logger.cpp:8: undefined reference to `vtable for Logger'
collect2: error: ld returned 1 exit status
make: *** [/spark/compile_service/shared/workspace/6_photon_17_3/firmware/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2/a940dc7fb615eb3fd777aba10a736537e1ba5bc2dd67aab403260a4997d2.elf] Error 1

I will file a bug report in spark-dev

I think I can fix the actual error, I have seen it before, something about not setting a virtual function to empty or something.

I’m seeing this error too. It wasn’t there 3 days ago.
Nothing on my end has changed.
Is this something that can be fixed on the Particle end?

Thanks for any insight,
Brent