Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

FileManager: Version Control Browsing

<< < (4/6) > >>

dmoore:

--- Quote from: MortenMacFly on February 11, 2015, 05:45:51 pm ---My 2 cents for today...:
1.) I don't understand the "favourites" system: I can setup favourites (that works nice), but how do I access them?

--- End quote ---

The first items in the ComboBox that shows the current path will be populated with your favorites. (It's a little clunky, I admit.)


--- Quote from: MortenMacFly on February 11, 2015, 05:58:09 pm ---
--- Quote from: MortenMacFly on February 11, 2015, 05:50:53 pm ---...and m_exec_timer is "0xbaadf00d" -> unallocated.

--- End quote ---
Naaah... fixed in SVN.

You'd better remember to ALWAYS initialise pointer variables in the constructor in the future... ;-)

--- End quote ---

Well, that's embarrassing.


--- Quote from: MortenMacFly on February 11, 2015, 06:20:09 pm ---...but I'll give you another one: If in debug mode, a missing VCS executable will raise a wxExecute error dialog that freezes C::B completely.

--- End quote ---

Thanks for the tip. I had already refactored all of the wxExecute calls into a single place for the threaded parts and will do the same for the remaining calls.

MortenMacFly:

--- Quote from: dmoore on February 11, 2015, 07:05:40 pm ---The first items in the ComboBox that shows the current path will be populated with your favorites. (It's a little clunky, I admit.)

--- End quote ---
Aaah - dammed - I missed it. :-/ But if you know it makes sense. Maybe a "hint" like a label would help to discover...

blauzahn:
Hi, nice idea but...the recent svn-changes are breaking my build :-(

I use Ubuntu 14.04 and compile the trunk via makefile quite regularly. That stopped 3 days ago.
It looks like this bug has been introduced by svn 10107 since I have a working 10106.

Compiling cb stops with:


--- Code: ---libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../../../trunk/src/plugins/contrib/FileManager -I../../../../src/include -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../../../trunk/src/include -I../../../../../trunk/src/sdk/wxscintilla/include -I../../../../../trunk/src/include/mozilla_chardet -I../../../../../trunk/src/include/mozilla_chardet/mfbt -I../../../../../trunk/src/include/mozilla_chardet/nsprpub/pr/include -I../../../../../trunk/src/include/mozilla_chardet/xpcom -I../../../../../trunk/src/include/mozilla_chardet/xpcom/base -I../../../../../trunk/src/include/mozilla_chardet/xpcom/glue -ansi -DTIXML_USE_STL -Wno-unused-local-typedefs -O2 -ffast-math -DCB_AUTOCONF -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -D__FAM__ -MT FileExplorerUpdater.lo -MD -MP -MF .deps/FileExplorerUpdater.Tpo -c ../../../../../trunk/src/plugins/contrib/FileManager/FileExplorerUpdater.cpp  -fPIC -DPIC -o .libs/FileExplorerUpdater.o
In file included from ../../../../../trunk/src/plugins/contrib/FileManager/FileExplorerUpdater.cpp:9:0:
../../../../../trunk/src/plugins/contrib/FileManager/se_globals.h:10:17: fatal error: ../../../../src/include/sdk.h: No such file or directory
 #include <sdk.h>
                 ^
compilation terminated.
Preprocessed source stored into /tmp/ccirly8F.out file, please attach this to your bugreport.
make[4]: *** [FileExplorerUpdater.lo] Error 1

--- End code ---


The file sdk.h exists in:


--- Code: ---codeblocks/trunk/src/plugins/contrib/FileManager$ ls -l ../../../include/sdk.h
-rw-r--r-- 1 user user 457 Apr  2  2013 ../../../include/sdk.h

--- End code ---

I always build cb in a directory named build that is parallel to the trunk directory. The plugins up to FileManager compile and the
file sdk.h.gch has been written as usual.

Can you fix this, please? Thank you!



Btw: A cppcheck over the plugin files yields several issues. A few of those might be of a help:


--- Code: ---cppcheck --verbose --enable=all *.h *.cpp

--- End code ---


--- Code: ---[FileExplorerUpdater.h:44]: (warning) Member variable 'Updater::m_exec_cond' is not initialized in the constructor.

--- End code ---

Is there a reason why you put initializations, if any, into the body instead of the initializer list?


--- Code: ---[FileExplorerUpdater.cpp:1410]: (error) Uninitialized variable: hg_not_done

--- End code ---


--- Code: ---  bool hg_not_done;
  if (m_repo_type == _T("Hg"))
  {
      long last;
      if (m_last_commit_retrieved.ToLong(&last))
          if (last > 0)
              hg_not_done = true;
  }
  if (hg_not_done)
      m_retrieved_all = false;

--- End code ---

This is definitely undefined behaviour.


--- Code: ---[FileExplorer.cpp:1340] -> [FileExplorer.cpp:1340]: (style) Finding
  the same expression on both sides of an operator
  is suspicious and might indicate a cut and paste
  or logic error. Please examine this code carefully to determine if it is correct.

--- End code ---


--- Code: --- if(!wxFileName::DirExists(mkd) &&!wxFileName::DirExists(mkd))

--- End code ---

To me this looks being unintended.


--- Code: ---[directorymonitor.cpp:621]: (warning) Possible leak in public function.
  The pointer 'm_monitorthread' is not deallocated before it is allocated.

--- End code ---


--- Code: ---bool wxDirectoryMonitor::Start()
{
    m_monitorthread=new DirMonitorThread(this, m_uri, false, false, m_eventfilter, 100);
    m_monitorthread->Create();
    m_monitorthread->Run();
    return true;
}

--- End code ---

Since Start is a public method, and m_monitorthread is a naked pointer this is not safe.


Thanks!

dmoore:
Thanks for all of the fixes. A few oopses in there :)  :-[

Maybe I'm being dense but I'm not sure what the problem here is


--- Quote from: blauzahn on February 12, 2015, 10:21:35 pm ---I use Ubuntu 14.04 and compile the trunk via makefile quite regularly. That stopped 3 days ago.
It looks like this bug has been introduced by svn 10107 since I have a working 10106.

Compiling cb stops with:


--- Code: ---libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../../../../trunk/src/plugins/contrib/FileManager -I../../../../src/include -I/usr/lib/x86_64-linux-gnu/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../../../../trunk/src/include -I../../../../../trunk/src/sdk/wxscintilla/include -I../../../../../trunk/src/include/mozilla_chardet -I../../../../../trunk/src/include/mozilla_chardet/mfbt -I../../../../../trunk/src/include/mozilla_chardet/nsprpub/pr/include -I../../../../../trunk/src/include/mozilla_chardet/xpcom -I../../../../../trunk/src/include/mozilla_chardet/xpcom/base -I../../../../../trunk/src/include/mozilla_chardet/xpcom/glue -ansi -DTIXML_USE_STL -Wno-unused-local-typedefs -O2 -ffast-math -DCB_AUTOCONF -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -D__FAM__ -MT FileExplorerUpdater.lo -MD -MP -MF .deps/FileExplorerUpdater.Tpo -c ../../../../../trunk/src/plugins/contrib/FileManager/FileExplorerUpdater.cpp  -fPIC -DPIC -o .libs/FileExplorerUpdater.o
In file included from ../../../../../trunk/src/plugins/contrib/FileManager/FileExplorerUpdater.cpp:9:0:
../../../../../trunk/src/plugins/contrib/FileManager/se_globals.h:10:17: fatal error: ../../../../src/include/sdk.h: No such file or directory
 #include <sdk.h>
                 ^
compilation terminated.
Preprocessed source stored into /tmp/ccirly8F.out file, please attach this to your bugreport.
make[4]: *** [FileExplorerUpdater.lo] Error 1

--- End code ---


The file sdk.h exists in:


--- Code: ---codeblocks/trunk/src/plugins/contrib/FileManager$ ls -l ../../../include/sdk.h
-rw-r--r-- 1 user user 457 Apr  2  2013 ../../../include/sdk.h

--- End code ---

I always build cb in a directory named build that is parallel to the trunk directory. The plugins up to FileManager compile and the
file sdk.h.gch has been written as usual.

--- End quote ---

Comparing the makefiles, it's really not obvious to me what's different.

dmoore:
And looking at the makefile diff, I struggle to see how anything changed there can be the cause:

http://sourceforge.net/p/codeblocks/code/10107/tree//trunk/src/plugins/contrib/FileManager/Makefile.am?diff=51421f1dc431436b6eb31d56:10106

Are you sure there isn't some sort of corruption of the FileManager sources?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version