iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello,
it try to add the Local Data Synchronization to the 'startup Business App' from Crosslight Project Wizard. I can login and so on... When I start the app it synchronizes with the .mdf database. 42 entities will fetch.
Now my current Problem.
When I go in menu to the Inventory (Page3), I get this Error:
"Unable to perform data operation due to an error: Object reference not set to an instance of an object."
Error occurs after this part(ItemListViewModel):
public DateTime? LastSync { get { return _lastSync; } set { if (_lastSync != value) { _lastSync = value; OnPropertyChanged("LastUpdate"); OnPropertyChanged("UpdatedText"); } } }
Wich object and where? o.O
Best regards
The error in VS Debugger. When I try to add an new item.
12-16 17:13:56.849 I/MonoDroid(30448): UNHANDLED EXCEPTION:12-16 17:13:56.890 I/MonoDroid(30448): System.NullReferenceException: Object reference not set to an instance of an object An unhandled exception occured. 12-16 17:13:56.890 I/MonoDroid(30448): at Intersoft.Crosslight.ViewModels.EditableListViewModelBase`1[CrosslightDB.DomainModels.Inventory.Item].OnDataInserted (IEnumerable`1 items) [0x00000] in <filename unknown>:0 12-16 17:13:56.890 I/MonoDroid(30448): at Intersoft.Crosslight.ViewModels.EditableListViewModelBase`1[CrosslightDB.DomainModels.Inventory.Item]._OnDataInserted (IEnumerable`1 items) [0x00000] in <filename unknown>:0 12-16 17:13:56.890 I/MonoDroid(30448): at Intersoft.Crosslight.EventSubscription`1[System.Collections.Generic.IEnumerable`1[CrosslightDB.DomainModels.Inventory.Item]].InvokeAction (System.Action`1 action, IEnumerable`1 argument) [0x00000] in <filename unknown>:0 12-16 17:13:56.890 I/MonoDroid(30448): at Intersoft.Crosslight.EventSubscription`1+a[System.Collections.Generic.IEnumerable`1[CrosslightDB.DomainModels.Inventory.Item]].<Intersoft.Crosslight.IEventSubscription.GetExecutionStrategy>b__0 (System.Object[] arguments) [0x00000] in <filename unknown>:0 12-16 17:13:56.890 I/MonoDroid(30448): at Intersoft.Crosslight.DelegateEventBase.InternalPublish (System.Object[] arguments) [0x00000] in <filename unknown>:0 12-16 17:13:56.890 I/MonoDroid(30448): at Intersoft.Crosslight.DelegateEvent`1[System.Collections.Generic.IEnumerable`1[CrosslightDB.DomainModels.Inventory.Item]].Publish (IEnumerable`1 payload) [0x00000] in <filename unknown>:0 12-16 17:13:56.890 I/MonoDroid(30448): at Intersoft.Crosslight.EventAggregator.Publish[DataInsertedEvent`1,IEnumerable`1] (IEnumerable`1 payload) [0x00000] in <filename unknown>:0 12-16 17:13:56.890 I/MonoDroid(30448): at Intersoft.Crosslight.ViewModels.EditorViewModelBase`1[CrosslightDB.DomainModels.Inventory.Item].OnDataInserted (CrosslightDB.DomainModels.Inventory.Item item) [0x00000] in <filename unknown>:0 12-16 17:13:56.890 I/MonoDroid(30448): at Intersoft.AppFramework.ViewModels.DataEditorViewModelBase`2+<ExecuteSave>d__0[CrosslightDB.DomainModels.Inventory.Item,CrosslightDB.DomainModels.Inventory.IItemRepository].MoveNext () [0x00000] in <filename unknown>:0
To enable data synchronization, you need to perform following tasks:
Source: Enabling Data Synchronization
Could you please provide a running sample which replicates the reported problem? I will try to start my investigation using the provided sample.
Hi Yudi,
I put the sample on github. You can download it here as a .zip file.
I removed the appSettings.WebServerUrl, because it only works in my network.
https://github.com/kiborkm/CrosslightDB
BR
Sorry for the delay in sending this.
I run the sent sample in my local end and managed to solve the problem by setting Item.ModifiedDate in InitializeNewItem.
protected override void InitializeNewItem(Item item) { base.InitializeNewItem(item); this.Item = this.Repository.Create(); this.Item.PurchaseDate = DateTime.Today; this.Item.Qty = 1; this.Item.ModifiedDate = DateTime.Now; this.Item.Category = this.CategoryRepository.GetAll().OrderBy(o => o.Name).FirstOrDefault(); this.Title = "Add New Item"; }
Hope this help.
ty, this was an failure too :P
It works now. But if I scroll down to the end in the Inventory List, the Debbuger will show me the whole time this line.
01-02 10:12:42.677 W/View (10523): requestLayout() improperly called by android.widget.LinearLayout{2b71ff5 V.E..... ......ID 0,0-768,38} during second layout pass: posting in next frame
Looks like infinite loop. Calls whole time the OnDataLoaded method. What does it mean? I also cant delete, edit and mark last 3 items on Android (when I scroll to the end). If I try to change the page, for example: 'I navigate to the about page' , the application will crash.
01-02 10:22:59.769 E/mono (10523): Parameter name: jobject01-02 10:22:59.769 E/mono (10523): at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (IntPtr jobject, IntPtr jclass, IntPtr jmethod) [0x00010] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/5474129a/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:867 01-02 10:22:59.769 E/mono (10523): at Android.Widget.BaseAdapter.NotifyDataSetChanged () [0x00058] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/5474129a/source/monodroid/src/Mono.Android/platforms/android-14/src/generated/Android.Widget.BaseAdapter.cs:311 01-02 10:22:59.770 E/mono-rt (10523): at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/54741201-02 10:22:59.769 E/mono (10523): at Intersoft.Crosslight.Android.ObservableListAdapter.<>n__FabricatedMethod7 () [0x00000] in <filename unknown>:0 01-02 10:22:59.769 E/mono (10523): at Intersoft.Crosslight.Android.ObservableListAdapter.<NotifyDataSetChanged>b__6 () [0x00000] in <filename unknown>:0 01-02 10:22:59.769 E/mono (10523): at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/5474129a/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:36 01-02 10:22:59.769 E/mono (10523): at Java.Lang.IRunnableInvoker.n_Run (IntPtr jnienv, IntPtr native__this) [0x00009] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.18-series/5474129a/source/monodroid/src/Mono.Android/platforms/android-14/src/generated/Java.Lang.IRunnable.cs:71 01-02 10:22:59.769 E/mono (10523): at (wrapper dynamic-method) object:7b2e84fb-f952-4980-97ed-af389323bbb0 (intptr,intptr) 01-02 10:22:59.770 E/mono-rt (10523): [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: 'jobject' must not be IntPtr.Zero.
Problem with the bindings? Like here:Stackoverflow IntPtr.Zero
I tried to replicate the reported problem by using the modified sent sample and do the following:
I have uploaded the modified sample in OneDrive. Please have the uploaded sample evaluated on your end and let me know whether it helps or not.
The incremental loading is the process of loading data in small chunks. Set IncrementalLoadingSize to 20 will load only first 20 items; and new 20 items when user scroll to the end of the list.Data synchronization requires all data to be loaded. Since you are enabling data synchronization, you should disable the incremental loading feature.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname