Bug 6727 - Binding PSPDFKit library fails under 5.2.13 but works with 5.3.6
Summary: Binding PSPDFKit library fails under 5.2.13 but works with 5.3.6
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 5.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-08-28 16:30 UTC by René Ruppert
Modified: 2012-08-28 17:53 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Demo project (4.60 MB, application/zip)
2012-08-28 16:30 UTC, René Ruppert
Details
Code generated for base by 5.2.13 (2.89 KB, text/rtf)
2012-08-28 16:32 UTC, René Ruppert
Details
Code generated for base by 5.3.6 (3.31 KB, text/rtf)
2012-08-28 16:32 UTC, René Ruppert
Details
Code generated for controller by 5.2.13 (100.83 KB, text/rtf)
2012-08-28 16:32 UTC, René Ruppert
Details
Code generated for controller by 5.3.6 (106.34 KB, text/rtf)
2012-08-28 16:33 UTC, René Ruppert
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description René Ruppert 2012-08-28 16:30:52 UTC
Created attachment 2423 [details]
Demo project

Attached, find a test project and bindings for PSPDFKit PDF library.

The test scenario:

when using PSPDFViewController directly, all is working as expected.
However, when subclassing it, the PDF library will stop working properly.
The demo project creates a plain stupid derived class:

public class TestController : PSPDFViewController
{ 
  public TestController(PSPDFDocument doc) : base(doc)
  {
  }
}

Then it is adding an instance of TestController to the UINavigationController.

If you click the index view button (top right) in the demo, you should see an overview of all pages of the PDF.

* When building the DLL using 5.2.13, you won't see anything, just page numbers.
* When building the lib uisng 5.3.6, everything is working as expected.
* When using PSPDFViewController directly instead of the derived class, it is also working in 5.2.13

I have also attached the generated binding files for easy comparison.
Comment 1 René Ruppert 2012-08-28 16:32:01 UTC
Created attachment 2424 [details]
Code generated for base by 5.2.13
Comment 2 René Ruppert 2012-08-28 16:32:20 UTC
Created attachment 2425 [details]
Code generated for base by 5.3.6
Comment 3 René Ruppert 2012-08-28 16:32:42 UTC
Created attachment 2426 [details]
Code generated for controller by 5.2.13
Comment 4 René Ruppert 2012-08-28 16:33:01 UTC
Created attachment 2427 [details]
Code generated for controller by 5.3.6
Comment 5 Sebastien Pouliot 2012-08-28 17:22:51 UTC
Interesting (and a bit unexpected). I do not think it's binding related as there's no "real" changes between the attached files. At least none to explain the issue (wrt subclassing). (please don't use .rtf files as attachments, they don't diff very well ;-)

It's more likely that something was fixed in 5.3.x (and I can't say what out of my head). You should be able to confirm this by using the 5.2.x build assembly with 5.3 (it should work). 

Note that you won't be able to use the 5.3-built bindings on 5.2 since the string optimization (one of the binding change) depends on symbols that are not part of 5.2.x.

You should consider using 5.3.6 (and not only for this, it's full of other fixes and optimizations). It's also the last beta planned before 5.4 (stable) and it's very unlikely that a new 5.2.x release will be made before (or even after) 5.4 is released.
Comment 6 René Ruppert 2012-08-28 17:49:58 UTC
Sorry for the RTFs...that's what TextEdit made from the source (they compare well in Xcode's FileMerge by the way).
I'm planning to switch to 5.3.6 for the next version, so no big issue.

And yes, you're right: the 5.2.13 built DLL works in 5.3.6.

So issue resolved. If you should find out what exactly is making it work in 5.3.6, I'd like to know.

Good night!
Comment 7 Sebastien Pouliot 2012-08-28 17:53:30 UTC
Thanks for confirming it's not binding related (and for all the useful information :-)

We'll let you know if we find out what was the 5.2.x issue (maybe another bug report will make it easier to spot / recall).