Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-23-2014, 11:04 PM   #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-23-2014, 11:45 PM   #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: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
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
Reply


Forum Jump

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


All times are GMT -4. The time now is 07:29 PM.


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