Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-14-2016, 05:10 PM   #1
rpspringuel
Enthusiast
rpspringuel began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Feb 2014
Device: Kindle 4
Normal vs. Debug Mode

I've been having a bug with a plugin-which-shall-not-be-named recently which only shows up when calibre is in normal mode. When I restart in debug mode in order to generate the log file needed for a proper bug report, the process that failed before works fine. Is there anything in the debug infrastructure of calibre itself which would change the way the program works (besides the generation of the log file)? Further, is there some way that I can "backdoor" the debug mode so that calibre generates the debug log but "thinks" its in normal mode?

I realize that the actual problem is not one which can be addressed here, but I'm hoping for some insight into the difference between normal and debug mode so that I can extract the needed diagnostic information to addressed the problem in a more appropriate forum.
rpspringuel is offline   Reply With Quote
Old 04-14-2016, 10:10 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,259
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The main difference is that print statement are redirected to NUL in normal mode and a file in DEBUG mode. There are also a lot more print statements that become active -- this in turn can change the timing of various operations, which can cause timing/threading sensitive bugs to change their behavior.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-15-2016, 12:04 AM   #3
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
rpspringuel: What OS? I've had some reports on problems with a plugin I changed on Macs. They are getting "IOError: [Errno 32] Broken pipe" errors and the lines work out to print statements I left in the code. Most of the debug logging doesn't happen when not in debug mode, but I think I had three lines that would still execute/
davidfor is offline   Reply With Quote
Old 04-15-2016, 10:10 AM   #4
rpspringuel
Enthusiast
rpspringuel began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Feb 2014
Device: Kindle 4
I am on a Mac (10.10.4) and running calibre 2.54.0.
rpspringuel is offline   Reply With Quote
Old 04-15-2016, 10:34 AM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,259
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
On OS X the stdout and stderr streams get redirected to the ASL logging service for GUI apps. If you see errors happening in print statements, that usually implies the service is down/malfunctioning.
kovidgoyal is offline   Reply With Quote
Advert
Old 04-16-2016, 12:01 AM   #6
rpspringuel
Enthusiast
rpspringuel began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Feb 2014
Device: Kindle 4
Is there a way that I could capture the statements being directed to NULL in normal mode without turning on the full debug mode? I'm not terribly familiar with redirection and am not sure what's possible here, but presumably if this was possible it wouldn't change any timing (since the additional print statements wouldn't be activated) but it would give at least some diagnostic information.

If this sort of redirection isn't possible, could I make a change in the code and run from the git repository that would do something like this?
rpspringuel is offline   Reply With Quote
Old 04-16-2016, 12:41 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,259
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
In normal mode all print statements got to the ASL service, which usually is available via Console.app
kovidgoyal is offline   Reply With Quote
Old 04-17-2016, 09:03 PM   #8
rpspringuel
Enthusiast
rpspringuel began at the beginning.
 
Posts: 40
Karma: 10
Join Date: Feb 2014
Device: Kindle 4
Thank you. I found the "log" and have passed it along to the plugin author.
rpspringuel is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to start Calibre on Windows in debug mode hakan42 Development 9 04-10-2024 05:34 PM
Impossible to quit Caibre in debug mode (2.2) PO40600 Calibre 4 09-08-2014 11:13 AM
Kindle Touch Debug Mode Access choclit Kindle Developer's Corner 2 11-22-2011 10:23 AM
PRS-900 Any luck getting a root shell? or debug mode? raisinbrain Sony Reader 0 01-05-2010 11:33 PM
Debug mode of HanLin v3 sang HanLin eBook 4 07-01-2009 04:00 PM


All times are GMT -4. The time now is 03:52 PM.


MobileRead.com is a privately owned, operated and funded community.