Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 10-24-2014, 12:04 AM   #1
peci1
Junior Member
peci1 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2014
Device: PocketBook Touch 622
[622] OpenConfig segfaults

I've got an app and it segfaults on OpenConfig call when run on the reader (622 with 4.4 FW). In emulator everything works as expected. As well as on 623 with 4.2 FW.

The segfault provides me with no error message except "Segmentation fault". How could I debug it better? I use the PBSDK 1.1.0 on virtualized Ubuntu for the development.

Here's the affected code:

Code:
oldconfigedit myce[] = {
	{ "Color scheme", "Scheme", CFG_CHOICE,"1",choice_var4},
	{ "Board", "Board", CFG_INDEX,"0",choice_var2},
	{ NULL, NULL, 0,NULL,NULL}
};

#ifndef IVSAPP
  mycfg = OpenConfig("/mnt/ext1/system/config/pipes.cfg",myce);
#else
  mycfg = OpenConfig(CONFIGPATH "/pipes.cfg",myce);
#endif
Thx for help
peci1 is offline   Reply With Quote
Old 10-24-2014, 12:45 AM   #2
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 1,852
Karma: 4876164
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
The newest devices use a different iconfigedit structure than the old one given in the SDK. You should use:

Code:
typedef struct iconfigedit_new_s {
  int type;
  const ibitmap *icon;
  char *text;
  char *hint;
  char *name;
  char *deflt;
  char **variants;
  struct iconfigedit_s *submenu;
  ibitmap **icon_theme;
} iconfigedit_new;
You can use the above and cast it to iconfigedit in the call to OpenConfig, or edit your inkview.h file and hack the defined iconfigedit struct to look like the above. This will only work on new devices.
rkomar is offline   Reply With Quote
 
Advertisement
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
segfaults when reading e-book.. Chris Jones Devices 4 10-28-2013 12:45 AM
PB 622 Benutzerprofile Herbie622 PocketBook 5 01-06-2013 01:42 PM
ebook-meta --to-opf segfaults gurmuq Calibre 3 08-14-2010 10:36 PM
calibre 0.6.17 (linux) segfaults when trying to upload books reread Calibre 7 10-18-2009 07:02 PM
ebook-convert segfaults converting PDF files bloovis Calibre 4 09-30-2009 09:38 PM


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


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